Distributions Discrete and Continuous rd 12192021 1 Discrete
Distributions Discrete and Continuous rd 12/19/2021 1
Discrete Uniform f(x) = for x = x 1, x 2 …, xn. X P(X) X 1 1/n X 2 1/n … … Xn 1/n E(X) = If the xi are consecutive integers from a to b, then E(X) = (a + b)/2 and V(X) = (n 2 – 1)/12. 12/19/2021 2
Mean & Variance of Distribution E(X) = V(X) = 2 = E(X 2) – [E(X)]2 V(X) = rd 12/19/2021 3
Discrete Uniform Example 1 Let RV X be discrete uniform on the integers in [5, 15]. Find E(X) and V(X) E(X) = 1/10 5 15 V(X) = 12/19/2021 4
Discrete Uniform Example 2 Suppose RV X is discrete uniform on the integers in [2, 12] and RV Y is the outcome sum of rolling a fair pair of dice. Find E(X), E(Y), V(X) and V(Y). E(X) = (2 + 12)/2 = 7; E(Y) = E(Y 1) + E(Y 2) = 3. 5 + 3. 5 = 7 V(X) = (112 – 1)/12 = 10; V(Y) = 2(62 – 1)/12 = 35/6. 12/19/2021 5
BERNOULLI DISTRIBUTION P(X = x) = pxq 1 -x X P(X) 0 1 q E(X) = p; Indicator RV p E(X 2) = p; V(X) = p – p 2 = p(1 – p) = pq. rd 12/19/2021 6
Bernoulli Process 1. The outcome of each trial can be designated success or failure. 2. The experiment consists of n repeated trials. 3. The probability of success p remains constant from trial to trial. 4. The repeated trials are independent. 12/19/2021 7
BINOMIAL DISTRIBUTION P(X = x) = E(X) = np V(X) = npq rd 12/19/2021 8
Binomial Example Compute the probability of rolling a fair pair of dice 5 times and getting exactly 2 sums of 5. p = P(S 5) = 4/36 = 1/9; n = 5, X = 2. P(X = 2) = 12/19/2021 9
Interrupted Gambling Fair Coin tossing for $25 to go to the one who wins 10 tosses. One has won 7; the other 5. The game is interrupted and Pascal and Fermat were asked how to fairly divide the pot. The remaining tosses that guarantee a winner is 3 + 5 -1 = 7 more tosses. (cbinomial 7 1/2 4) 0. 773438; 4 or less wins => 7 wins 7 -winner gets 0. 773438 of ($25) = $19. 34 5 -winner gets (* (cbinomial 7 1/2 2) 25) $5. 66 rd 12/19/2021 10
GEOMETRIC P(X) = qx-1 p E(X) = 1/p V(X) = q/p 2 rd 12/19/2021 11
Geometric Example 1 in every 100 of a process is defective. Compute the probability that the 3 rd item inspected is the first defective. p = 1/100; x = 3 P(X = 3) = q 2 p = 0. 992 * 0. 01 = 0. 009801. Software: (geometric p x) (geometric 1/100 3) 0. 009801 12/19/2021 12
HYPERGEOMETRIC P(X = x) = E(X) = V(X) = rd 12/19/2021 13
Hypergeometric Example There are 5 good and 4 bad chips in a bin. Three are selected at random. Determine the mean and variance of the good chips in the sample. Let X = # of good chips in sample X P(X) 0 0. 0476 1 0. 357 2 3 0. 478 0. 119 E(X) = 1. 67 = 3 * 5/(5 + 4) = 15/9 = 5/3 E(X 2) = 3. 333 V(X) = 0. 555 = 3*5/9 * 4/9 * (5 + 4 – 3)/8. 12/19/2021 14
NEGATIVE BINOMIAL P(X = x) = E(X) = V(X) = rd 12/19/2021 15
Negative Binomial Example Find the probability that the 7 th flip is the 2 nd head with P(H) = 1/4 and P(T) = 3/4 p= Software: (negbin p k x) ~ (negbin 1/4 2 7) 0. 08898. RV X is the number of flips for the kth success. 12/19/2021 16
POISSON P(X = x) = E(X) = V(X) = rd 12/19/2021 17
Poisson Process 1. The number of outcomes occurring in space or time intervals is independent of the number occurring in other disjoint space or time intervals. 2. The probability of a single occurrence is proportional to the space or time interval. 3. The probability that more than one occurrence in negligible. 12/19/2021 18
Poisson Example The number of phone calls is 5 per hour. Find the probability of at least one phone call in the next 36 minutes. = 3 and 1 – P(X = 0) = 1 – (e-3 *30/0!) = 0. 9502. Suppose an average of 60 aircraft land at an airport per hour. Compute P(X = 60) and P(X > 490 in 8 hours) (poisson 60 60) = 0. 0514317. (- 1 (cpoisson 480 490)) = 0. 3138002. 12/19/2021 19
MULTINOMIAL f(x 1, x 2, …xk) = n= rd 12/19/2021 20
Continuous Uniform f(x) = E(X) = V(X) = f(x) 1/(b – a) a b rd 12/19/2021 21
f(x) = 2 x on [0, 1] V(X) = E(X 2) – [E(X)2] = ½ - 4/9 = 1/18 rd 12/19/2021 22
Multinomial Example A fair pair of dice are rolled 6 times. Compute the probability of sums of 2 S 7, 3 S 4 and 1 S 8. P(S 7) = 1/6; P(S 4) = 1/12; P(S 8) = 5/36 p= 12/19/2021 23
Given RV X with density f(x) = 1 on [1, 2], explain how to get a simulated value of (mu (mapcar #‘ Log (sim-uniform 1 2 100))) 0. 39257. Integration by parts = x Ln x |12 – 1 = 2 Ln 2 – 1 = 0. 3863. Let u = Ln x; dv = dx du = dx/x and v = x rd 12/19/2021 24
Subway trains run every 3 minutes. a) Find the probability a randomly arriving passenger will have to wait longer than 1 minute. b) Compute the probability that the waiting time is within 1 standard deviation of its mean. a) f(x) = 1/3 on [0, 3]. P(X > 1) = b) V(X) = 3/4 => = 0. 866 with = 1. 5. P(- < < ) = P(0. 634 < X < 2. 366) = 0. 577. Note that = rd 12/19/2021 25
Gamma Function Use the gamma function to evaluate By inspection (5) = 4! = 24. rd 12/19/2021 26
Gamma Density f(x; , k) = E(X) = V(X) = rd 12/19/2021 27
Poisson & Gamma Suppose phone calls follow a Poisson process with k = 5 per minute. Compute the probability that up to a minute will elapse before 2 calls come in. Gamma k = 5 and = 2. P(X x) = P(X 1) = 25 rd 12/19/2021 28
Exponential Density f(x; k) = ke-kx for x > 0. E(X) = 1/k using the gamma function with y = kx and integration by parts. V(X) = 1/k 2. rd 12/19/2021 29
Exponential Example The response time of a computer is exponential with parameter k = 2 seconds. Find P(X < 1) = (L-exponential 2 1) 0. 864665. rd 12/19/2021 30
Exponential & Poisson Service time at a tollgate is exponential with a mean of 10 seconds. Find the probability that the time to wait is less than 20 seconds. Verify using the Poisson. f(x) = (1/10)e-x/10 k = 1/10; P(X < 20) = (exponential 1/10 20) 0. 8647 The time between occurrences is 10 seconds => 6 per min. For 20 seconds 2 would occur. Poisson probability for at least one in 20 seconds is (- 1 (Poisson 2 0)) 0. 8647. rd 12/19/2021 31
Exponential & Poisson Mean arrival rate at a shop is 15 per hour. Find probability the next customer arrives after 12 minutes using the exponential and the Poisson distributions. (U-exponential 1/4 12) 0. 049787 (Poisson 3 0) 0. 049787 k = 1/15; P(X > 12) = 15 per hour P(X = 0 in 12 minutes) = (Poisson 12/15 0) 0. 449. rd 12/19/2021 32
Chi-Square Density f(x; v) = E(X) = . Degrees of Freedom is . V(X) = 2. Chi-square is a sum of unit normals squared (Z 2) rd 12/19/2021 33
Normal Density f(x) = E(X) = V(X) = 2. rd 12/19/2021 34
Integrals Recognize the values of the following integrals; rd 12/19/2021 35
Compute the probability that a coin with probability of heads 3/8 will have 200 heads in 500 flips. Binomial: n, p, x. C => Cumulative (cbinomial 500 3/8 200) 0. 8848. Normal approximation of the Binomial = np = 500*3/8 = 187. 5; 2 = npq = 500*(3/8)*(5/8) = 117. 19 P(X 200) = np npq (L-normal 1500/8 7500/64 200) 0. 8851 rd 12/19/2021 36
Poisson Binomial Compute the probability of getting 5 or less heads from tossing a coin 20 times with P(Heads) = 1/10. Binomial: (cbinomial 20 1/10 5) 0. 9887 Poisson: (cpoisson 2 5) 0. 9834. Normal: (L-normal 2 1. 8 5) 0. 9873. rd 12/19/2021 37
f(x) = 2 x on [0, 1] E(X) = E(X 2) = V(X) = E(X 2) – [E(X)]2 = ½ - (2/3)2 = 1/18 P(X < ½) = rd 12/19/2021 38
f(x) = 2 x on [0, 1] Note: V(X) = E(X 2) – [E(X)2] = ½ - 4/9 = 1/18 rd 12/19/2021 39
Fundamental Theorem of Statistics X ~ N( , 2) ~ N( , 2/n) - ~ N(0, 1) is standard normal or unit normal /n (n – 1)S 2 ~ 2 with n – 1 degrees of freedom 2 - ~ Student-t or T-distribution S/n rd 12/19/2021 40
Standard Normal Distribution See Page 811 of Text (phi 1) 0. 841345 (inv-phi 0. 841345) 1 (del-phi -1 1) 0. 682689 (phi 2) 0. 97725 (del-phi -2 2) 0. 9545 (del-phi -3 3) 0. 9973 rd 12/19/2021 41
Standardized Scores Normal Scores are ~ N(480, 8100) a) What proportion of scores exceed 700? (U-normal 480 8100 700) 0. 007253766 b) Find the 25 th percentile. (inverse-normal 480 8100 0. 25) 419. 322976 c) What percentile is a score of 600? (normal 480 8100 600) 0. 908789 d) What proportion of scores are within(420, 520)? (del-normal 480 8100 420 520) 0. 419147 (- (normal 480 8100 520) (normal 480 8100 420)) 0. 419147 rd 12/19/2021 42
1. Normal Distribution a) P(Z > 1. 26) b) P(Z < - 0. 86) c) P(Z > -1. 37) d) P(-1. 25 < Z < 0. 37) e) Find z for P(-z Z z) = 0. 80, 0. 95, and 0. 99 a) (U-phi 1. 26) 0. 1038; b) (phi -0. 86) 0. 1949 c) (U-phi -1. 37) 0. 9147; d) (del-phi -1. 25 0. 37) 0. 5387 e) -1. 28 < z < 1. 28; -1. 96 < z < 1. 96; -2. 576 < z < 2. 576 (inv-phi 0. 9); (inv-phi 0. 975); (inv-phi 0. 995) 2. A normal RV X has = 10 and = 2. Find P(9 X 11). (del-phi x 1 x 2) Z = (X - ) / (del-phi – 1/2) 0. 3829. (del-normal 2 x 1 x 2) (del-normal 10 4 9 11) 0. 3829 rd 12/19/2021 43
Normal Distribution Let Z ~N(0, 1). Find constant c. a) b) c) d) 0 P(Z < c) = 0. 7512 (inv-phi 0. 7512) 0. 6780 P(0 < Z < c ) = 0. 433 (inv-phi (+ 1/2 0. 433)) 1. 5 (inv-phi 0. 9333) 1. 5 P(-c < Z < c) = 0. 90 (inv-phi 0. 95) 1. 645 P( Z > c) = 0. 18 (inv-phi 0. 82) 0. 915263 rd 12/19/2021 44
Normal Distribution 6 a. The average on quiz 1 is 68 with standard deviation 10. If 15% of the class received A's, find the lowest A/highest B assuming a normal distribution. (inv-normal 68 100 0. 85) 78. 3642 x = 68 + 10 * z 0. 85 = 68 + 10 * 1. 03642 = 78. 3642 (normal 68 100 78. 3642) 0. 85 (normal 2 x) (inv-phi 0. 85) 1. 03642 = z b. Jane was ranked at the 60 th percentile; John at the 40 th. What were their scores? (inv-phi 0. 6) 0. 252933 Jane's score = 68 + 10 * 0. 252933 = 70. 53 (inv-normal 68 100 0. 6) 70. 529336 John's score = 68 + 10 * -0. 252933 = 65. 470664 (inv-normal 68 100 0. 4) rd 12/19/2021 45
Women's Height ~ N(64. 3, 6. 76) What proportion have heights between 60 and 66? (del-normal 64. 3 6. 76 60 66) 0. 6943 A woman is ½ above mean. What proportion is taller? (U-normal 64. 3 6. 76 (+ 64. 3 (* 0. 5 2. 6))) 0. 3085 How tall is a woman at the 90 th percentile? (inv-Normal 64. 3 6. 76 0. 90) 67. 632 What is the probability that a randomly selected woman exceeds 67? (U-normal 64. 3 6. 76 67) 0. 1495 Find probability that exactly 2 of 5 randomly chosen women exceed 65. (binomial 5 (U-normal 64. 3 6. 76 65) 2) 0. 3455 rd 12/19/2021 46
Normal Distribution Let RV X ~ N(1, 2) and Y ~ N(3, 4) be independent. Compute P(X < 1. 5, Y < 2) (* (normal 1 2 1. 5)(normal 3 4 2)) b) P[(X < 1. 5) OR (Y < 2)] (+ (normal 1 2 1. 5) (normal 3 4 2) (- (* (normal 1 2 1. 5) (normal 3 4 2)))) 0. 7498 (c) P(Y - X < 0); Y – X ~ N(2, 6) (normal 2 6 0) 0. 207108 d) P(2 X + 3 Y > 9) = (U-normal 11 44 9) 0. 6185 E(2 X + 3 Y) = 2*1 + 3*3 = 11 V(2 X + 3 Y) = 4*2 + 9*4 = 44 rd 12/19/2021 47
negbin k=1 geometric Poisson k = np n-> hyperg binomial n=1 =np; normal Bernoulli 2=npq t n --> t 2 F unit normal gamma chi-square =1 exponential Weibull =1 rd 12/19/2021 48
- Slides: 48