Consider the following probability mass function (p.m.f.) of a random variable X.
p⎛⎜⎝x,q⎞⎟⎠=⎛⎜⎝qifX=01−qifX=10otherwise
If q = 0.4, the variance of X is
x |
0 |
1 |
p(x) |
q |
1 - q |
E(x)=∑ixipi=0×q+1×(1−q)
= 1 - q = 0.6
E(x2)=∑x2ipi=02×q+12×(1−q)
= 1 - q = 0.6
V(x)=E(x)2−[E(x)]2=0.6−0.36=0.24