Lab2 CEE 11
Lab2 CEE 11
Instruction:Tossafaircoinfor100times.
H=head,T=tail
Q1.
Thenumberofheadsis
54
thenumberoftailsis
46
_______
.
Q2.WedefinearandomvariableXas1iftheoutcomeisheadand0iftheoutcomeistail.Then
yoursamplemeanis x =
0.54
yoursamplevarianceis s2 =
0.2509
your
samplestandarddeviationis s =
0.501
.ReportnumbersinQ1andQ2intheGoogle
spreadsheet(
http://bit.ly/19nDwBB
).
Q3.Ifthecoinisfairi.e.,iftheprobabilityofgettingaheadis0.5,whatisthepmfofX,p(x)?
Whatareitsmeanvalue, X ,andvariance, X2 ?Whatkindofrandomvariableisit?
p(x)=
0.5,x=1
0.5,x=0
X =
x p(x)=0.5(1)+0.5(0)
=0.5
2
X2 = [x p(x)] X2 =1(0.5)+0(0.5) 0.52 =0.50.25=
0.25
ThisisaBernoulliRandomVariable
X2 ?Whatkindofrandomvariableisit?Canyouwritedownthepdfoftherandomvariable, f (x)
?
X = X
=0.5
X2 =(1/n) X2
=(1/100)(0.25)=
0.0025
X isanormalrandomvariablebecausen>100.
f (x) =f(x, , )=
1
0.052
(x0.5)2
2(0.0025)
Q5:Whataretheprobabilitiesfor X tobegreaterthan0.45,0.55,0.65?
p( X
>0.45)=
1 (
p( X
>0.55)= 1 (
) =
1 ( 0.550.5
0.1587
0.05 ) = 1 (1) =
p( X
>0.65)= 1 (
) =
1 ( 0.450.5
0.8413
0.05 ) = 1 ( 1) =
) =
1 ( 0.650.5
0.0013
0.05 ) = 1 (3) =
Q6:Usethedataonthegooglespreadsheet(
http://bit.ly/19nDwBB
)tocreateahistogramof
samplemeans.AlsoplotthepdfinQ4onthesamepictureandseeifitmakessenseornot.
Page2
of3
Thisdefinitelymakessense.
Page3
of3