Académique Documents
Professionnel Documents
Culture Documents
https://onlinecourses.science.psu.edu/stat414/print/book/export/html/107
PublishedonSTAT414/STAT415(https://onlinecourses.science.psu.edu/stat414)
Home>TwoContinuousRandomVariables
TwoContinuousRandomVariables
Sofar,ourattentioninthislessonhasbeendirectedtowardsthejointprobabilitydistributionoftwoormorediscrete
randomvariables.Now,we'llturnourattentiontocontinuousrandomvariables.Alongtheway,alwaysinthecontext
ofcontinuousrandomvariables,we'lllookatformaldefinitionsofjointprobabilitydensityfunctions,marginal
probabilitydensityfunctions,expectationandindependence.We'llalsoapplyeachdefinitiontoaparticularexample.
Definition.LetXandYbetwocontinuousrandomvariables,andletSdenotethetwodimensionalsupport
ofXandY.Then,thefunctionf(x,y)isajointprobabilitydensityfunction(abbreviatedp.d.f.)ifitsatisfiesthe
followingthreeconditions:
1)f (x, y)
2)
f (x, y)dxdy = 1
3)P [(X, Y )
A] =
f (x, y)dxdy
where{(X,Y)A}isaneventinthexyplane.
Thefirstcondition,ofcourse,justtellsusthatthefunctionmustbenonnegative.Keepinginmindthatf(x,y)issome
twodimensionalsurfacefloatingabovethexyplane,thesecondconditiontellsusthat,thevolumedefinedbythe
support,thesurfaceandthexyplanemustbe1.Thethirdconditiontellsusthatinordertodeterminetheprobability
ofaneventA,youmustintegratethefunctionf(x,y)overthespacedefinedbytheeventA.Thatis,justasfinding
probabilitiesassociatedwithonecontinuousrandomvariableinvolvedfindingareasundercurves,
findingprobabilitiesassociatedwithtwocontinuousrandomvariablesinvolvesfindingvolumesofsolidsthatare
definedbytheeventAinthexyplaneandthetwodimensionalsurfacef(x,y).
Example
LetXandYhavejointprobabilitydensityfunction:
f (x, y) = 4xy
for0<x<1and0<y<1.Isf(x,y)avalidp.d.f.?
Solution.Beforetryingtoverifythatf(x,y)isavalidp.d.f.,itmighthelptogetafeelforwhatthefunction
lookslike.Here'smyattemptatasketchofthefunction:
https://onlinecourses.science.psu.edu/stat414/print/book/export/html/107
1/7
12/11/2014
https://onlinecourses.science.psu.edu/stat414/print/book/export/html/107
TheredsquareisthejointsupportofXandYthatliesinthexyplane.Thebluetentshapedsurfaceismy
renditionofthef(x,y)surface.Now,inordertoverifythatf(x,y)isavalidp.d.f.,wefirstneedtoshow
thatf(x,y)isalwaysnonnegative.Clearly,that'sthecase,asitliescompletelyabovethexyplane.If
you'restillnotconvinced,youcanseethatinsubstitutinganyxandyvalueinthejointsupportintothe
functionf(x,y),youalwaysgetapositivevalue.
Now,wejustneedtoshowthatthevolumeofthesoliddefinedbythesupport,thexyplaneandthe
surfaceis1:
WhatisP(Y<X)?
Solution.Inordertofindthedesiredprobability,weagainneedtofindavolumeofasolidasdefinedby
thesurface,thexyplane,andthesupport.Thistime,however,thevolumeisnotdefinedinthexyplane
bytheunitsquare.Instead,theregioninthexyplaneisconstrainedtobejustthatportionoftheunit
squareforwhichy<x.Ifwestartwiththesupport0<x<1and0<y<1(theredsquare),andfindjust
theportionoftheredsquareforwhichy<x,wegetthebluetriangle:
https://onlinecourses.science.psu.edu/stat414/print/book/export/html/107
2/7
12/11/2014
https://onlinecourses.science.psu.edu/stat414/print/book/export/html/107
So,it'sthevolumeofthesolidbetweenthef(x,y)surfaceandthebluetrianglethatweneedtofind.That
is,tofindthedesiredvolume,thatis,thedesiredprobability,weneedtointegratefromy=0tox,andthen
fromx=0to1:
Giventhesymmetryofthesolidabouttheplaney=x,perhapsweshouldn'tbesurprisedtodiscoverthat
ourcalculatedprobabilityequals1/2!
Definition.ThemarginalprobabilitydensityfunctionsofthecontinuousrandomvariablesXandYaregiven,
respectively,by:
f X (x) =
f (x, y)dy,
x S1
f (x, y)dx,
y S2
and:
f Y (y) =
whereS1andS2aretherespectivesupportsofXandY.
Example(continued)
LetXandYhavejointprobabilitydensityfunction:
f (x, y) = 4xy
for0<x<1and0<y<1.WhatisfX(x),themarginalp.d.f.ofX,andfY(y),themarginalp.d.f.ofY?
Solution.Inordertofindthemarginalp.d.f.ofX,weneedtointegratethejointp.d.f.f(x,y)over0<y<1,
thatis,overthesupportofY.Doingso,weget:
https://onlinecourses.science.psu.edu/stat414/print/book/export/html/107
(x) =
4xydy = 4x
y=1
3/7
= 2x,
0 < x < 1
12/11/2014
https://onlinecourses.science.psu.edu/stat414/print/book/export/html/107
(x) =
1
0
y=1
4xydy = 4x[
= 2x,
0 < x < 1
2
y=0
Inordertofindthemarginalp.d.f.ofY,weneedtointegratethejointp.d.f.f(x,y)over0<x<1,thatis,over
thesupportofX.Doingso,weget:
(y) =
1
0
x=1
4xydx = 4y[
= 2y,
0 < y < 1
2
x=0
Definition.TheexpectedvalueofacontinuousrandomvariableXcanbefoundfromthejointp.d.fofXandYby:
E(X) =
xf (x, y)dxdy
Similarly,theexpectedvalueofacontinuousrandomvariableYcanbefoundfromthejointp.d.fofXandYby:
E(Y ) =
yf (x, y)dydx
Example(continued)
LetXandYhavejointprobabilitydensityfunction:
f (x, y) = 4xy
for0<x<1and0<y<1.WhatistheexpectedvalueofX?WhatistheexpectedvalueofY?
Solution.TheexpectedvalueofXis2/3asisfoundhere:
We'llleaveittoyoutoshow,notsurprisingly,thattheexpectedvalueofYisalso2/3.
Definition.ThecontinuousrandomvariablesXandYareindependentifandonlyifthejointp.d.f.ofXandYfactors
intotheproductoftheirmarginalp.d.f.s,namely:
https://onlinecourses.science.psu.edu/stat414/print/book/export/html/107
4/7
12/11/2014
https://onlinecourses.science.psu.edu/stat414/print/book/export/html/107
f(x,y)=fX(x)fY(y)xS1,yS2
Example(continued)
LetXandYhavejointprobabilitydensityfunction:
f (x, y) = 4xy
for0<x<1and0<y<1.AreXandYindependent?
Solution.TherandomvariablesXandYareindeedindependent,because:
f (x, y) = 4xy = f
(x)f
So,thisisanexampleinwhichthesupportis"rectangular"andXandYareindependent.
Notethat,asistrueinthediscretecase,ifthesupportSofXandYis"triangular,"thenXandYcannotbe
independent.Ontheotherhand,ifthesupportis"rectangular"(thatis,aproductspace),thenXandYmayormay
notbeindependent.Let'stakealookfirstatanexampleinwhichwehaveatriangularsupport,andthenatan
exampleinwhichthesupportisrectangular,and,unlikethepreviousexample,XandYaredependent.
Example
LetXandYhavejointprobabilitydensityfunction:
f (x, y) = 2
for0<x<y<1.AreXandYindependent?
Solution.InordertoshowthatXandYareindependent,weneedtobeabletoshowthatthejointp.d.f.
ofXandYfactorsintotheproductofthemarginalp.d.f.s.Themarginalp.d.f.ofXis:
f
(x) =
1
x
0 < x < 1
And,themarginalp.d.f.ofYis:
f
(y) =
y
0
2dx = 2y,
0 < y < 1
Clearly,XandYaredependent,because:
f (x, y) = 2 f
(x)f
Thisisanexampleinwhichthesupportistriangular:
https://onlinecourses.science.psu.edu/stat414/print/book/export/html/107
5/7
12/11/2014
https://onlinecourses.science.psu.edu/stat414/print/book/export/html/107
andXandYaredependent,aswejustillustrated.
Example
LetXandYhavejointprobabilitydensityfunction:
f (x, y) = x + y
for0<x<1and0<y<1.AreXandYindependent?
Solution.Again,inordertoshowthatXandYareindependent,weneedtobeabletoshowthatthejoint
p.d.f.ofXandYfactorsintotheproductofthemarginalp.d.f.s.Themarginalp.d.f.ofXis:
(x) =
1
0
y=1
(x + y)dy = [xy +
1
]
= x +
0 < x < 1
0 < y < 1
2
y=0
And,themarginalp.d.f.ofYis:
(y) =
1
0
x=1
(x + y)dx = [xy +
1
]
= y +
2
x=0
Clearly,XandYaredependent,because:
1
f (x, y) = x + y f
(x)f
(y) =
(x +
1
) (y +
)
2
Thisisanexampleinwhichthesupportisrectangular:
andXandYaredependent,aswejustillustrated.Again,arectangularsupportmayormaynotleadto
independentrandomvariables.
https://onlinecourses.science.psu.edu/stat414/print/book/export/html/107
6/7
12/11/2014
https://onlinecourses.science.psu.edu/stat414/print/book/export/html/107
2014ThePennsylvaniaStateUniversity.Allrightsreserved.
SourceURL:https://onlinecourses.science.psu.edu/stat414/node/107
https://onlinecourses.science.psu.edu/stat414/print/book/export/html/107
7/7