It is given that P(X=0)=30% = \displaystyle\frac{30}{100} = 0.3$
P(X=1)=70% = \displaystyle\frac{70}{100} = 0.7$
Therefore, the probability distribution is as follows.
Then, E(X)=∑XiP(Xi)
=0×0.3+1×0.7
=0.7
E(X2)=∑X2iP(Xi)
=02×0.3+(1)2×0.7
=0.7
It is known that, Var(X)=E(X2)−[E(X)]2
=0.7−(0.7)2
=0.7−0.49
=0.21