Continuous Probability 3 2 Continuous Probability Motivation I Sometimes you can’t model things discretely. Random real numbers. Points on a map. Time. Probability space is continuous . What is an event in continuous probability? Motivation II CS70 Summer 2016 - Lecture 6A Class starts at 14:10. You take your seat at some ”uniform” random time between 14:00 and 14:10. What’s an event here? Probability of coming in at exactly 14:03:47.32? Sample space: all times between 14:00 and 14:10. Size of sample space? How many numbers are there between 0 and Chance of getting one event in an infinite sized uniform sample Not so simple to define events in continuous probability! • Some common distributions. • Expectation and variance in the continuous setting. • What is continuous probability? Today David Dinh 25 July 2016 UC Berkeley Logistics Tutoring Sections - M/W 5-8PM in 540 Cory. • Conceptual discussions of material • No homework discussion (take that to OH/HW party, please) Midterm is this Friday - 11:30-1:30, same rooms as last time. • Covers material from MT1 to this Wednesday... • ...but we will expect you to know everything we’ve covered from the start of class. • One double -sided sheet of notes allowed (our advice: reuse sheet from MT1 and add MT2 topics to the other side). • Students with time conflicts and DSP students should have been contacted by us - if you are one and you haven’t heard from us, get in touch ASAP. 1 4 What is probability? Function mapping events to [ 0 , 1 ] . 10? infinite space? 0
Motivation III Or, in terms of PDF... (PDF). 6 Formally speaking... Another way of looking at it: a f is nonnegative (negative probability doesn’t make much sense). Total probability is 1: 7 CDF lim PDF (no, not the file format) lim 8 In Pictures 9 Expectation Expectation of a function? Linearity of expectation: Proof: similar to discrete case. Proof: also similar to discrete case. Exercise: try proving these yourself. space into k pieces - multiply each one by k . 10 5 Look at intervals instead of specific times. 1/k. What happens when you take k → ∞ ? Probability goes to 0. 1.0 1.0 1.0 PDF f X ( t ) of a random variable X is defined so that the probability of What do we do so that this doesn’t disappear? If we split our sample X taking on a value in [ t , t + δ ] is δ f ( t ) for infinitesimally small δ . 0.8 0.8 0.8 0.6 0.6 0.6 Pr [ X ∈ [ t , t + δ ]] f X ( t ) = lim 0.4 0.4 0.4 1.0 1.0 1.0 δ δ → 0 0.2 0.2 0.2 0.8 0.8 0.8 0.0 0.0 0.0 0.6 0.6 0.6 ∫ b 0.4 0.4 0.4 Pr [ X ∈ [ a , b ]] = f X ( t ) dt 0.2 0.2 0.2 Probability that you come in between 14:00 and 14:10? 1. 0.0 0.0 0.0 Probability that you come in between 14:00 and 14:05? 1/2. ∫ ∞ −∞ f X ( t ) dt = 1 The resulting curve as k → ∞ is the probability density function Probability that you come between 14:03 and 14:04? 1/10. Probability that you come in some time interval of 10 / k minutes? Discrete case: E [ X ] = ∑ ∞ Cumulative distribution function (CDF): F X ( t ) = Pr [ X ≤ t ] . t = −∞ ( Pr [ X = t ] t ) Continuous case? Sum → integral. ∫ ∞ E [ X ] = tf X ( t ) dt ∫ t −∞ F X ( t ) = f X ( z ) dz −∞ ∫ ∞ E [ g ( X )] = g ( t ) f X ( t ) dt Pr [ X ∈ ( a , b ]] = Pr [ X ≤ b ] − Pr [ X ≤ a ] −∞ = F X ( b ) − F X ( a ) E [ aX + bY ] = aE [ X ] + bE [ Y ] F X ( t ) ∈ [ 0 , 1 ] t →−∞ F X ( t ) = 0 If X , Y , Z are mutually independent, then E [ XYZ ] = E [ X ] E [ Y ] E [ Z ] . t →∞ F X ( t ) = 1
Variance Target shooting III CDF: 0 t 2 1 PDF? 2 t Variance is defined exactly like it is for the discrete case. 0 otherwise 13 Another way of attacking the same problem: what’s the probability 12 t Area of ring: 14 Shifting & Scaling b b b b b b 15 Target shooting II Continuous Distributions Probability that arrow is closer than t to the center? area of dartboard well. The standard properties for variance hold in the continuous case as 1 t area of small circle the center (call this r.v. X )? target. What is the distribution the distance between his arrow and For independent r.v. X , Y : and the exact point that he hits is distributed uniformly across the Suppose an archer always hits a circular target with 1 meter radius, Target shooting . 11 Var ( X ) = E [( X − E [ X ]) 2 ] = E [ X 2 ] − E [ X ] 2 for t < 0 F Y ( t ) = Pr [ Y ≤ t ] = for 0 ≤ t ≤ 1 for t > 1 Var ( aX ) = a 2 Var ( X ) { for 0 ≤ t ≤ 1 f Y ( t ) = F Y ( t ) ′ = Pr [ X ≤ t ] = Var ( X + Y ) = Var ( X ) + Var ( Y ) π t 2 = π = t 2 . Let f X ( x ) be the pdf of X and Y = a + bX where b > 0. Then of hitting some ring with inner radius t and outer radius t + δ for small δ ? Pr [ Y ∈ ( y , y + δ )] = Pr [ a + bX ∈ ( y , y + δ )] t + δ Pr [ X ∈ ( y − a , y + δ − a = )] Pr [ X ∈ ( y − a , y − a + δ = b )] f X ( y − a ) δ = b . Area of circle: π Left-hand side is f Y ( y ) δ . Hence, π (( t + δ ) 2 − t 2 ) = π ( t 2 + 2 t δ + δ 2 − t 2 ) = π ( 2 t δ + δ 2 ) ≈ π 2 t δ bf X ( y − a f Y ( y ) = 1 ) . Probability of hitting the ring: 2 t δ . PDF for t ≤ 1: 2 t
Uniform Distribution: CDF and PDF 18 Look at geometric distributions representing processes with higher Can’t “continuously flip a coin”. What do we do? pokemon? How long until a server fails? How long does it take you to run into Continuous-time analogue of the geometric distribution. Exponential Distribution: Motivation 12 19 t 2 a Variance? 2 2 t a and higher granularity. Exponential Distribution: Motivation II Uniform Distribution: Expectation and Variance n This is the PDF of the exponential distribution ! n n lim to get: Probability goes to zero...but we can make a PDF out of this! n Probability that server fails on the same day as time t : Exponential Distribution: Motivation III 20 n n period. fail than another. More precision! What’s the probability that it fails in a 12-hour Expectation? t 3 17 0 What’s the value of the constant in the interval? a CDF? 16 Uniform Distribution: CDF and PDF, Graphically b<t 0 otherwise 21 1 t < a { 1 / ( b − a ) a < t < b f X ( t ) = F X ( t ) = ( t − a ) / ( b − a ) a < t < b PDF is constant over some interval [ a , b ] , zero outside the interval. b 2 − a 2 ∫ b b − a = b + a E [ X ] = b − adt = 1 ∫ ∞ ∫ b kdt = kdt = b − a = 1 −∞ so PDF is 1 / ( b − a ) in [ a , b ] and 0 otherwise. Var [ X ] = E [ X 2 ] − E [ X ] 2 ∫ b ( b + a ) 2 = b − a dt − ∫ t ‘ 2 1 / ( b − a ) dz � ( b + a ) 2 −∞ = a − � b 3 ( b − a ) ‘ 2 0 for t < a , ( t − a ) / ( b − a ) for a < t < b , and 1 for t > b . = ( a − b ) 2 Suppose a server fails with probability λ every day. ) ⌈ tn ⌉− 1 λ ( 1 − λ What happens when we try to take n to ∞ ? ( 1 − λ ) ⌈ t ⌉− 1 λ Remove the width of the interval (1 / n ) and take the limit as n → ∞ period? λ/ 2 if we assume that there is no time that it’s more likely to Generally: server fails with probability λ/ n during any 1 / n -day time ) ⌈ tn ⌉− 1 ( 1 − λ ) tn − 1 1 − λ ( λ = λ lim n →∞ Probability that server fails on the same 1 / n -day time period as t : n →∞ λ e − λ t = ) ⌈ tn ⌉− 1 λ ( 1 − λ
Recommend
More recommend