math 20 fall 2017
play

Math 20, Fall 2017 Edgar Costa Week 5 Dartmouth College Edgar - PowerPoint PPT Presentation

Math 20, Fall 2017 Edgar Costa Week 5 Dartmouth College Edgar Costa Math 20, Fall 2017 Week 5 1 / 29 Last Week Last week: Continuous random variable Expected Value Today: Variance Edgar Costa Math 20, Fall 2017 Week 5 2


  1. Math 20, Fall 2017 Edgar Costa Week 5 Dartmouth College Edgar Costa Math 20, Fall 2017 Week 5 1 / 29

  2. Last Week Last week: • Continuous random variable • Expected Value Today: • Variance Edgar Costa Math 20, Fall 2017 Week 5 2 / 29

  3. St. Petersburg paradox: Expected value second, 8 dollars if heads appears on the first two tosses and tails on the third, Week 5 Math 20, Fall 2017 Edgar Costa What would be a fair price to pay the casino for entering the game? tosses until we observe tails. the first toss, 4 dollars if heads appears on the first toss and tails on the We can think of the expected value as the “predicted” value of a random variable wins whatever is in the pot. Thus the player wins 2 dollars if tails appears on time heads appears. The first time tails appears, the game ends and the player tossed at each stage. The initial stake starts at 2 dollars and is doubled every A casino offers a game of chance for a single player in which a fair coin is St. Petersburg paradox (if we repeat the experiment infinitely many times). 3 / 29 and so on. Mathematically, the player wins 2 k dollars, where k equals number of

  4. St. Petersburg paradox : Expected value E What if the casino has finite resources? (or bounds the maximum jackpot) Edgar Costa Math 20, Fall 2017 Week 5 4 / 29 The payout is Y = 2 Geo ( 1 / 2 ) What is the expected payout? [ 2 Geo ( 1 / 2 ) ] = 21 2 + 4 1 4 + 8 1 8 + · · · = 1 + 1 + 1 + · · · = + ∞

  5. St. Petersburg paradox : with finite resources What if the casino has finite resources? (or bounds the maximum jackpot) Week 5 Math 20, Fall 2017 Edgar Costa it no longer fully covers the next bet 1 5 / 29 L If W = total maximum jackpot then ∞ ∑ ∑ E [ payout ] = 2 k + W 2 k = L + W 2 L << W , 2 k 1 k = 1 k = L + 1 where L = ⌊ log 2 ( W ) ⌋ = the maximum number of times the casino can play before

  6. St. Petersburg paradox: Some numbers What if the casino has finite W resources? W Expected value 100 7.56 1,000,000 20.91 1,000,000,000 30.86 10 100 333.14 Edgar Costa Math 20, Fall 2017 Week 5 6 / 29

  7. A simpler game Would you play this game? Edgar Costa Math 20, Fall 2017 Week 5 7 / 29 You toss a coin, if you get tails you owe me 10 7 dollars, if you get heads I owe you 10 7 + 5 dollars.

  8. Variance Definition . Example Compute the Expected value and Variance of Edgar Costa Math 20, Fall 2017 Week 5 8 / 29 Let µ X = E [ X ] The variance of X , denoted by V [ X ] , is V [ X ] = E [( X − µ X ) 2 ] √ The standard deviation of X , denoted by σ ( X ) or σ X is V [ X ] . X = “the outcome of a six faced die roll”

  9. Variance Theorem Week 5 Math 20, Fall 2017 Edgar Costa Compute the Expected value and Variance of Example X X X Proof: X 9 / 29 V [ X ] = E [ X 2 ] − µ 2 E [( X − µ X ) 2 ] = E [ X 2 − 2 µ X X + µ 2 X ] = E [ X 2 ] − 2 µ X E [ X ] + µ 2 = E [ X 2 ] − 2 µ X µ X + µ 2 = E [ X 2 ] − µ 2 X = “the outcome of a six faced die roll”

  10. Variance properties Edgar Costa Math 20, Fall 2017 Week 5 10 / 29 • V [ cX ] = c 2 V [ X ] • V [ X + c ] = V [ X ] What about V [ X + Y ] =?

  11. Variance of sum Theorem If X and Y are independent random variables Exercise Edgar Costa Math 20, Fall 2017 Week 5 11 / 29 V [ X + Y ] = V [ X ] + V [ Y ] Proof: expand E [( X + Y ) 2 ] and use E [ XY ] = E [ X ] E [ Y ] . V [ Bin ( n , p )] =?

  12. Variance of sums Exercise Theorem n Edgar Costa Math 20, Fall 2017 Week 5 12 / 29 Let S n = X 1 + · · · + X n , with X i independent, E [ X i ] = µ and V [ X i ] = σ 2 and A n = S n / n Compute the expected value, variance and the standard deviation of S n and A n E [ S n ] = n µ V [ S n ] = n σ 2 E [ A n ] = σ 2 E [ A n ] = µ

  13. Important Distributions: Uniform Distribution • All outcomes of an experiment are equally likely • we say “ X is uniformly distributed” Edgar Costa Math 20, Fall 2017 Week 5 13 / 29 • If X is discrete and n = #Ω then what is the distribution function?

  14. Important Distributions: Binomial Distribution • Repeat a Bernoulli process n times with probability p of success k Edgar Costa Math 20, Fall 2017 Week 5 14 / 29 • Bin ( n , p ) = X = ∑ n i = 0 X i where X i are iid to a Bernoulli ( p ) • Ω = { 0 , . . . , n } ( n ) • P ( X = k ) = p k ( 1 − p ) n − k with k ∈ Ω • E ( X ) = np and V ( X ) = np ( 1 − p )

  15. Important Distributions: Geometric distribution p Example In each time unit a customer arrives with probability p . What is the probability that no customer arrives in the next n units? Edgar Costa Math 20, Fall 2017 Week 5 15 / 29 • Geo ( p ) = X = the number of repeats of a Bernoulli ( p ) until success • P ( X = k ) = ( 1 − p ) k − 1 p • E ( X ) = 1 • V ( X ) = 1 − p p 2 (you prove this in Worksheet # 5)

  16. Modified Example Example In each time unit a customer arrives with probability p . What is the probability that it takes n times units for two customers to arrive? Edgar Costa Math 20, Fall 2017 Week 5 16 / 29

  17. Definition X = number of trials in a sequence of iid Bernoulli trials needed to get r success. Edgar Costa Math 20, Fall 2017 Week 5 17 / 29 Negative binomial distribution (Worksheet # 5 ) • Ω =? • P ( X = k ) =? • r = 1 ⇝ X = Geometric ( p ) • Why ∑ k ∈ Ω P ( X = k ) = 1?

  18. Poisson distribution n Week 5 Math 20, Fall 2017 Edgar Costa See tables in the GS book, page 196! Problem n 18 / 29 k model this? n Assume that you expect λ calls every day out of n possible calls. How would If we model this as a Binomial distribution we have np = λ ⇔ p = λ ) n − k ( n ) ( λ ) k ( 1 − λ P ( X = k ) = n ! ( n − k )! n k λ k ( 1 − λ/ n ) n − k = 1 k ! ( n − k )! n k → 1 and ( 1 − λ/ n ) n − k → 1) n ! What happens if we take n → + ∞ ? (Use: k ! λ k e − λ P ( X = k ) ≈ 1

  19. Comparison 12 .0217 16 .0345 .0347 15 .0520 .0521 14 .0731 .0729 13 .0952 .0948 .1143 17 .1137 11 .1257 .1251 10 .1256 .1251 9 .1128 .1126 .0000 .0000 8 .0215 .0128 .0901 .0004 Week 5 Math 20, Fall 2017 Edgar Costa Table 1: Poisson approximation to the binomial distribution. .0000 .0000 25 .0001 .0001 24 .0002 .0002 23 .0004 .0126 22 .0009 .0009 21 .0018 .0019 20 .0036 .0037 19 .0069 .0071 18 .0900 .0001 Poisson .0000 .1839 .0045 .0001 2 .0004 .0005 .3697 .3679 .0905 .0905 1 .0000 .0023 .3660 .3679 .9048 .9048 0 j Binomial Poisson Binomial Poisson Binomial .1849 .0045 .0022 .0186 7 .0627 .0631 .0005 .0005 6 .0374 3 .0029 .0031 5 .0378 .0189 .0149 .0002 .0002 .0613 .0610 .0076 .0074 19 / 29 4 .0000 .0000 .0153 n = 100 n = 100 n = 1000 λ = . 1 p = . 001 λ = 1 p = . 01 λ = 10 p = . 01

  20. Poisson distribution (see GS book for many examples) • The probability of an event in a interval is proportional to the length of the Week 5 Math 20, Fall 2017 Edgar Costa trials is sufficiently larger than the number of successes one is asking about. The actual probability distribution the binomial distribution and the number of or • Two events cannot occur exactly at the same time interval • Events occur independently. • The rate at which events occur is constant. Good assumptions to use the Poisson distribution: (you should be able to do it on your own) 20 / 29 • X = Poisson ( λ ) = “the number of events that take place in an interval” • P ( X = k ) = e − λ k ! λ k for k ∈ Ω = { 0 , 1 , 2 , 3 , . . . } • E [ X ] = λ • V [ X ] = λ (a bit more challenging, start by computing E [ X ( X − 1 )] )

  21. Exercise A typesetter makes, on the average, one mistake per 1000 words. Assume that he Week 5 Math 20, Fall 2017 Edgar Costa model! (see previous tables) 1 21 / 29 that he makes on a single page. • How would you model S 100 ? is setting a book with 100 words to a page. Let S 100 be the number of mistakes • P ( S 100 = 0 ) =? • P ( S 100 = 1 ) =? • P ( S 100 < 10 ) =? The exact probability distribution for S 100 is Bin ( 100 , p = 1 / 1000 ) However, the Poisson distribution with λ = 100 · 1000 = 0 . 1 is also an appropriate

  22. Exercise In a class of 80 students, the professor calls on 1 student chosen at random for a recitation in each class period. There are 32 class periods in a term. 1. Write a formula for the exact probability that a given student is called upon j times during the term. 2. Write a formula for the Poisson approximation for this probability. Using your formula estimate the probability that a given student is called upon more than twice. Edgar Costa Math 20, Fall 2017 Week 5 22 / 29

  23. Exercise (Hypergeometric Distribution) Four balls are drawn at random, without replacement, from an urn containing 4 Week 5 Math 20, Fall 2017 Edgar Costa With replacement X becomes binomial distribution. N , K , and n . Without replacement is known as Hypergeometric Distribution that depends on 23 / 29 1. What is the range of X ? 4. What if each time a ball is drawn, the ball is replaced in the urn. red balls and 3 blue. Let X be the number of red balls drawn. 2. What is the probability that X = 2? X = k ? 3. Find E [ X ] . Ω = { 1 , 2 , 3 , 4 } and P ( X = k ) = ( K k )( N − K n − k ) with N = 7, K = 4, and n = 4. ( N n )

Recommend


More recommend