(a)
We can consider all outcomes for this experiment: {ttt,thh,hth,hht,tth,tht,htt,hhh}
For Z=0: {hhh}
Z=1: {thh,hth,hht}
Z=2: {tth,tht,htt}
Z=3: {hhh}
Therefore, we have the probability distribution of Z :
zP(z)081183283381
Probability density function:

(b)
F(z)=P(Z≤z)
F(0)=P(Z≤0)=P(0)=81, F(1)=P(Z≤1)=P(0)+P(1)=21
F(2)=P(Z≤2)=P(0)+P(1)+P(2)=87, F(3)=P(Z≤3)=1
F(z)=⎩⎨⎧81, z=021, z=187, z=21, z=3
(c)
Mean value is E(Z)=∑zP(z)=0×P(0)+1×P(1)+2×P(2)+3×P(3)=0+83+86+83=812=1.5
D2(Z)=[∑z2P(z)]−E2(Z)=[02×P(0)+12×P(1)+22×P(2)+32×P(3)−1.52=0+83+812+89−2.25=824−2.25=0.75
Variance is D(z)=0.75≈0.866