753 views

1 Answer

2 votes
2 votes
Sampling out the scenario we get

${HH,HT,TH,TT}$ each with probability $\frac{1}{4}$

 

$P(X=no. of heads)$

$E[X]\Rightarrow 2*\frac{1}{4} + 1*\frac{1}{4}+1*\frac{1}{4}+0*\frac{1}{4}$

$\Rightarrow \frac{2}{4}+\frac{2}{4}\Rightarrow 1$

 $E[X]=1$;  $E^{2}[X]\Rightarrow 1$

 

Now calculating for $E[X^{2}]$

$E[X^{2}]\Rightarrow 2^{2}*\frac{1}{4}+1^{2}*\frac{1}{4}+1^{2}*\frac{1}{4}+0^{2}*\frac{1}{4}$

$\Rightarrow 1+\frac{1}{2}\Rightarrow 1.5$

so $E[X^{2}]$$=1.5$
edited by

Related questions

1 votes
1 votes
1 answer
3
akash.dinkar12 asked Jun 28, 2019
680 views
Explain why the worst-case running time for bucket sort is $\Theta(n^2)$. What simple change to the algorithm preserves its linear average-case running time and makes its...