Professional Documents
Culture Documents
GodfriedToussaint
RandomVariablesandProbabilityDistributions
ArandomvariableXisafunctionofasubsetoftheoutcomesofasetof
randomexperiments.Assucharandomvariablemayalsobeafunction
ofotherrandomvariables.Typicallyitassociatesanumberwitheach
outcomeofthesamplespace(S,P).
Theprobabilitydistributionofarandomvariableisthecollectionofall
thepossiblevaluesthatitcantake,alongwiththeirprobabilities:
Discrete case
Binomial distribution
Quincunx demo
Continuous case
Probability density function
RandomVariables:Examples
Let(S,P)bethesamplespaceofrollingapairofdice.LetX
bethesumofthetwonumbersobtainedwhenthediceare
rolled.Xisarandomvariable:
X[(1,2)]=3 X[(5,3)]=8 X[(6,6)]=12 etc.
Let(S,P)bethesamplespaceoftossing10coins.LetXHbe
therandomvariable#Heads,andXTbethe#Tails.LetXbe
therandomvariableXHXT.
XH(HTHTHTTHTHTT)=5 HT(HTHTHTTHTHTT)=7
X=XHXT=2
BernoulliTrials:TossinganUnfairCoin
Let(S,P)bethesamplespaceoftossinganunfaircoin5
times.Assumethetossesareindependent.
S={HEADS,TAILS}andP(HEADS)=pandP(TAILS)=1p
Theprobabilityofobservingsomesequencesuchas:
HEADS,TAILS, HEADS,TAILS, HEADSis:
P(HTHTH)=P(H)P(T)P(H)P(T)P(H)
=p(1p)p(1p)p
=p3(1p)2
BinomialRandomVariables
Let(S,P)bethesamplespaceoftossinganunfaircoinn
times.Assumethetossesareindependent.
LetXdenotetherandomvariablethatcountsthenumber
ofheads,andhbeaninteger0hn.Whatisthe
probabilityP(X=h)?
()
n
Thereareexactlysequencesofnblipswithexactlyh
h
heads.
n
h(1p)nh
ThereforeP(X=h)=p
h
Xiscalledabinomialrandomvariablebecauseitisaterm
intheexpansionofthebinomial(p+q)nwhereq=1p.
()
IndependentRandomVariables
Let(S,P)beasamplespaceandletXandYbetworandom
variablesdebinedon(S,P).ThenXandYareindependent
providedthatforallvaluesaandbwehave:
P(X=aandY=b)=P(X=a)P(Y=b)
X
4.5
4
3.5
3
2.5
2
1.5
1
0.5
0
1.5
0.5
0.5
1.5
DependentRandomVariables
Let(S,P)beasamplespaceandletXandYbetworandom
variablesdebinedon(S,P).ThenXandYaredependent
providedthatforsomevaluesaandbwehave:
P(X=aandY=b)P(X=a)P(Y=b)
4.5
4
3.5
3
2.5
2
1.5
1
0.5
0
3
Expectation(mean,average,)
LetXbearealvaluedrandomvariabledebinedonasample
space(S,P).Theexpectation(ortheexpectedvalue)ofXis:
E(X) = X(s)P(s)
sS
Example:LetXdenotethenumberrolledbyadie.Whatisthe
expectedvalueofX?
Expectation(mean,average,)
LetXbearealvaluedrandomvariabledebinedonasample
space(S,P).Theexpectation(ortheexpectedvalue)ofXis:
E(X) = X(s)P(s)
sS
Example:LetXdenotethenumberrolledbyadie.Whatisthe
expectedvalueof
6
E(X) = X(a)P(a)
a=1
=X(1)P(1)+X(2)P(2)+X(3)P(3)+X(4)P(4)+X(5)P(5)+X(6)P(6)
=1(1/6)+2(1/6)+3(1/6)+4(1/6)+5(1/6)+6(1/6)
=21/6
=7/2
=3.5
LinearityofExpectation
LetXandYberealvaluedrandomvariablesdebinedona
samplespace(S,P).Then
E(X+Y)=E(X)+E(Y)
Proof:LetZ=X+Y.
E(Z) = Z(s)P(s)
sS
sS
E(Z) = E (X ) + E(Y )
LinearityofExpectationcontinued
LetXandYberealvaluedrandomvariablesdebinedona
samplespace(S,P).Leta,b,andcbeconstants.Then
1. E(cX)=cE(X)
2. E(aX+bY)=aE(X)+bE(Y)
3. and
ProductofRandomVariables
Let(S,P)bethesamplespaceoftossingafaircointwice.
LetXHbethenumberofHEADS andXTthenumberof
TAILS.LetZ=XHXT.
ThenE(XH)=E(XT)=1
And E(Z) = aP(Z = a)
a S
= 0 P(Z = 0) + 1 P(Z = 1)
2
2
= 0 + 1
4
4
1
=
2
X1
X2
XH
XT
ThereforesometimesE(X
HXT)E(XH)E(XT).
ProductofRandomVariablescontinued
LetXandYbeindependent,realvaluedrandomvariables
debinedonasamplespace(S,P).
ThenE(XY)=E(X)E(Y).
Proof:homework.
MeasuresofCentralTendency
andEstimatorsofLocation
Themeanaverageexpectedvalue
Arithmeticmean:(a1+a2++an)/n
Geometricmean:(a1a2an)1/n
Themedianarobustestimator
Deletingoutliers
Higherdimensionalanalogues?
MeasuresofCentralTendency
andEstimatorsofLocation
Themeanaverageexpectedvalue
Arithmeticmean:(a1+a2++an)/n
Geometricmean:(a1a2an)1/n
Themedianarobustestimator
Deletingoutliers
Higherdimensionalanalogues
Meanofeachdimension
Onionpeeling
Onion Peeling
TheArithmeticMeanGeometricMean
Inequality:InductionProof
Oralternatelyexpand:
a1 a2
TheArithmeticMeanGeometricMean
Inequality:InductionProofcontinued
TheAGMeanInequalityInductionProofcontinued
MeasuresofVariabilityorSpread:Variance
LetXbearealvaluedrandomvariabledebinedonasample
space(S,P).Let=E(X).ThenthevarianceofXis:
Var(X)=E[(X)2]
=E[(X)(X)]
=E[X22X+2]
=E[X2]E[2X]+E[2]
=E[X2]2E[X]+2
=E[X2]22+2
=E[X2]E[X]2
Thestandarddeviationisthesquarerootofthevariance.
TherangeofX:maximumvalueofXminimumvalueofX.