Balls, Urns, and the Supreme Court Justice Breyer Meets CS109 • Supreme Court case: Berghuis v. Smith • Should model this combinatorially If a group is underrepresented in a jury pool, how do you tell? Ball draws not independent trials (balls not replaced) Article by Erin Miller – Friday, January 22, 2010 • Exact solution: 940 1000 Thanks to Josh Falk for pointing out this article P(draw 12 black balls) = 0.4739 12 12 Justice Breyer [Stanford Alum] opened the questioning by P(draw ≥ 1 red ball) = 1 – P(draw 12 black balls) 0.5261 invoking the binomial theorem. He hypothesized a scenario involving “an urn with a thousand balls, and sixty are red, • Approximation using Binomial distribution and nine hundred forty are black, and then you select them Assume P(red ball) constant for every draw = 60/1000 at random… twelve at a time.” According to Justice Breyer X = # red balls drawn. X ~ Bin(12, 60/1000 = 0.06) and the binomial theorem, if the red balls were black jurors then “you would expect… something like a third to a half of P(X ≥ 1 ) = 1 – P(X = 0) 1 – 0.4759 = 0.5240 juries would have at least one black person” on them. In Breyer’s description, should actually expect just over half Justice Scalia’s rejoinder: “We don’t have any urns here.” • of juries to have at least one black person on them From Discrete to Continuous • So far, all random variables we saw were discrete Have finite or countably infinite values (e.g., integers) Usually, values are binary or represent a count • Now it’s time for continuous random variables Demo Have (uncountably) infinite values (e.g., real numbers) Usually represent measurements (arbitrary precision) o Height (centimeters), Weight (lbs.), Time (seconds), etc. • Difference between how many and how much b b • Generally, it means replace with f ( x ) f ( x ) dx x a a Continuous Random Variables Probability Density Functions • X is a Continuous Random Variable if there is • Say f is a Probability Density Function (PDF) function f ( x ) ≥ 0 for - ≤ x ≤ , such that: P ( X ) f ( x ) dx 1 b P ( a X b ) f ( x ) dx f ( x ) is not a probability, it is probability/units of X a Not meaningful without some subinterval over X a • f is a Probability Density Function (PDF) if: P ( X a ) f ( x ) dx 0 a P ( X ) f ( x ) dx 1 Contrast with Probability Mass Function (PMF) in discrete case: p ( a ) P ( X a ) where p ( x ) 1 for X taking on values x 1 , x 2 , x 3 , ... i i 1 1
Cumulative Distribution Functions Simple Example • For a continuous random variable X, the • X is continuous random variable (CRV) with PDF: Cumulative Distribution Function (CDF) is: 2 C ( 4 x 2 x ) whe n 0 x 2 f ( x ) a 0 otherwise F ( a ) P ( X a ) P ( X a ) f ( x ) dx What is C ? d 2 3 2 x 2 • Density f is derivative of CDF F : ( ) ( ) f a F a 2 2 C ( 4 x 2 x ) dx 1 C 2 x 1 da 3 0 0 16 8 3 • For continuous f and small : 8 0 1 1 C C C 3 3 8 a / 2 P ( a X a ) f ( x ) dx f ( a ) What is P(X > 1)? 2 2 a / 2 2 3 3 2 x 2 3 16 2 1 3 2 2 f ( x ) dx ( 4 x 2 x ) dx 2 x 8 2 8 8 3 8 3 3 2 1 1 1 Disk Crashes Expectation and Variance • X = hours before your disk crashes For discrete RV X : For continuous RV X : x / 100 e x 0 E [ X ] x f ( x ) dx E [ X ] x p ( x ) f ( x ) 0 otherwise x First, determine to have actual PDF E [ g ( X )] g ( x ) p ( x ) E [ g ( X )] g ( x ) f ( x ) dx u u o Good integral to know: e du e x 1 1 x / 100 x / 100 x / 100 1 e dx 100 e dx 100 e 100 100 100 n n E [ X ] x p ( x ) n n 0 E [ X ] x f ( x ) dx What is P(50 < X < 150)? x 150 For both discrete and continuous RVs: 1 150 x / 100 x / 100 3 / 2 1 / 2 F ( 150 ) F ( 50 ) e dx e e e 0 . 383 100 50 E [ aX b ] aE [ X ] b 50 What is P(X < 10)? 2 2 2 Var ( X ) E [( X ) ] E [ X ] ( E [ X ]) 10 1 10 x / 100 x / 100 1 / 10 F ( 10 ) e dx e e 1 0 . 095 100 0 2 Var ( aX b ) a Var ( X ) 0 Linearly Increasing Density Uniform Random Variable • X is a Uniform Random Variable : X ~ Uni( a , b ) • X is a continuous random variable with PDF: Probability Density Function (PDF): 2 x 0 x 1 f ( x ) f ( x ) 1 f ( x ) a b 0 otherwise b a x f ( x ) 1 b x a 0 otherwise What is E[X]? x b 1 b a 2 2 2 3 P ( a x b ) f ( x ) dx [ ] ( ) 2 1 E X x f x dx x dx x b a 3 0 3 a 0 b a a b 2 2 What is Var(X)? x E [ X ] x f ( x ) dx dx 1 b a b a 1 1 2 ( ) 2 2 2 3 4 1 E [ X ] x f ( x ) dx 2 x dx x 2 0 2 b a 2 0 ( ) Var ( X ) 2 1 2 1 12 2 2 Var ( X ) E [ X ] ( E [ X ]) 2 3 18 2
Fun with the Uniform Distribution Riding the Marguerite Bus • X ~ Uni(0, 20) • Say the Marguerite bus stops at the Gates bldg. at 15 minute intervals (2:00, 2:15, 2:30, etc.) 1 0 x 20 20 f ( x ) Passenger arrives at stop uniformly between 2-2:30pm 0 otherwise X ~ Uni(0, 30) P(X < 6)? • P(Passenger waits < 5 minutes for bus)? 6 1 6 P ( x 6 ) dx Must arrive between 2:10-2:15pm or 2:25-2:30pm 20 20 15 30 5 5 1 0 1 1 P ( 10 X 15 ) P ( 25 x 30 ) dx dx 30 30 30 30 3 P(4 < X < 17)? 10 25 17 • P(Passenger waits > 14 minutes for bus)? 1 17 4 13 P ( 4 x 17 ) dx 20 20 20 20 Must arrive between 2:00-2:01pm or 2:15-2:16pm 4 1 16 1 1 1 1 1 P ( 0 X 1 ) P ( 15 x 16 ) dx dx 30 30 30 30 15 0 15 When to Leave For Class Minimization via Differentiation • Biking to a class on campus • What to minimize w.r.t. t : t Leave t minutes before class starts E [ C ( X , t )] c ( t x ) f ( x ) dx k ( x t ) f ( x ) dx X = travel time (minutes). X has PDF: f ( x ) 0 t If early, incur cost: c/min. If late, incur cost: k/min. Differentiate E[C( X , t )] w.r.t. t , and set = 0 (to obtain t* ): c ( t X ) o Leibniz integral rule: if x t Cost : C ( X , t ) f ( t ) f ( t ) k ( X t ) if x t d 2 df ( t ) df ( t ) 2 g ( x , t ) 2 1 g ( x , t ) dx g ( f ( t ), t ) g ( f ( t ), t ) dx 2 1 Choose t (when to leave) to minimize E[C( X , t )]: dt dt dt t f ( t ) f ( t ) 1 1 t [ ( , )] ( , ) ( ) ( ) ( ) ( ) ( ) E C X t C X t f x dx c t x f x dx k x t f x dx t d E [ C ( X , t )] c ( t t ) f ( t ) cf ( x ) dx k ( t t ) f ( t ) kf ( x ) dx 0 0 t dt 0 t k 0 cF ( t *) k [ 1 F ( t *)] F ( t *) c k 3
Recommend
More recommend