The Gateway to Computer Science Excellence
0 votes
31 views
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 (41.9k points) | 31 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.3k 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,647 questions
56,465 answers
195,380 comments
100,303 users