If You buy one ticket the expected gain is x.
There are two possibilities:
lose → x=0 (nothing gain)
win → x = 2000 gain
The expected value μ is the sum of the product of each possibility x with its probability P(x):
E(x)=μ=∑xP(X)=0+4002000=5
The expected value is 5.
The variance is the expected value of the squared deviation from the mean:
σ2=∑(x−μ)2P(x)=(0−5)2×400399+(2000−5)2×4001=24.93+4.98=29.91
The variance is 29.91.
Comments