The Gateway to Computer Science Excellence
0 votes
Let $X$ be a random variable that is equal to the number of heads in two flips of a fair coin. What is $E[X^2]$? What is $E^2[X]$?
in Algorithms by Boss (42.4k points) | 39 views

1 Answer

+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$
by Active (1.5k points)
edited by

Related questions

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
50,741 questions
57,257 answers
104,730 users