Conditional Distributions For Continuous Random Variables: Example
Conditional Distributions For Continuous Random Variables: Example
https://onlinecourses.science.psu.edu/stat414/print/book/export/html/117
PublishedonSTAT414/STAT415(https://onlinecourses.science.psu.edu/stat414)
Home>ConditionalDistributionsforContinuousRandomVariables
ConditionalDistributionsforContinuous
RandomVariables
Thusfar,allofourdefinitionsandexamplesconcerneddiscreterandomvariables,butthe
definitionsandexamplescanbeeasilymodifiedforcontinuousrandomvariables.That's
whatwe'lldonow!
Definition.SupposeXandYarecontinuousrandomvariableswithjointprobabilitydensity
functionf(x,y)andmarginalprobabilitydensityfunctionsfX(x)andfY(y),respectively.Then,
theconditionalprobabilitydensityfunctionofYgivenX=xisdefinedas:
f (x, y)
h(y|x) =
f X (x)
providedfX(x)>0.TheconditionalmeanofYgivenX=xisdefinedas:
E(Y |x) =
yh(y|x)dy
TheconditionalvarianceofYgivenX=xisdefinedas:
2
or,alternatively,usingtheusualshortcut:
V ar(Y |x) = E[Y
h(y|x)dy]
2
Y |x
Althoughtheconditionalp.d.f.,mean,andvarianceofX,giventhatY=y,isnotgiven,their
definitionsfollowdirectlyfromthoseabovewiththenecessarymodifications.Let'stakealook
atanexampleinvolvingcontinuousrandomvariables.
Example
SupposethecontinuousrandomvariablesXandYhavethefollowingjointprobabilitydensity
function:
3
https://onlinecourses.science.psu.edu/stat414/print/book/export/html/117
f (x, y) =
1/4
12/11/2014
https://onlinecourses.science.psu.edu/stat414/print/book/export/html/117
3
f (x, y) =
2
forx2y1and0<x<1.WhatistheconditionaldistributionofYgivenX=x?
Solution.Wecanusetheformula:
f (x, y)
h(y|x) =
f
(x)
tofindtheconditionalp.d.f.ofYgivenX.But,todoso,weclearlyhaveto
findfX(x),themarginalp.d.f.ofXfirst.Recallthatwecandothatbyintegratingthe
jointp.d.f.f(x,y)overS2,thesupportofY.Here'swhatthejointsupportSlookslike:
So,webasicallyhaveaplane,shapedlikethesupport,floatingataconstant3/2
unitsabovethexyplane.TofindfX(x)then,wehavetointegrate:
3
f (x, y) =
2
overthesupportx2y1.Thatis:
f
(x) =
S2
f (x, y)dy =
1
x
y=1
3
3/2dy = [
y]
2
=
y=x
(1 x )
2
for0<x<1.Now,wecanusethejointp.d.ff(x,y)thatweweregivenandthe
marginalp.d.f.fX(x)thatwejustcalculatedtogettheconditionalp.d.f.ofYgivenX
=x:
3
f (x, y)
h(y|x) =
=
f
(x)
2
3
2
=
2
(1 x )
https://onlinecourses.science.psu.edu/stat414/print/book/export/html/117
0 < x < 1,
y 1
(1 x )
2/4
12/11/2014
https://onlinecourses.science.psu.edu/stat414/print/book/export/html/117
Thatis,givenx,thecontinuousrandomvariableYisuniformontheinterval(x2,1).
Forexample,ifx=,thentheconditionalp.d.f.ofYis:
1
h(y|1/4) =
1 (1/4)
16
=
15
(15/16)
for1/16y1.And,ifx=,thentheconditionalp.d.f.ofYis:
1
h(y|1/2) =
1 (1/2)
1
2
4
=
3
1 (1/4)
for1/4y1.
WhatistheconditionalmeanofYgivenX=x?
Solution.WecanfindtheconditionalmeanofYgivenX=xjustbyusingthe
definitioninthecontinuouscase.Thatis:
NotethatgiventhattheconditionaldistributionofYgivenX=xistheuniform
distributionontheinterval(x2,1),weshouldn'tbesurprisedthattheexpectedvalue
looksliketheexpectedvalueofauniformrandomvariable!
Let'stakethecasewherex=1/2.Wepreviouslyshowedthattheconditional
distributionofYgivenX=is
1
h(y|1/2) =
1 (1/2)
1
2
4
=
3
1 (1/4)
for1/4y1.Now,weknowthattheconditionalmeanofYgivenX=is:
1 + (1/2)
1
E(Y |
) =
2
https://onlinecourses.science.psu.edu/stat414/print/book/export/html/117
1 + (1/4)
=
5
=
3/4
12/11/2014
https://onlinecourses.science.psu.edu/stat414/print/book/export/html/117
Ifwethinkagainoftheexpectedvalueasthefulcrumatwhichtheprobabilitymassis
balanced,ourresultsheremakeperfectsense:
2014ThePennsylvaniaStateUniversity.Allrightsreserved.
SourceURL:https://onlinecourses.science.psu.edu/stat414/node/117
https://onlinecourses.science.psu.edu/stat414/print/book/export/html/117
4/4