a continuous probability distribution throwing darts at a
play

A continuous probability distribution: Throwing darts at a dartboard - PowerPoint PPT Presentation

A continuous probability distribution: Throwing darts at a dartboard (3.4) Prof. Tesler Math 186 Winter 2020 Prof. Tesler 3.4 Continuous probability distributions Math 186 / Winter 2020 1 / 23 Continuous distributions Example Pick a real


  1. A continuous probability distribution: Throwing darts at a dartboard (3.4) Prof. Tesler Math 186 Winter 2020 Prof. Tesler 3.4 Continuous probability distributions Math 186 / Winter 2020 1 / 23

  2. Continuous distributions Example Pick a real number x between 20 and 30 with all real values in [ 20 , 30 ] equally likely. Sample space: S = [ 20 , 30 ] Number of outcomes: | S | = ∞ Probability of each outcome: P ( X = x ) = 1 ∞ = 0 Yet, P ( X � 21 . 5 ) = 15 % Prof. Tesler 3.4 Continuous probability distributions Math 186 / Winter 2020 2 / 23

  3. Continuous distributions The sample space S is often a subset of R n . We’ll do the 1-dimensional case S ⊂ R . The probability density function (pdf) f X ( x ) is defined differently than the discrete case: f X ( x ) is a real-valued function on S with f X ( x ) � 0 for all x ∈ S . � (vs. � f X ( x ) dx = 1 p X ( x ) = 1 for discrete) x ∈ S S � (vs. � The probability of event A ⊂ S is P ( A ) = f X ( x ) dx p X ( x ) ). x ∈ A A In n dimensions, use n -dimensional integrals instead. Uniform distribution Let a < b be real numbers. The Uniform Distribution on [ a , b ] is that all numbers in [ a , b ] are “equally likely.” � 1 if a � x � b ; b − a More precisely, f X ( x ) = otherwise. 0 Prof. Tesler 3.4 Continuous probability distributions Math 186 / Winter 2020 3 / 23

  4. Uniform distribution (real case) The uniform distribution on [ 20 , 30 ] We could regard the sample space as [ 20 , 30 ] , or as all reals. 0.10 f X ( x ) � 1 / 10 for 20 � x � 30 ; f X ( x ) = 0.00 otherwise. 0 0 10 20 30 40 x � 20 � 21 . 5 21 . 5 10 dx = 0 + x 1 � P ( X � 21 . 5 ) = 0 dx + � 10 � 20 20 − ∞ = 21 . 5 − 20 0.10 10 f X ( x ) = . 15 = 15 % 0.00 0 10 20 30 40 x Prof. Tesler 3.4 Continuous probability distributions Math 186 / Winter 2020 4 / 23

  5. Probability of a point, in the continuous case 0.10 f X ( x ) ) 0.00 0 10 20 30 40 x Probability of a point For any continuous random variable, the probability of a point, b , is � b P ( X = b ) = b f X ( x ) dx = area of line segment = 0 . The probability density f X ( b ) may be nonzero, but integrating over a single point gives probability = 0 . P ( X � b ) = P ( X < b ) + P ( X = b ) Continuous case: P ( X = b ) = 0 , so P ( X � b ) = P ( X < b ) . Similarly, P ( a � X ) = P ( a < X ) . Discrete case: P ( X = b ) = p X ( b ) � 0 . If nonzero, then P ( X � b ) � P ( X < b ) . Prof. Tesler 3.4 Continuous probability distributions Math 186 / Winter 2020 5 / 23

  6. Dartboard 3 A dart is repeatedly thrown at 2 a dartboard. 1 Shape: Circle of radius 3 0 centered at the origin. Assume all points on the ! 1 board are hit with equal ! 2 (“uniform”) probability (and ignore the darts that miss). ! 3 ! 3 ! 2 ! 1 0 1 2 3 Prof. Tesler 3.4 Continuous probability distributions Math 186 / Winter 2020 6 / 23

  7. Data i x y r 3 1 . 575 1 . 022 1 . 878 1 2 − 1 . 640 1 . 265 2 . 071 2 − 1 . 625 0 . 607 1 . 734 3 1 − 1 . 143 − 1 . 947 2 . 257 4 − 1 . 054 − 0 . 822 1 . 337 5 0 · · · · · · · · · · · · ! 1 1 . 747 0 . 850 1 . 943 999 1 . 519 − 1 . 429 2 . 086 1000 ! 2 ! 3 Hits i = 1 , 2 , . . . , 1000 . ! 3 ! 2 ! 1 0 1 2 3 Coordinates ( x i , y i ) . Distance to center x i 2 + y i 2 . � r i = What is the distribution of r ? Prof. Tesler 3.4 Continuous probability distributions Math 186 / Winter 2020 7 / 23

  8. Histograms – Frequency Histogram Freq. histogram, 5 bins 5 bins 400 w = bin width = 3 / 5 = 0 . 6 Bins ( x -axis): 300 Frequency 0 � r < 0 . 6 has n 1 =37 points 0 . 6 � r < 1 . 2 has n 2 = 126 200 1 . 2 � r < 1 . 8 has n 3 = 198 100 1 . 8 � r < 2 . 4 has n 4 = 275 2 . 4 � r � 3 . 0 has n 5 = 364 0 Total n = n 1 + · · · + n 5 = 1000 0 1 2 3 Notation y -axis: Set bar height = n j n = # points = 1000 Area of bin j : w = bin width = 3 / (# bins) width × height = w · n j n j = # points in bin j Area of histogram: A = w ( n 1 + n 2 + · · · ) = w · n Prof. Tesler 3.4 Continuous probability distributions Math 186 / Winter 2020 8 / 23

  9. Freq. histogram, 5 bins Freq. histogram, 10 bins 400 200 300 150 Frequency Frequency 200 100 100 50 0 0 0 1 2 3 0 1 2 3 w = 3 / 5 , A = ( 3 / 5 )( 1000 ) = 600 w = 3 / 10 , A = ( 3 / 10 )( 1000 ) = 300 Freq. histogram, 31 bins Freq. histogram, 1000 bins 80 6 60 Frequency Frequency 4 40 2 20 0 0 0 1 2 3 0 1 2 3 w = 3 / 31 , A = ( 3 / 31 )( 1000 ) ≈ 96 . 77 w = 3 / 1000 , A = ( 3 / 1000 )( 1000 ) = 3 Prof. Tesler 3.4 Continuous probability distributions Math 186 / Winter 2020 9 / 23

  10. Relative frequency histogram Freq. histogram, 5 bins Relative freq. histogram, 5 bins 400 0.4 Relative frequency 300 0.3 Frequency 200 0.2 100 0.1 0 0 0 1 2 3 0 1 2 3 Relative frequency: the fraction of points in bin j is n j / n . Plot a bar of height n j / n instead of height n j . Bar j area = w · n j / n Total area = w · ( n 1 + n 2 + · · · ) / n = w · n / n = w . Graphs look the same, just the y -axis scale changes. Prof. Tesler 3.4 Continuous probability distributions Math 186 / Winter 2020 10 / 23

  11. Relative freq. histogram, 5 bins Relative freq. histogram, 10 bins 0.4 0.2 Relative frequency Relative frequency 0.3 0.15 0.2 0.1 0.1 0.05 0 0 0 1 2 3 0 1 2 3 w = 3 / 5 , A = 3 / 5 w = 3 / 10 , A = 3 / 10 Relative freq. histogram, 31 bins Relative freq. histogram, 1000 bins 6x 10 ! 3 0.08 Relative frequency Relative frequency 0.06 4 0.04 2 0.02 0 0 0 1 2 3 0 1 2 3 w = 3 / 31 , A = 3 / 31 w = 3 / 1000 , A = 3 / 1000 Prof. Tesler 3.4 Continuous probability distributions Math 186 / Winter 2020 11 / 23

  12. Probability density histogram Freq. histogram, 5 bins Probability density, 5 bins 400 0.8 Probability density 300 0.6 Frequency 200 0.4 100 0.2 0 0 0 1 2 3 0 1 2 3 Probability density per unit x : the fraction of points in bin j is n j / n , and bin j has width w , giving density n j / ( nw ) . Plot a bar of height n j / ( nw ) Bar j area = w · n j / ( nw ) = n j / n Total area = ( n 1 + n 2 + · · · ) / n = n / n = 1 . Graphs look the same, just the y -axis scale changes. Prof. Tesler 3.4 Continuous probability distributions Math 186 / Winter 2020 12 / 23

  13. Probability density, 5 bins Probability density, 10 bins 0.8 0.8 Probability density Probability density 0.6 0.6 0.4 0.4 0.2 0.2 0 0 0 1 2 3 0 1 2 3 w = 3 / 5 , A = 1 w = 3 / 10 , A = 1 Probability density, 31 bins Probability density, 1000 bins 0.8 2 Probability density Probability density 0.6 1.5 0.4 1 0.2 0.5 0 0 0 1 2 3 0 1 2 3 w = 3 / 31 , A = 1 w = 3 / 1000 , A = 1 Prof. Tesler 3.4 Continuous probability distributions Math 186 / Winter 2020 13 / 23

  14. How many bins? How many bins to use? For n = 1000 points, 5 , 10 , 31 bins all looked reasonable, while 1000 bins did not (too many empty or overfilled bins). Usually use a small fixed number of bins, much smaller than the number of points. In the discrete case, sometimes it’s a concern to pick bin boundaries so that the points don’t hit the boundaries. Effect on y -axis of changing number of bins Frequency and relative frequency histograms: Increasing the number of bins cuts the y -axis proportionately. Probability density histogram: Increasing the number of bins keeps the y -axis stable, as long as the number of bins is much smaller than the number of points. Prof. Tesler 3.4 Continuous probability distributions Math 186 / Winter 2020 14 / 23

  15. Limit as # points and bins → ∞ n → ∞ and number of bins → ∞ but slower (e.g., √ n bins) Probability density, 5 bins Probability density, 10 bins 0.8 0.8 Probability density Probability density 0.6 0.6 0.4 0.4 0.2 0.2 0 0 0 1 2 3 0 1 2 3 Probability density, 31 bins Probability density function 0.8 0.8 Probability density 0.6 0.6 density f(r) 0.4 0.4 0.2 0.2 0 0 0 1 2 3 0 1 2 3 Prof. Tesler 3.4 Continuous probability distributions Math 186 / Winter 2020 15 / 23

  16. Probability density function (PDF) of a continuous random variable Let X , Y be random variables for the coordinates of a random point in the √ X 2 + Y 2 . r circle and R = 3 R (X,Y) For each r between 0 and 3, P ( R � r ) = Area of circle of radius r (centered at origin) ÷ Area of whole circle = ( π r 2 ) / ( π 3 2 ) = r 2 / 9 Also, P ( R � r ) = 0 if r < 0 and P ( R � r ) = 1 if r > 3 . Prof. Tesler 3.4 Continuous probability distributions Math 186 / Winter 2020 16 / 23

  17. Probability density function (PDF) of a continuous random variable Together:  if r < 0 ; 0   r 2 / 9 P ( R � r ) = if 0 � r � 3 ;   if r � 3 . 1 But the area up to r in the probability density histogram is � r P ( R � r ) = f ( t ) dt 0 so for 0 � r � 3 , r 2 f ( r ) = d drP ( R � r ) = d 9 = 2 r dr 9 If r < 0 then f ( r ) = d if r > 3 then f ( r ) = d dr 0 = 0 ; dr ( 1 ) = 0 Prof. Tesler 3.4 Continuous probability distributions Math 186 / Winter 2020 17 / 23

Recommend


More recommend