Binomal and Geometric Distributions Sections 3.2 & 3.3 Cathy Poliak, Ph.D. cathy@math.uh.edu Office in Fleming 11c Department of Mathematics University of Houston Lecture 7-2311 Cathy Poliak, Ph.D. cathy@math.uh.edu Office in Fleming 11c Sections (Department 3.2 & 3.3of Mathematics University of Houston Lecture ) 7-2311 1 / 24
Outline 1 Binomial Distribution 2 Geometric Distribution Cathy Poliak, Ph.D. cathy@math.uh.edu Office in Fleming 11c Sections (Department 3.2 & 3.3of Mathematics University of Houston Lecture ) 7-2311 2 / 24
Popper Set Up Fill in all of the proper bubbles. Make sure your ID number is correct. Make sure the filled in circles are very dark. This is popper number 03. Cathy Poliak, Ph.D. cathy@math.uh.edu Office in Fleming 11c Sections (Department 3.2 & 3.3of Mathematics University of Houston Lecture ) 7-2311 3 / 24
Popper #03 Questions The following is a probability distribution: X -10 10 Probability 0.4 0.6 1. Determine the expected value (mean) of this probability distribution. a) 0 b) 2 c) -2 d) 10 2. Determine the variance of this probability distribution. a) 20 b) 100 c) 96 d) 0 Cathy Poliak, Ph.D. cathy@math.uh.edu Office in Fleming 11c Sections (Department 3.2 & 3.3of Mathematics University of Houston Lecture ) 7-2311 4 / 24
Popper #03 Questions Suppose a random variable X has a mean of 20, E(X) = 20 and standard deviation of 5, SD(X) = 5. We have a new random variable Y, where Y = 3X + 10. 3. What is the mean (epxected value) of Y? a) 20 b) 70 c) 60 d) 30 4. What is the standard deviation of Y? a) 15 b) 25 c) 75 d) 5 Cathy Poliak, Ph.D. cathy@math.uh.edu Office in Fleming 11c Sections (Department 3.2 & 3.3of Mathematics University of Houston Lecture ) 7-2311 5 / 24
Popper 03 Questions Wallen Accounting Services specializes in tax preparation for individual tax returns. Data collected from past records reveals that 9% of the returns prepared by Wallen have been selected for audit by the Internal Revenue Service (IRS). 5. Today, Wallen has six new customers. Assume the chances of these six customers being audited are independent. Let X = the number of customers out of the six will be audited. What is the probability that none of the six will be selected for audit? That is P(1st is not audited "and" 2nd is not audited "and" 3rd is not audited "and" 4th is not audited "and" 5th is not audited "and" 6th is not audited). a. 0 b. 1 c. 0.568 d. 0.432 Cathy Poliak, Ph.D. cathy@math.uh.edu Office in Fleming 11c Sections (Department 3.2 & 3.3of Mathematics University of Houston Lecture ) 7-2311 6 / 24
Audit Example Let X be the number out of 6 customers that will be audited. The possible values of X are X = {0, 1, 2, 3, 4, 5, 6} What is the probability that exactly one out of the 6 customers will be audited? Cathy Poliak, Ph.D. cathy@math.uh.edu Office in Fleming 11c Sections (Department 3.2 & 3.3of Mathematics University of Houston Lecture ) 7-2311 7 / 24
Audit Example From this example we can note a couple of things. 1. We are only looking at six customers, n = 6. 2. We are assuming the chances of these six customers being audited are independent. 3. For each customer, they will either be selected for audit or not be selected for audit. 4. We have the same probability of a person being selected for audit, p = 0.09 for each customer. This type of setting occurs quite frequently that we can put a mathematical model to these types of probability. Cathy Poliak, Ph.D. cathy@math.uh.edu Office in Fleming 11c Sections (Department 3.2 & 3.3of Mathematics University of Houston Lecture ) 7-2311 8 / 24
Binomial Setting The previous example falls into a Binomial Setting which follows these 4 rules. 1. There are a fixed number n of observations. 2. The n observations are all independent. That is, knowing the result of one observation tells you nothing about the other observations. 3. Each observation falls into one of just two categories, we call success and failure. 4. The probability of a success p is the same for each observation. Cathy Poliak, Ph.D. cathy@math.uh.edu Office in Fleming 11c Sections (Department 3.2 & 3.3of Mathematics University of Houston Lecture ) 7-2311 9 / 24
Binomial? Do these scenarios have a binomial setting? 1. Rolling a die 50 times. 2. Rolling a die 50 times and finding the number of times that 5 occurs. 3. Determining the number of heads up out of three flips. - 2311 10 / 24
Binomial Probability Distribution The distribution of the count X of successes in the Binomial setting has a Binomial probability distribution. Where the parameters for a binomial probability distribution is: n the number of observations p is the probability of a success on any one observation The possible values of X are the whole numbers from 0 to n. As an abbreviation we say, X B(n, p). Binomial probabilities are calculated with the following formula: P(X = k) = n C k p k (1 p) n k - 2311 11 / 24
Steps to fining the probability 1. Make sure the assumptions are met for the Binomial setting. 2. Describe the success. 3. Determine p, the probability of success. 4. Determine n, the number of trials. 5. Put the probability question in terms of X. That is, P(X = x) or P(X x) or P(X x) or P(X < x) or P(X > X). 6. Determine the probability. We can do this through the formula,in our calculator or R. - 2311 12 / 24
Using the Binomial Formula With the example of Wallen customers being selected for audit, n = 6 and p = 0.09. What is the probability that exactly one of the six will be selected for audit? 1. We have independence. 2. Success is being audited. 3. p = 0.09 4. n = 6 5. We want P(X = 1). We have met the 4 conditions of the binomial setting so we can use the formula: P(X = k) = n C k p k (1 p) (n k). P(X = 1) = 6 C 1 (0.09) 1 (0.91) 5 = 0.337-2311 13 / 24
Stopping at an intersection Suppose that only 25% of all drivers come to a complete stop at an intersection with a stop sign when not other cars are visible. What is the probability that of the 20 randomly chosen drivers, 1. Exactly 6 will come to a complete stop? 2. No one will come to complete stop? 3. At least one will come to a complete stop? 4. At most 6 will come to a complete stop? - 2311 14 / 24
Using R or TI-83\84 To find probabilities in R. To find P(X =k) use dbinom(k,n,p). From previous example P(X = 1), k = 1, n = 6, p = 0.09 > dbinom(1,6,0.09) [1] 0.3369774 To find P(X k) use pbinom(k,n,p). To find probabilities in TI-83\ 84 use the DISTR button this will give you a list of probability distributions. To find P(X = k) use binompdf(n,p,k). To find P(X k) use binomcdf(n,p,k). - 2311 15 / 24
Example #2 A fair coin is flipped 30 times. 1. What is the probability that the coin comes up heads exactly 12 times? P(X = 12), n = 30, p = 0.5 > dbinom(12,30,0.5) [1] 0.08055309 2. What is the probability that the coin comes up heads less than 12 times? P(X < 12) = P(X 11) > pbinom(11,30,0.5) [1] 0.1002442 3. What is the probability that the coin comes up heads more than 12 times? P(X > 12) = 1 P(X 12) > 1-pbinom(12,30,0.5) [1] 0.8192027-2311 16 / 24
Mean and Variance of a Binomial Distribution If a count X has the Binomial distribution with number of observations n and probability of success p, the mean and variance of X are µ X = E[X] = np σ 2 X = Var[X] = np(1 p) Then the standard deviation is the square root of the variance. - 2311 17 / 24
From text 3.2 # 17 Suppose it is known that 80% of the people exposed to the flu virus will contract the flu. Out of a family of five exposed to the virus, what is the probability that: 1. No one will contract the flu? 2. All will contract the flu? 3. Exactly two will get the flu? 4. At least two will get the flu? - 2311 18 / 24
Example Continued Suppose it is known that 80% of the people exposed to the flu virus will contract the flu. Suppose we have a family of five that were exposed to the flu. 1. Find the mean 2. Find the variance of this distribution. - 2311 19 / 24
Geometric Distribution The geometric distribution is the distribution produced by the random variable X defined to count the number of trials needed to obtain the first success. Examples: Flipping a coin until you get a head, Rolling a die until you get a 5. - 2311 20 / 24
Conditions A random variable X is geometric if the following conditions are met: 1. Each observation falls into one of just two categories, "success" or "failure." 2. The probability of success is the same for each observation. 3. The variable of interest is the number of trials required to obtain the first success. - 2311 21 / 24
Formula for Geometric Distribution The probability that the first success occurs on the n th trial is: P(X = n) = (1 p) n 1 p Where p is the probability of success. The probability that it takes more than n trials to see the first success is: P(X > n) = (1 p) n R commands:p(x = n) = dgeom(n-1,p) and P(X > n) = 1 pgeom(n 1, p) TI-83\84: P(X = n) = geometpdf(p,n) and P(X > n) = 1 geomtcdf(p, n) - 2311 22 / 24
Mean and Variance of a Geometric Distribution If a count X has the Geometric distribution with probability of success p, the mean and variance of X are µ x = E[X] = 1 p σ 2 x = Var[X] = 1 p p 2 The standard deviation is the square root of the variance. - 2311 23 / 24
From Text section 3.3 #8 A quarterback completes 44% of his passes. We want to observe this quarterback during one game to see how many passes he makes before completing one pass. 1. What is the probability that the quarterback throws 3 incomplete passes before he has a completion? 2. How many passes can the quarterback expect to throw before he completes a pass? 3. Determine the probability that it takes more than 5 attempts before he completes a pass. 4. What is the probability that he attempts no more than 7 passes before he completes one? - 2311 24 / 24