23
Binomial and Geometric Distributions Section 3.2 & 3.3 Cathy Poliak, Ph.D. [email protected] Office hours: T Th 2:30 pm - 5:15 pm 620 PGH Department of Mathematics University of Houston February 11, 2016 Cathy Poliak, Ph.D. [email protected] Office hours: T Th 2:30 pm - 5:15 pm 620 PGH (Department of Mathematics University of Hous Section 3.2 & 3.3 February 11, 2016 1 / 23

Binomial and Geometric Distributions - UHcathy/Math2311/Lectures... · Geometric Distribution The geometric distribution is the distribution produced by the random variable X defined

  • Upload
    others

  • View
    4

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Binomial and Geometric Distributions - UHcathy/Math2311/Lectures... · Geometric Distribution The geometric distribution is the distribution produced by the random variable X defined

Binomial and Geometric DistributionsSection 3.2 & 3.3

Cathy Poliak, [email protected]

Office hours: T Th 2:30 pm - 5:15 pm 620 PGH

Department of MathematicsUniversity of Houston

February 11, 2016

Cathy Poliak, Ph.D. [email protected] Office hours: T Th 2:30 pm - 5:15 pm 620 PGH (Department of Mathematics University of Houston )Section 3.2 & 3.3 February 11, 2016 1 / 23

Page 2: Binomial and Geometric Distributions - UHcathy/Math2311/Lectures... · Geometric Distribution The geometric distribution is the distribution produced by the random variable X defined

Outline

1 Beginning Questions

2 Binomial Distribution

3 Geometric Distribution

Cathy Poliak, Ph.D. [email protected] Office hours: T Th 2:30 pm - 5:15 pm 620 PGH (Department of Mathematics University of Houston )Section 3.2 & 3.3 February 11, 2016 2 / 23

Page 3: Binomial and Geometric Distributions - UHcathy/Math2311/Lectures... · Geometric Distribution The geometric distribution is the distribution produced by the random variable X defined

Popper Set Up

Fill in all of the proper bubbles.

Use a #2 pencil.

This is popper number 04.

Cathy Poliak, Ph.D. [email protected] Office hours: T Th 2:30 pm - 5:15 pm 620 PGH (Department of Mathematics University of Houston )Section 3.2 & 3.3 February 11, 2016 3 / 23

Page 4: Binomial and Geometric Distributions - UHcathy/Math2311/Lectures... · Geometric Distribution The geometric distribution is the distribution produced by the random variable X defined

Popper Questions

Wallen Accounting Services specializes in tax preparation forindividual tax returns. Data collected from past records reveals that 9%of the returns prepared by Wallen have been selected for audit by theInternal Revenue Service (IRS).

1. What is the probability that a customer of Wallen will be selectedfor audit?

a. 0.09 b. 0.91 c. 1 d. 02. Today, Wallen has six new customers. Assume the chances of

these six customers being audited are independent. Let X = thenumber of customers out of the six will be audited. What is theprobability that none of the six will be selected for audit? That isP(1st is not audited "and" 2nd is not audited "and" 3rd is notaudited "and" 4th is not audited "and" 5th is not audited "and" 6this not audited).

a. 0 b. 1 c. 0.568 d. 0.432

Cathy Poliak, Ph.D. [email protected] Office hours: T Th 2:30 pm - 5:15 pm 620 PGH (Department of Mathematics University of Houston )Section 3.2 & 3.3 February 11, 2016 4 / 23

Page 5: Binomial and Geometric Distributions - UHcathy/Math2311/Lectures... · Geometric Distribution The geometric distribution is the distribution produced by the random variable X defined

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 willbe audited?

Cathy Poliak, Ph.D. [email protected] Office hours: T Th 2:30 pm - 5:15 pm 620 PGH (Department of Mathematics University of Houston )Section 3.2 & 3.3 February 11, 2016 5 / 23

Page 6: Binomial and Geometric Distributions - UHcathy/Math2311/Lectures... · Geometric Distribution The geometric distribution is the distribution produced by the random variable X defined

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 beingaudited are independent.

3. For each customer, they will either be selected for audit or not beselected 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 amathematical model to these types of probability.

Cathy Poliak, Ph.D. [email protected] Office hours: T Th 2:30 pm - 5:15 pm 620 PGH (Department of Mathematics University of Houston )Section 3.2 & 3.3 February 11, 2016 6 / 23

Page 7: Binomial and Geometric Distributions - UHcathy/Math2311/Lectures... · Geometric Distribution The geometric distribution is the distribution produced by the random variable X defined

Binomial Setting

The previous example falls into a Binomial Setting which followsthese 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 otherobservations.

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. [email protected] Office hours: T Th 2:30 pm - 5:15 pm 620 PGH (Department of Mathematics University of Houston )Section 3.2 & 3.3 February 11, 2016 7 / 23

Page 8: Binomial and Geometric Distributions - UHcathy/Math2311/Lectures... · Geometric Distribution The geometric distribution is the distribution produced by the random variable X defined

Popper Questions

Do these scenarios have a binomial setting?3. Rolling a die 50 times.

a. Yes b. No4. Rolling a die 50 times and finding the number of times that 5

occurs.a. Yes b. No

5. Determining the number of heads up out of three flips.a. Yes b. No

Cathy Poliak, Ph.D. [email protected] Office hours: T Th 2:30 pm - 5:15 pm 620 PGH (Department of Mathematics University of Houston )Section 3.2 & 3.3 February 11, 2016 8 / 23

Page 9: Binomial and Geometric Distributions - UHcathy/Math2311/Lectures... · Geometric Distribution The geometric distribution is the distribution produced by the random variable X defined

Binomial Probability Distribution

The distribution of the count X of successes in the Binomialsetting has a Binomial probability distribution.

Where the parameters for a binomial probability distribution is:I n the number of observationsI 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 Ckpk (1− p)n−k

Cathy Poliak, Ph.D. [email protected] Office hours: T Th 2:30 pm - 5:15 pm 620 PGH (Department of Mathematics University of Houston )Section 3.2 & 3.3 February 11, 2016 9 / 23

Page 10: Binomial and Geometric Distributions - UHcathy/Math2311/Lectures... · Geometric Distribution The geometric distribution is the distribution produced by the random variable X defined

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) orP(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,inour calculator or R.

Cathy Poliak, Ph.D. [email protected] Office hours: T Th 2:30 pm - 5:15 pm 620 PGH (Department of Mathematics University of Houston )Section 3.2 & 3.3 February 11, 2016 10 / 23

Page 11: Binomial and Geometric Distributions - UHcathy/Math2311/Lectures... · Geometric Distribution The geometric distribution is the distribution produced by the random variable X defined

Using the Binomial Formula

With the example of Wallen customers being selected for audit, n = 6and p = 0.09. What is the probability that exactly one of the six will beselected 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 binomialsetting so we can use the formula: P(X = k) =n Ckpk (1− p)(n−k).

P(X = 1) =6 C1(0.09)1(0.91)5 = 0.337

Cathy Poliak, Ph.D. [email protected] Office hours: T Th 2:30 pm - 5:15 pm 620 PGH (Department of Mathematics University of Houston )Section 3.2 & 3.3 February 11, 2016 11 / 23

Page 12: Binomial and Geometric Distributions - UHcathy/Math2311/Lectures... · Geometric Distribution The geometric distribution is the distribution produced by the random variable X defined

Using R or TI-83\84

To find probabilities in R.I To find P(X =k) use dbinom(k,n,p).I From previous example P(X = 1), k = 1, n = 6, p = 0.09> dbinom(1,6,0.09)[1] 0.3369774

I To find P(X ≤ k) use pbinom(k,n,p).

To find probabilities in TI-83\ 84 use the DISTR button this willgive you a list of probability distributions.

I To find P(X = k) use binompdf(n,p,k).I To find P(X ≤ k) use binomcdf(n,p,k).

Cathy Poliak, Ph.D. [email protected] Office hours: T Th 2:30 pm - 5:15 pm 620 PGH (Department of Mathematics University of Houston )Section 3.2 & 3.3 February 11, 2016 12 / 23

Page 13: Binomial and Geometric Distributions - UHcathy/Math2311/Lectures... · Geometric Distribution The geometric distribution is the distribution produced by the random variable X defined

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 12times? 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 12times? P(X > 12) = 1− P(X ≤ 12)> 1-pbinom(12,30,0.5)[1] 0.8192027

Cathy Poliak, Ph.D. [email protected] Office hours: T Th 2:30 pm - 5:15 pm 620 PGH (Department of Mathematics University of Houston )Section 3.2 & 3.3 February 11, 2016 13 / 23

Page 14: Binomial and Geometric Distributions - UHcathy/Math2311/Lectures... · Geometric Distribution The geometric distribution is the distribution produced by the random variable X defined

Mean and Variance of a Binomial Distribution

If a count X has the Binomial distribution with number of observationsn 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.

Cathy Poliak, Ph.D. [email protected] Office hours: T Th 2:30 pm - 5:15 pm 620 PGH (Department of Mathematics University of Houston )Section 3.2 & 3.3 February 11, 2016 14 / 23

Page 15: Binomial and Geometric Distributions - UHcathy/Math2311/Lectures... · Geometric Distribution The geometric distribution is the distribution produced by the random variable X defined

From text 3.2 # 17

Suppose it is known that 80% of the people exposed to the flu virus willcontract the flu. Out of a family of five exposed to the virus, what is theprobability 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?

Cathy Poliak, Ph.D. [email protected] Office hours: T Th 2:30 pm - 5:15 pm 620 PGH (Department of Mathematics University of Houston )Section 3.2 & 3.3 February 11, 2016 15 / 23

Page 16: Binomial and Geometric Distributions - UHcathy/Math2311/Lectures... · Geometric Distribution The geometric distribution is the distribution produced by the random variable X defined

Example Continued

Suppose it is known that 80% of the people exposed to the flu virus willcontract the flu. Suppose we have a family of five that were exposed tothe flu.

1. Let X = number of family members contacting the flu. Create theprobability distribution table of X .

2. Find the mean and variance of this distribution.

Cathy Poliak, Ph.D. [email protected] Office hours: T Th 2:30 pm - 5:15 pm 620 PGH (Department of Mathematics University of Houston )Section 3.2 & 3.3 February 11, 2016 16 / 23

Page 17: Binomial and Geometric Distributions - UHcathy/Math2311/Lectures... · Geometric Distribution The geometric distribution is the distribution produced by the random variable X defined

Popper Question

Fifty percent of married couples paid for their honeymoon themselves.You randomly select 10 married couples and ask each if they paid fortheir honeymoon themselves.

6. What is the probability that exactly 5 out of the 10 paid for thehoneymoon themselves.

a. 0.5 b. 0.00488 c. 0.0009 d. 0.24617. What is the expected value, µX of the number of married couples

that paid for their honeymoon themselves out of 10 couplesasked?

a. 5 b. 10 c. 0 d. 5.58. What is the standard deviation, σX , of the number of married

couples that paid for their honeymoon themselves out of the 10couples asked?

a. 5 b. 2.5 c. 1.5811 d. 6.25

Cathy Poliak, Ph.D. [email protected] Office hours: T Th 2:30 pm - 5:15 pm 620 PGH (Department of Mathematics University of Houston )Section 3.2 & 3.3 February 11, 2016 17 / 23

Page 18: Binomial and Geometric Distributions - UHcathy/Math2311/Lectures... · Geometric Distribution The geometric distribution is the distribution produced by the random variable X defined

Geometric Distribution

The geometric distribution is the distribution produced by therandom variable X defined to count the number of trials needed toobtain the first success.

Examples: Flipping a coin until you get a head, Rolling a die untilyou get a 5.

Cathy Poliak, Ph.D. [email protected] Office hours: T Th 2:30 pm - 5:15 pm 620 PGH (Department of Mathematics University of Houston )Section 3.2 & 3.3 February 11, 2016 18 / 23

Page 19: Binomial and Geometric Distributions - UHcathy/Math2311/Lectures... · Geometric Distribution The geometric distribution is the distribution produced by the random variable X defined

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 obtainthe first success.

Cathy Poliak, Ph.D. [email protected] Office hours: T Th 2:30 pm - 5:15 pm 620 PGH (Department of Mathematics University of Houston )Section 3.2 & 3.3 February 11, 2016 19 / 23

Page 20: Binomial and Geometric Distributions - UHcathy/Math2311/Lectures... · Geometric Distribution The geometric distribution is the distribution produced by the random variable X defined

Formula for Geometric Distribution

The probability that the first success occurs on the nth trial is:

P(X = n) = (1− p)n−1p

Where p is the probability of success.The probability that it takes more than n trials to see the firstsuccess is:

P(X > n) = (1− p)n

R commands:P(X = n) = dgeom(n-1,p) andP(X > n) = 1− pgeom(n − 1,p)TI-83\84: P(X = n) = geometpdf(p,n) andP(X > n) = 1− geomtcdf(p,n)

Cathy Poliak, Ph.D. [email protected] Office hours: T Th 2:30 pm - 5:15 pm 620 PGH (Department of Mathematics University of Houston )Section 3.2 & 3.3 February 11, 2016 20 / 23

Page 21: Binomial and Geometric Distributions - UHcathy/Math2311/Lectures... · Geometric Distribution The geometric distribution is the distribution produced by the random variable X defined

Mean and Variance of a Geometric Distribution

If a count X has the Geometric distribution with probability of successp, the mean and variance of X are

µx = E [X ] =1p

σ2x = Var [X ] =

1− pp2

The standard deviation is the square root of the variance.

Cathy Poliak, Ph.D. [email protected] Office hours: T Th 2:30 pm - 5:15 pm 620 PGH (Department of Mathematics University of Houston )Section 3.2 & 3.3 February 11, 2016 21 / 23

Page 22: Binomial and Geometric Distributions - UHcathy/Math2311/Lectures... · Geometric Distribution The geometric distribution is the distribution produced by the random variable X defined

From Text section 3.3 #8

A quarterback completes 44% of his passes. We want to observe thisquarterback during one game to see how many passes he makesbefore completing one pass.

1. What is the probability that the quarterback throws 3 incompletepasses bfore he has a completion?

2. How many passes can the quarterback expect to throw before hecompletes a pass?

3. Determine the probability that it takes more than 5 attempts beforehe completes a pass.

4. What is the probability that he attempts more than 7 passesbefore he completes one?

Cathy Poliak, Ph.D. [email protected] Office hours: T Th 2:30 pm - 5:15 pm 620 PGH (Department of Mathematics University of Houston )Section 3.2 & 3.3 February 11, 2016 22 / 23

Page 23: Binomial and Geometric Distributions - UHcathy/Math2311/Lectures... · Geometric Distribution The geometric distribution is the distribution produced by the random variable X defined

From Text Section 3.3 #14

Newsweek in 1989 reported that 60% of young children have bloodlead levels that could impair their neurological development. Assuminga random sample from the population of all school children at risk, find:

1. The probability that at least 5 children out of 10 in a sample takenfrom a school may have a blood lead level that may impairdevelopment.

2. The probability you will need to test 10 children before finding achild with a blood lead level that may impair development.

3. The probability you will need to test no more than 10 childrenbefore finding a child with a blood lead level that may impairdevelopment.

Cathy Poliak, Ph.D. [email protected] Office hours: T Th 2:30 pm - 5:15 pm 620 PGH (Department of Mathematics University of Houston )Section 3.2 & 3.3 February 11, 2016 23 / 23