Lerning Gols Continuous Rndom Vriles Clss 5, 8.05 Jeremy Orloff nd Jonthn Bloom. Know the definition of continuous rndom vrile. 2. Know the definition of the proility density function (pdf) nd cumultive distriution function (cdf). 3. Be le to eplin why we use proility density for continuous rndom vriles. 2 Introduction We now turn to continuous rndom vriles. All rndom vriles ssign numer to ech outcome in smple spce. Wheres discrete rndom vriles tke on discrete set of possile vlues, continuous rndom vriles hve continuous set of vlues. Computtionlly, to go from discrete to continuous we simply replce sums y integrls. It will help you to keep in mind tht (informlly) n integrl is just continuous sum. Emple. Since time is continuous, the mount of time Jon is erly (or lte) for clss is continuous rndom vrile. Let s go over this emple in some detil. Suppose you mesure how erly Jon rrives to clss ech dy (in units of minutes). Tht is, the outcome of one tril in our eperiment is time in minutes. We ll ssume there re rndom fluctutions in the ect time he shows up. Since in principle Jon could rrive, sy, 3.43 minutes erly, or 2.7 minutes lte (corresponding to the outcome -2.7), or t ny other time, the smple spce consists of ll rel numers. So the rndom vrile which gives the outcome itself hs continuous rnge of possile vlues. It is too cumersome to keep writing the rndom vrile, so in future emples we might write: Let T = time in minutes tht Jon is erly for clss on ny given dy. 3 Clculus Wrmup While we will ssume you cn compute the most fmilir forms of derivtives nd integrls y hnd, we do not epect you to e clculus whizzes. For tricky epressions, we ll let the computer do most of the clculting. Conceptully, you should e comfortle with two views of definite integrl.. f() d = re under the curve y = f(). 2. f() d = sum of f() d.
8.05 clss 5, Continuous Rndom Vriles, Spring 204 2 The connection etween the two is: n re sum of rectngle res = f( )Δ + f( 2 )Δ +... + f( n )Δ = f( i )Δ. As the width Δ of the intervls gets smller the pproimtion ecomes etter. y y = f() y Are = f( i ) y = f() 0 2 n Are is pproimtely the sum of rectngles Note: In clculus you lerned to compute integrls y finding ntiderivtives. This is importnt for clcultions, ut don t confuse this method for the reson we use integrls. Our interest in integrls comes primrily from its interprettion s sum nd to much lesser etent its interprettion s re. 4 Continuous Rndom Vriles nd Proility Density Functions A continuous rndom vrile tkes rnge of vlues, which my e finite or infinite in etent. Here re few emples of rnges: [0, ], [0, ), (, ), [, ]. Definition: A rndom vrile X is continuous if there is function f() such tht for ny c d we hve d P (c X d) = f() d. () c The function f() is clled the proility density function (pdf). The pdf lwys stisfies the following properties:. f() 0 (f is nonnegtive). 2. f() d = (This is equivlent to: P ( < X < ) = ). The proility density function f() of continuous rndom vrile is the nlogue of the proility mss function p() of discrete rndom vrile. Here re two importnt differences:. Unlike p(), the pdf f() is not proility. You hve to integrte it to get proility. (See section 4.2 elow.) 2. Since f() is not proility, there is no restriction tht f() e less thn or equl to.
8.05 clss 5, Continuous Rndom Vriles, Spring 204 3 Note: In Property 2, we integrted over (, ) since we did not know the rnge of vlues tken y X. Formlly, this mkes sense ecuse we just define f() to e 0 outside of the rnge of X. In prctice, we would integrte etween ounds given y the rnge of X. 4. Grphicl View of Proility If you grph the proility density function of continuous rndom vrile X then P (c X d) = re under the grph etween c nd d. f() P (c X d) Think: Wht is the totl re under the pdf f()? c d 4.2 The terms proility mss nd proility density Why do we use the terms mss nd density to descrie the pmf nd pdf? Wht is the difference etween the two? The simple nswer is tht these terms re completely nlogous to the mss nd density you sw in physics nd clculus. We ll review this first for the proility mss function nd then discuss the proility density function. Mss s sum: If msses m, m 2, m 3, nd m 4 re set in row t positions, 2, 3, nd 4, then the totl mss is m + m 2 + m 3 + m 4. m m 2 m 3 m 4 2 3 4 We cn define mss function p() with p( j ) = m j for j =, 2, 3, 4, nd p() = 0 otherwise. In this nottion the totl mss is p( ) + p( 2 ) + p( 3 ) + p( 4 ). The proility mss function ehves in ectly the sme wy, ecept it hs the dimension of proility insted of mss. Mss s n integrl of density: Suppose you hve rod of length L meters with vrying density f() kg/m. (Note the units re mss/length.) Δ 0 2 3 i n = L mss of i th piece f( i )Δ
8.05 clss 5, Continuous Rndom Vriles, Spring 204 4 If the density vries continuously, we must find the totl mss of the rod y integrtion: L totl mss = f() d. This formul comes from dividing the rod into smll pieces nd summing up the mss of ech piece. Tht is: n totl mss f( i ) Δ i= In the limit s Δ goes to zero the sum ecomes the integrl. The proility density function ehves ectly the sme wy, ecept it hs units of proility/(unit ) insted of kg/m. Indeed, eqution () is ectly nlogous to the ove integrl for totl mss. While we re on physics kick, note tht for oth discrete nd continuous rndom vriles, the epected vlue is simply the center of mss or lnce point. Emple 2. Suppose X hs pdf f() = 3 on [0, /3] (this mens f() = 0 outside of [0, /3]). Grph the pdf nd compute P (. X.2) nd P (. X ). nswer: P (. X.2) is shown elow t left. We cn compute the integrl:.2.2 P (. X.2) = f() d = 3 d =.3... Or we cn find the re geometriclly: re of rectngle = 3. =.3. 0 P (. X ) is shown elow t right. Since there is only re under f() up to /3, we hve P (. X ) = 3 (/3.) =.7. 3 f() 3 f()..2 /3. /3 P (. X.2) P (. X ) Think: In the previous emple f() tkes vlues greter thn. Why does this not violte the rule tht proilities re lwys etween 0 nd? Note on nottion. We cn define rndom vrile y giving its rnge nd proility density function. For emple we might sy, let X e rndom vrile with rnge [0,]
8.05 clss 5, Continuous Rndom Vriles, Spring 204 5 nd pdf f() = /2. Implicitly, this mens tht X hs no proility density outside of the given rnge. If we wnted to e solutely rigorous, we would sy eplicitly tht f() = 0 outside of [0,], ut in prctice this won t e necessry. Emple 3. Let X e rndom vrile with rnge [0,] nd pdf f() = C 2. Wht is the vlue of C? nswer: Since the totl proility must e, we hve f() d = C 2 d =. 0 0 By evluting the integrl, the eqution t right ecomes C/3 = C = 3. Note: We sy the constnt C ove is needed to normlize the density so tht the totl proility is. Emple 4. Let X e the rndom vrile in the Emple 3. Find P (X /2). /2 /2 nswer: P (X /2) = 3 2 d = 3 =. 0 0 8 Think: For this X (or ny continuous rndom vrile): Wht is P ( X )? Wht is P (X = 0)? Does P (X = ) = 0 men tht X cn never equl? In words the ove questions get t the fct tht the proility tht rndom person s height is ectly 5 9 (to infinite precision, i.e. no rounding!) is 0. Yet it is still possile tht someone s height is ectly 5 9. So the nswers to the thinking questions re 0, 0, nd No. 4.3 Cumultive Distriution Function The cumultive distriution function (cdf) of continuous rndom vrile X is defined in ectly the sme wy s the cdf of discrete rndom vrile. F () = P (X ). Note well tht the definition is out proility. When using the cdf you should first think of it s proility. Then when you go to clculte it you cn use F () = P (X ) = f() d, where f() is the pdf of X. Notes:. For discrete rndom vriles, we defined the cumultive distriution function ut did
8.05 clss 5, Continuous Rndom Vriles, Spring 204 6 not hve much occsion to use it. The cdf plys fr more prominent role for continuous rndom vriles. 2. As efore, we strted the integrl t ecuse we did not know the precise rnge of X. Formlly, this still mkes sense since f() = 0 outside the rnge of X. In prctice, we ll know the rnge nd strt the integrl t the strt of the rnge. 3. In prctice we often sy X hs distriution F () rther thn X hs cumultive distriution function F (). Emple 5. Find the cumultive distriution function for the density in Emple 2. nswer: For in [0,/3] we hve F () = f() d = 3 d = 3. 0 0 Since f() is 0 outside of [0,/3] we know F () = P (X ) = 0 for < 0 nd F () = for > /3. Putting this ll together we hve 0 if < 0 F () = 3 if 0 /3 if /3 <. Here re the grphs of f() nd F (). 3 f() F () /3 /3 Note the different scles on the verticl es. Rememer tht the verticl is for the pdf represents proility density nd tht of the cdf represents proility. Emple 6. Find the cdf for the pdf in Emple 3, f() = 3 2 on [0, ]. Suppose X is rndom vrile with this distriution. Find P (X < /2). nswer: f() = 3 2 on [0,] F () = 3 2 d = 3 on [0,]. Therefore, 0 0 if < 0 F () = 3 if 0 if < Thus, P (X < /2) = F (/2) = /8. Here re the grphs of f() nd F (): 3 f() F ()
8.05 clss 5, Continuous Rndom Vriles, Spring 204 7 4.4 Properties of cumultive distriution functions Here is summrry of the most importnt properties of cumultive distriution functions (cdf). (Definition) F () =P (X ) 2. 0 F () 3. F () is non-decresing, i.e. if then F () F (). 4. lim F () = nd lim F () =0 5. P ( X ) =F () F () 6. F () =f(). Properties 2, 3, 4 re identicl to those for discrete distriutions. The grphs in the previous emples illustrte them. Property 5 cn e seen lgericlly: f() d = f() d + f() d f() d = f() d f() d P ( X ) =F () F (). Property 5 cn lso e seen geometriclly. The ornge region elow represents F () nd the striped region represents F (). Their difference is P ( X ). P ( X ) Property 6 is the fundmentl theorem of clculus. 4.5 Proility density s drtord We find it helpful to think of smpling vlues from continuous rndom vrile s throwing drts t funny drtord. Consider the region underneth the grph of pdf s drtord. Divide the ord into smll equl size squres nd suppose tht when you throw drt you re eqully likely to lnd in ny of the squres. The proility the drt lnds in given region is the frction of the totl re under the curve tken up y the region. Since the totl re equls, this frction is just the re of the region. If X represents the -coordinte of the drt, then the proility tht the drt lnds with -coordinte etween nd is just P ( X ) = re under f() etween nd = f() d.
MIT OpenCourseWre https://ocw.mit.edu 8.05 Introduction to Proility nd Sttistics Spring 204 For informtion out citing these mterils or our Terms of Use, visit: https://ocw.mit.edu/terms.