3 7 3 8 3 9 3 11 functions of multiple random variables
play

3.7, 3.8, 3.9, 3.11 Functions of multiple random variables - PowerPoint PPT Presentation

3.7, 3.8, 3.9, 3.11 Functions of multiple random variables (continuous) Prof. Tesler Math 186 Winter 2019 Prof. Tesler Ch. 3. Joint random variables (continuous) Math 186 / Winter 2019 1 / 30 Mass density (review from Calculus and Physics)


  1. 3.7, 3.8, 3.9, 3.11 Functions of multiple random variables (continuous) Prof. Tesler Math 186 Winter 2019 Prof. Tesler Ch. 3. Joint random variables (continuous) Math 186 / Winter 2019 1 / 30

  2. Mass density (review from Calculus and Physics) y B ρ ( x , y ) x Two-dimensional version: Consider a shape B ⊆ R 2 . Make very thin horizontal and vertical cuts. Let ρ ( x , y ) be the density at ( x , y ) . This is the mass per unit area. It can be measured in g/cm 2 . In 3D, it would be g/cm 3 . ρ ( x , y ) � 0 everywhere. The area of a differential patch is dA = dx dy = dy dx . The mass of a differential patch is ρ ( x , y ) dA (density times area). �� The total mass of B is ρ ( x , y ) dA B Prof. Tesler Ch. 3. Joint random variables (continuous) Math 186 / Winter 2019 2 / 30

  3. Continuous joint probability density function Joint probability density function of two variables We require: f X , Y ( x , y ) � 0 for all points ( x , y ) . � ∞ � ∞ f X , Y ( x , y ) dx dy = 1 − ∞ − ∞ Probability of an event The probability of event B ⊆ R 2 is y B �� P ( B ) = f X , Y ( x , y ) dA x B Prof. Tesler Ch. 3. Joint random variables (continuous) Math 186 / Winter 2019 3 / 30

  4. Uniform probability on a region C Uniform probability on a region C means that all points inside C have equal probability density, and all points outside C have probability density 0 : � 1 if ( x , y ) ∈ C area ( C ) f X , Y ( x , y ) = otherwise 0 y Let C be the disk of radius 2 3 centered at the origin: C � 2 if x 2 + y 2 � 4 1 x 4 π f X , Y ( x , y ) = −3 3 otherwise 0 −3 �� 4 π dA = 1 1 4 π · area ( C ) = 1 Total probability = 4 π · 4 π = 1 C Prof. Tesler Ch. 3. Joint random variables (continuous) Math 186 / Winter 2019 4 / 30

  5. Probability of an event y 3 D 2 x −3 3 −3 �� 4 π · 4 π 4 π dA = 1 1 4 π area ( D ) = 1 2 = 1 P ( X > 0 ) = 2 D Prof. Tesler Ch. 3. Joint random variables (continuous) Math 186 / Winter 2019 5 / 30

  6. Marginal densities 3 y √ 4 − x 2 y = x −3 3 √ 4 − x 2 y = − −3 Form an x -strip: hold x constant and vary y . √ The perimeter is x 2 + y 2 = 4 , so y = ± 4 − x 2 on the perimeter. The strip is vertical, so the − solution is at the bottom and the + solution is at the top. √ √ 4 − x 2 � y � 4 − x 2 . The part of the strip within the shape is − Prof. Tesler Ch. 3. Joint random variables (continuous) Math 186 / Winter 2019 6 / 30

  7. Marginal densities The marginal density at x : Form an x -strip . Hold x constant and integrate over all y . 3 y � ∞ f X ( x ) = − ∞ f X , Y ( x , y ) dy √ 4 − x 2 y = � √ 4 − x 2 1 = 4 π dy √ 4 − x 2 − x √ −3 3 4 − x 2 = 2 √ 4 π y = − 4 − x 2 −3 � √ 4 − x 2 if − 2 � x � 2 2 π f X ( x ) = otherwise 0 Prof. Tesler Ch. 3. Joint random variables (continuous) Math 186 / Winter 2019 7 / 30

  8. Marginal densities The marginal density at y is similar. Form a y -strip . Hold y constant and integrate over all x . The strip is horizontal and goes left to right instead of bottom to top. y 3 � ∞ f Y ( y ) = − ∞ f X , Y ( x , y ) dx � � 4 − y 2 4 − y 2 x = − x = � √ 4 − y 2 1 − √ = 4 π dx x 4 − y 2 = 2 √ −3 3 4 − y 2 4 π −3 � √ 4 − y 2 if − 2 � y � 2 f Y ( y ) = 2 π otherwise 0 Prof. Tesler Ch. 3. Joint random variables (continuous) Math 186 / Winter 2019 8 / 30

  9. Independence Random variables X , Y , Z , . . . are independent if their joint pdf factorizes as follows, for all x , y , z , . . .. f X , Y , Z ,... ( x , y , z , . . . ) = f X ( x ) f Y ( y ) f Z ( z ) · · · Technicality: Exceptions are allowed, as long as the probability of an exception is 0. For example, in a continuous distribution: The probability of a point is 0. In 2D, the probability of a discrete set of points or curves is 0. Exceptions only happen with continuous distributions, not discrete. Prof. Tesler Ch. 3. Joint random variables (continuous) Math 186 / Winter 2019 9 / 30

  10. Independence Summary of previous formulas � if x 2 + y 2 � 4 1 3 y 4 π f X , Y ( x , y ) = otherwise 0 � √ 4 − x 2 / ( 2 π ) if − 2 � x � 2 x f X ( x ) = −3 3 otherwise 0 � � 4 − y 2 / ( 2 π ) if − 2 � y � 2 f Y ( y ) = −3 otherwise 0 Check independence: � � ( 4 − x 2 )( 4 − y 2 ) / ( 4 π 2 ) if − 2 � x � 2 and − 2 � y � 2 f X ( x ) f Y ( y ) = otherwise 0 This is different than f X , Y ( x , y ) . The formula is different, and it’s nonzero inside a square instead of inside a circle. So X , Y are dependent. Prof. Tesler Ch. 3. Joint random variables (continuous) Math 186 / Winter 2019 10 / 30

  11. Expected values Definition For a function g ( X , Y ) of continuous random variables, the expected value is � ∞ � ∞ E ( g ( X , Y )) = g ( x , y ) f X , Y ( x , y ) dA − ∞ − ∞ This is similar to the definition in the discrete case, but using integrals instead of sums. Compute E ( X ) for the circle example �� �� x x E ( X ) = 4 π dA + 4 π dA = 0 right semicircle left semicircle The two integrals are negatives of each other, so they sum to 0. Prof. Tesler Ch. 3. Joint random variables (continuous) Math 186 / Winter 2019 11 / 30

  12. Compute E ( R ) in the circle example √ X 2 + Y 2 . Compute E ( R ) : In polar coordinates, recall R = �� x 2 + y 2 · 1 � � � X 2 + Y 2 � E ( R ) = E = 4 π dA C This is easier in polar coordinates than in Cartesian coordinates. Switch to polar coordinates, and note that the integral separates: � 2 π � 2 � � 2 π � � � 2 �� � r 4 π · r dr d θ = 1 r r 2 dr E ( R ) = 4 π dA = d θ 4 π 0 0 0 0 C Evaluate the integrals: � 2 π � 2 r = 2 = 2 3 − 0 3 r 2 dr = r 3 � θ = 2 π = 8 � � d θ = θ = 2 π − 0 = 2 π � � � 3 3 3 θ = 0 � 0 0 r = 0 Plug in their values: � 8 � = 16 π E ( R ) = 1 12 π = 4 4 π ( 2 π ) 3 3 Prof. Tesler Ch. 3. Joint random variables (continuous) Math 186 / Winter 2019 12 / 30

  13. Variance The variance formula is the same for continuous as for discrete: Var ( X ) = E (( X − µ ) 2 ) = E ( X 2 ) − ( E ( X )) 2 However, expected value is computed using an integral instead of a sum. Compute Var ( R ) and SD ( R ) : � 2 π � 2 � � 2 π � � � 2 �� r 2 r 2 � 4 π · r dr d θ = 1 r 3 dr E ( R 2 ) = 4 π dA = d θ 4 π 0 0 0 0 C � 2 π � 2 = 2 4 − 0 4 2 r 3 dr = r 4 � � d θ = 2 π = 4 � 4 4 � 0 0 r = 0 E ( R 2 ) = 1 4 π ( 2 π )( 4 ) = 2 Var ( R ) = E ( R 2 ) − ( E ( R )) 2 = 2 − ( 4 / 3 ) 2 = 2 / 9 � SD ( R ) = 2 / 9 Prof. Tesler Ch. 3. Joint random variables (continuous) Math 186 / Winter 2019 13 / 30

  14. Mass density in physics vs. continuous pdf Physics Probability Mass density Probability density function ρ ( x , y ) � 0 f X , Y ( x , y ) � 0 Mass of shape D ⊆ R 2 : Probability of event D ⊆ R 2 : �� �� and P ( R 2 ) = 1 M = ρ ( x , y ) dA � 0 P ( D ) = f X , Y ( x , y ) dA D D Center of mass ( ¯ x , ¯ y ) Expected value �� �� x · ρ ( x , y ) dA E ( X )= x · f X , Y ( x , y ) dA = numerator of ¯ x . D x = ¯ �� R 2 ρ ( x , y ) dA The denominator of ¯ x is 1, since M = 1 . D y formula is similar ¯ E ( Y ) formula is similar When the total mass is 1, we have ( ¯ x , ¯ y ) = ( E ( X ) , E ( Y )) . We used R 2 . For R n , use ( x 1 , . . . , x n ) instead of ( x , y ) . Prof. Tesler Ch. 3. Joint random variables (continuous) Math 186 / Winter 2019 14 / 30

  15. Determining the constant y 1 x 2 Question: Determine the formula of the probability density if it is proportional to x + 4 y inside the rectangle and is 0 outside. We have f X , Y ( x , y ) = c ( x + 4 y ) inside the rectangle and 0 outside, for some constant c . Find c so that the total probability is 1 : � 2 � 1 P = c ( x + 4 y ) dy dx = 1 0 0 The inside integral is � y = 1 y = 0 = c ( x ( 1 − 0 ) + 2 ( 1 2 − 0 2 )) = c ( x + 2 ) c ( xy + 2 y 2 ) � � 2 Plug that back in: P = 0 c ( x + 2 ) dx Prof. Tesler Ch. 3. Joint random variables (continuous) Math 186 / Winter 2019 15 / 30

  16. Determining the constant y 1 x 2 Continue evaluating: 2 � 2 �� � x 2 = 0 c ( x + 2 ) dx = c 2 + 2 x P � � x = 0 � � 2 2 − 0 2 = c + 2 ( 2 − 0 ) = c · ( 2 + 4 ) = 6 c 2 To get P = 1 , solve 6 c = 1 , so c = 1 / 6 . Plug this value of c into the formula f X , Y ( x , y ) = c ( x + 4 y ) . Thus, the pdf is � x + 4 y inside rectangle: 0 � x � 2 and 0 � y � 1 6 f X , Y ( x , y ) = outside rectangle 0 Prof. Tesler Ch. 3. Joint random variables (continuous) Math 186 / Winter 2019 16 / 30

  17. Marginal densities for rectangle example y For 0 � x � 2 : 1 � 1 1 dy = xy + 2 y 2 � x + 4 y � f X ( x ) = x 2 � 6 6 � 0 y = 0 = x ( 1 − 0 ) + 2 ( 1 2 − 0 2 ) = x + 2 6 6 Otherwise, f X ( x ) = 0 . Prof. Tesler Ch. 3. Joint random variables (continuous) Math 186 / Winter 2019 17 / 30

  18. Marginal densities for rectangle example y For 0 � y � 1 : 1 � x 2 � 2 2 �� x + 4 y 12 + 4 xy � f Y ( y ) = dx = x 2 � 6 6 � 0 x = 0 � 2 2 − 0 2 � + 4 ( 2 − 0 ) y = 12 6 6 = 4 y + 1 = 4 12 + 8 y 3 Otherwise, f Y ( y ) = 0 . Prof. Tesler Ch. 3. Joint random variables (continuous) Math 186 / Winter 2019 18 / 30

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend