Part 2: Named Discrete Random Variables

51
Part 2: Named Discrete Random Variables http://www.answers.com/topic/binomial-distribution

description

Part 2: Named Discrete Random Variables. http://www.answers.com/topic/binomial-distribution. Chapter 13: Bernoulli Random Variables. http://www.boost.org/doc/libs/1_42_0/libs/math/doc/sf_and_dist/html / math_toolkit / dist / dist_ref / dists /bernoulli_dist.html. - PowerPoint PPT Presentation

Transcript of Part 2: Named Discrete Random Variables

Page 1: Part 2: Named Discrete Random Variables

Part 2: Named Discrete Random Variables

http://www.answers.com/topic/binomial-distribution

Page 2: Part 2: Named Discrete Random Variables

Chapter 13: Bernoulli Random Variables

http://www.boost.org/doc/libs/1_42_0/libs/math/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/bernoulli_dist.html

Page 3: Part 2: Named Discrete Random Variables

Bernoulli distribution: SummaryThings to look for: one trial, success or failureVariable: Parameter:

p = P(S), q = P(F) = 1 – pMass:

P(X = 1) = p, P(X = 0) = q(X) = pVar(X) = pq

Page 4: Part 2: Named Discrete Random Variables

Bernoulli DistributionDo the following follow a Bernoulli distribution?If so, a) What is a failure and what is a success? b) Determine p and q, c) Calculate E and Var.1) Rolling a fair 4-sided die and observing whether

the number showing is a 1 or not.2) The number of births of girls in a county hospital

on any specific day.3) If a patient takes a drug to see if it is effective or

not.

Page 5: Part 2: Named Discrete Random Variables

Bernoulli Distribution(cont)4) In a drug trial, some patients with the same

condition are given a drug and some are given a placebo to see if the drug is effective or not.

5) In quality control we want to see if a particular product is ‘defective’. We take random samples from an assembly line and check each sample to see if the product is defective.

6) We look at the percentage that a basketball player makes her shots. We want to know how many baskets it takes until she misses a shot.

Page 6: Part 2: Named Discrete Random Variables

Bernoulli Distribution(cont)7) At a certain point in a card game, if you get spade, you

with $4, if you get a 2 (except the 2 ), you lose $5, if ♠you get the A , you win $20, and if you get any other ♥card, the game ends with no money being exchanged.

a) What is your expected gain or loss?b) You and 3 friends are playing using the rules above

using your own deck. We are interested if a player receives any of the cards listed.i. What is the expected value of the number people

getting one of the above cards?ii. What is the variance of the number of people

getting one of the above cards?

Page 7: Part 2: Named Discrete Random Variables

Chapter 14: Binomial Random Variables

http://www.vosesoftware.com/ModelRiskHelp/index.htm#Distributions/Discrete_distributions/Binomial_distribution.htm

Page 8: Part 2: Named Discrete Random Variables

Binomial Distribution: SituationIn each case, identify whether the situation is binomial

are not. If it is binomial, state what the parameters are, n and p.

1. Rolling a fair 4-sided die 5 times and observing whether the number showing is a 1 or not.

2. In quality control we want to see if a particular product is ‘bad’. We take random samples from an assembly line that uses different machines to product the product.

3. We draw 2 cards from a deck without replacement. We are interested in knowing if the cards are red or not.

Page 9: Part 2: Named Discrete Random Variables

Binomial distribution: SummaryThings to look for: BInSVariable: X = # of success in n trials (0 ≤ X ≤ n)Parameters:

n: number of trials (n = 1 Bernoulli)p = P(S) = constant, q = P(F) = 1 – p

Mass:

(X) = npVar(X) = npq

Page 10: Part 2: Named Discrete Random Variables

Binomial r.v. (in class)A restaurant serves eight entrées of fish, 12 of beef, and 10

of poultry. If customers select from these entrées randomly, what is the probability that

a) two of the next four customers order fish entrées?b) at most one of the next four customers orders fish?c) at least one of the next four customers orders fish?d)* How many customers would the restaurant have to

serve to be sure that there is a 90% chance that at least one of them orders a fish entrée?

e) What is the expected number of customers (in the next 4 customers) that will order fish?

f) What is the standard deviation of the number of people who order fish?

Page 11: Part 2: Named Discrete Random Variables

Shapes of Histograms

Right skewed Left skewed

Symmetric

Page 12: Part 2: Named Discrete Random Variables

g)What is the mass, graph of mass, graph of CDF?

X 0 1 2 3 4 elsepX(x) 0.289 0.421 0.229 0.056 0.005 0

0 1 2 3 40.000.050.100.150.200.250.300.350.400.45

x

px(x)

-2 -1 0 1 2 3 4 5-0.2

0

0.2

0.4

0.6

0.8

1

Page 13: Part 2: Named Discrete Random Variables

Probability histograms for binomial distributions with different p’s with n = 8

0 1 2 3 4 5 6 7 80.00

0.05

0.10

0.15

0.20

0.25

0.30

0.35

0.40

x

px(x)

0 1 2 3 4 5 6 7 80.00

0.05

0.10

0.15

0.20

0.25

0.30

x

px(x)

0 1 2 3 4 5 6 7 80.00

0.05

0.10

0.15

0.20

0.25

0.30

0.35

0.40

x

px(x)

p = 0.2 p = 0.5 p = 0.8

Page 14: Part 2: Named Discrete Random Variables

Chapter 15: Geometric Random Variables

http://raven.iab.alaska.edu/~ntakebay/teaching/programming/probability/node8.html

Page 15: Part 2: Named Discrete Random Variables

Geometric distribution: SummaryThings to look for: BISVariable: X = # of trials until the first success (1 ≤ X)Parameters:

p = P(S) = constant, q = P(F) = 1 – pMass:

P(X = x) = qx-1p, x = 1, 2, 3, …

Page 16: Part 2: Named Discrete Random Variables

Example: Geometric DistributionSuppose that we roll an 20-sided die until a '1' is rolled. Let X

be the number of times it takes to roll the '1'. a) Why is this a geometric distribution?b) What is the PMF of X?c) What is the probability that it will take exactly 10 rolls?d) If you decide in advance that you will roll the die 10 times,

what is the probability that you will have exactly one ‘1’? How is this different from part c)?

e) What is the expected number of rolls?f) What is the standard deviation of the number of rolls?g) *What does the mass look like?h) *What does the CDF look like?

Page 17: Part 2: Named Discrete Random Variables

Shape of Geometric PMF

0 20 40 60 80 1000.00

0.01

0.02

0.03

0.04

0.05

0.06p=0.05

x

px(x)

0 20 40 60 80 1000

0.2

0.4

0.6

0.8

1CDF

X

Page 18: Part 2: Named Discrete Random Variables

Example: Geometric r.v. (cont)Suppose that we roll an 20-sided die until a '1' is

rolled. Let X be the number of times it takes to roll the '1'.

i) What is the probability that it will take no more than 10 rolls?

j) What is the probability that it will take between 10 and 20 rolls (exclusive)?

k) Determine the number of rolls so that the person has a 90% or greater chance of rolling a ‘1’?

Page 19: Part 2: Named Discrete Random Variables

Example: Geometric r.v. (cont)

Suppose that we roll an 20-sided die until a '1' is rolled. Let X be the number of times it takes to roll the '1'.

h) What is the probability that it will takes more than 10 rolls to roll the ‘1’?

i) Assuming that it takes more than 20 rolls to roll the ‘1’. Find the probability that it will take more than 30 rolls to roll the ‘1’?

Page 20: Part 2: Named Discrete Random Variables

Chapter 16: Negative Binomial Random Variables

http://www.vosesoftware.com/ModelRiskHelp/index.htm#Distributions/Discrete_distributions/Negative_Binomial.htm

Page 21: Part 2: Named Discrete Random Variables

Negative Binomial distribution: SummaryThings to look for: BISVariable: X = # of trials until the rth success (r ≤ X)Parameters:

r = the desired number of successesp = P(S) = constant, q = P(F) = 1 – p

Mass:

Page 22: Part 2: Named Discrete Random Variables

Example: Negative Binomial r.v.Suppose that we roll an n-sided die until a '1' is

rolled. Let X be the number of times it takes to roll the ninth '1'.

a) Why is this a Negative Binomial situation?b) What are the possible values of x?c) What is the PMF of X?d) What is the probability that it will take 40 rolls?e) What is the expected number of rolls?f) What is the standard deviation of the number

of rolls?

Page 23: Part 2: Named Discrete Random Variables

Comparison: Binomial vs. Negative Binomial Binomial Negative BinomialQuestion What is the prob.

that that you will roll 9 “1’s in the first 40 rolls?

What is the probability that 40th roll will be the 9th ‘1’?

Distribution X ~ Binomial (n = 40, p = 0.05)

X ~ NegBinomial (r = 9, p = 0.05)

Meaning of X X = # of successes = 9

X = # of rolls until the 9th ‘1’

Probabiltiy

Page 24: Part 2: Named Discrete Random Variables

Chapter 17: Poisson Random Variables

http://www.boost.org/doc/libs/1_35_0/libs/math/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/poisson_dist.html

Page 25: Part 2: Named Discrete Random Variables

Examples of Poisson R.V.’s

1. The number of patients that arrive in an emergency room (or any other location) between 6:00 pm and 7:00 pm (or any other period of time) with a rate of 5 per hour.

2. The number of alpha particles emitted per minute by a radioactive substance with a rate of 10 per minute.

3. The number of cars that are located on a particular section of highway at a given time with an average value of 7 per mile .

Page 26: Part 2: Named Discrete Random Variables

Examples of Poisson R.V. (extension)

4. The number of misprints on a page of a book.5. The number of people in a community living to

100 years of age.6. The number of wrong telephone numbers that

are dialed in a day.7. The number of packages of cat treats sold in a

particular store each day.8. The number of vacancies occurring during a year

in the Supreme Court.

Page 27: Part 2: Named Discrete Random Variables

Poisson distribution: SummaryThings to look for: BIS*Variable: X = # of successes during the specified

‘period’Parameters:

= the average rate of eventsMass:

(X) = Var(X) =

Page 28: Part 2: Named Discrete Random Variables

Example: Poisson Distribution (class)In any one hour period, the average number of phone

calls per minute coming into the switchboard of a company is 2.5.

a) Why is this story a Poisson situation? What is its parameter?

b) What is the probability that exactly 2 phone calls are received in the next hour?

c) Given that at least 1 phone call is received in the next hour, what is the probability that more than 3 are received?

d) *What does the mass look like in this situation?e) *What does the CDF look like in this situation?

Page 29: Part 2: Named Discrete Random Variables

Shapes of Poisson

0.000.050.100.150.200.250.30

= 2.5

x

px(x)

-1 1 3 5 7 9 11 130

0.20.40.60.8

1CDF l = 2.5

Page 30: Part 2: Named Discrete Random Variables

Example: Poisson DistributionIn any one hour period, the average number of

phone calls per minute coming into the switchboard of a company is 2.5.

f) What is the probability that there will be exactly 6 phone calls in the next 2 hours?

g) How many phone calls do you expect in the next 2 hours?

h) What is the probability that there will exactly 6 phone calls in one out of the next three 2-hour time intervals?

Page 31: Part 2: Named Discrete Random Variables

Example: Poisson Distribution (2) - ClassEvery second on average, 5 neutrons, 3 gamma

particles and 6 neutrinos hit the Earth in a certain location.

a) Why is this story a Poisson situation?b) What is the expected number of particles to hit the

Earth in that location in the next 5 seconds?c) What is the probability that exactly 20 particles will

hit the Earth at that location in the next 2 seconds?d) What is the probability that exactly 20 particles will

hit the Earth at that location tomorrow from 1 pm to 1:00:02 (2 seconds after 1 pm)?

Page 32: Part 2: Named Discrete Random Variables

Examples of Poisson R.V. (extension) - class

For each of the following, is n large and p small?4. The number of misprints on a page of a book.5. The number of people in a community living to

100 years of age.6. The number of wrong telephone numbers that

are dialed in a day.7. The number of packages of cat treats sold in a

particular store each day.8. The number of vacancies occurring during a year

in the Supreme Court.

Page 33: Part 2: Named Discrete Random Variables

Example: Poisson Approximation to a Binomial - class

On my page of notes, I have 2150 characters. Say that the chance of a typo (after I proof it) is 0.001.

a) Is the Poisson approximation to the binomial appropriate?

b) What is the probability of exactly 3 typos on this page?

c) What is the probability of at most 3 typos?

Page 34: Part 2: Named Discrete Random Variables

Poisson vs. BinomialP(X = x) Binomial Poisson

0 0.11636 0.116481 0.25042 0.250442 0.26935 0.269223 0.19305 0.192944 0.10372 0.103715 0.04456 0.044596 0.01595 0.015987 0.00489 0.004918 0.00131 0.001329 0.00031 0.00032

Page 35: Part 2: Named Discrete Random Variables

Poisson vs. Bionomial

0 2 4 6 8 100.0

0.1

0.2

0.3

Binomial

0 2 4 6 8 100.0

0.1

0.2

0.3

Poisson

Page 36: Part 2: Named Discrete Random Variables

Chapter 18: Hypergeometric Random Variables

http://www.vosesoftware.com/ModelRiskHelp/index.htm#Distributions/Discrete_distributions/Hypergeometric_distribution.htm

Page 37: Part 2: Named Discrete Random Variables

Hypergeometric distribution: SummaryThings to look for: Bn, without ReplacementVariable: X = # of successesParameters:

N = total number of items in populationM = total number of successes in populationN – M = total number of failures in

populationn = items selected

Mass:

Page 38: Part 2: Named Discrete Random Variables

Example: Hypergeometric Distribution

A quality assurance engineer of a company that manufactures TV sets inspects finished products in lots of 100. He selects 5 of the 100 TV’s at random and inspects them thoroughly. Let X denote the number of defective TV’s obtained. If, in fact 6 of the 100 TVs in the current lot are actually defective, find the mass of the random variable X.

Page 39: Part 2: Named Discrete Random Variables

Example: Hypergeometric Distribution (2) - classA textbook author is preparing an answer key for the answers in a

book. In 500 problems, the author has made 25 errors. A second person checks seven of these calculations randomly. Assume that the second person will definitely find the error in an incorrect answer.

a) Explain in words what X is in this story. What values can it take?b) Why is this a Hypergeometric distribution? What are the

parameters?c) What is the probability that the second person finds exactly 1

error?d) What is the probability that the second person finds at least 2

errors?e) What is the expected number of errors that the second person will

find?f) What is the standard deviation of the number or errors that the

second person will find?

Page 40: Part 2: Named Discrete Random Variables

Example: Capture-Recapture SamplingEstimating the Size of a Population. Suppose that an

unknown number, N, of bluegills inhabit a small lake and that we want to estimate that number. One procedure for doing so, often referred to as the capture-recapture method, is to proceed as follows:

1. Capture and tag some of the fish, say 250 and then release the fish back into the lake and give them time to disperse.

2. Capture some more of the animals, say 150, and determine the number that are tagged, say 16. These are the recaptures.

3. Use the data to estimate N.

Page 41: Part 2: Named Discrete Random Variables

Example: Hoosier Lotto (class)The Lotto. In the Hoosier lotto, a player specifies six numbers

of her choice from the numbers 1 – 48. In the lottery drawing, six winning numbers are chosen at random without replacement from the numbers 1 – 48. To win a prize, a lotto ticket must contain two or more of the winning numbers.

a) Confirm the mass of X from the Hoosier lottery web site which is on the next page. (Homework)

b) If the player buys one Lotto ticket, determine the probability that she wins a prize (at least 2 numbers correct).

c) If the player buys one Lotto ticket per week for a year, determine the probability that she wins a prize at least once in the 52 tries. (Hint: What is this distribution?)

Page 42: Part 2: Named Discrete Random Variables

Example: Hoosier Lotto (cont)

These are the odds from the Hoosier lottery (https://www.hoosierlottery.com/games/hoosier-lotto)

6 OF 6 1:12,271,512 5 OF 6 1:48,696 4 OF 6 1:950 3 OF 6 1:532 OF 6 1:7

Page 43: Part 2: Named Discrete Random Variables

Example: Powerball (BONUS)When playing Powerball, you receive a ticket with five (5) numbers from 1 – 59 and one (1) Powerball number from 1 – 35. Confirm the following odds (including the overall odds of winning):

Page 44: Part 2: Named Discrete Random Variables

Binomial Approximation to the Hypergeometric

M = 200

Page 45: Part 2: Named Discrete Random Variables

Chapter 19: Discrete Uniform Random Variables

http://www.milefoot.com/math/stat/pdfd-uniformdisc.htm

Page 46: Part 2: Named Discrete Random Variables

Discrete Uniform distribution: SummaryThings to look for: equally likelihood situationVariable: X = the choice of the outcomeParameters:

N = total number of possible outcomesMass:

Page 47: Part 2: Named Discrete Random Variables

Example: Discrete Uniform (class)A charitable organization is conducting a raffle in which the grand

prize is a new car. Five thousand tickets, numbered 0001, 0002, …, 5000 are sold at $10 each. At the grand-prize drawing, one ticket stub will be selected at random from the 5000 ticket stubs

a) Why is this a Discrete Uniform distribution, and what is the parameter?

b) Explain in words what X is terms of the story? What values can it take on?

c) Suppose that you hold tickets numbered 1003 – 1025. What is the probability that you win the grand prize?

Calculate the following even though they don’t really mean anything.

d) What is the expected value of the winning number?e) What is the standard deviation?

Page 48: Part 2: Named Discrete Random Variables

Chapter 20: Summary of Part III

http://www.wolfram.com/mathematica/new-in-8/parametric-probability-distributions/univariate-discrete-distributions.html

Page 49: Part 2: Named Discrete Random Variables

Summary of Discrete DistributionsX

Page 50: Part 2: Named Discrete Random Variables

Expected values and Variances for selected families of discrete random variables.

Family Param(s) Expected Value

Variance

Bernoulli p p q

Binomial n,p np npqGeometric p 1/p q/p2

Neg. Binomial r,p r/p qr/p2

Poisson

Hypergeometric N,n,p

Uniform discrete N

Page 51: Part 2: Named Discrete Random Variables

Example: Determine the Distribution (class)

For each of the following situations, state which distribution (and approximation distribution if applicable) would be appropriate and why. Also please state all parameters. Note: A possible answer is ‘none’.

Exercises 20.1 – 20.9 (pp. 271 – 272)Typo is 20.6 Let X be the number of broken ice cream cones….

20.a: Let X be the number of ice cream cones that you need to sample to find the 2nd waffle cone and the 3rd regular cone if they come from a large, independent population and 10% of the waffle cones are broken and 15% of the regular cones are broken.

20.b: Let X be the number of ice cream cones in your sample which are broken if you sample 50 of them from 2 boxes, one of which was roughly handled and the other was handled normally. Assume that 12% of the cones from the plant are broken and handling the box roughly breaks an additional 2%.

20.c: Let X be the number of broken ice cream cones that you give to your class of 20 if originally 12 of the 100 ice cream cones in the box are broken. To avoid jealousy, you give one ice cream cone per person whether they are broken or not.