{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Binomial_R_f10

# Binomial_R_f10 - no chocolate donuts left over By hand...

This preview shows pages 1–2. Sign up to view the full content.

Statistics 3011, Course Notes Supplement 4 October 11, 2010 The Binomial Distribution in R The dbinom function Let X be a binomial random variable with number of trials n and probability of success p . That is, X Bin ( n,p ). Then dbinom(x=k, size=n, prob=p) (substitute numbers in for k, n and p) gives P ( X = k ). Example XYZ corporation has an executive board meeting tomorrow morning, and Steve is assigned the all-important task of providing the donuts. There will be 25 executives attending the board meeting. Based on past experience, Steve knows that there is a 40% chance that each executive will want a chocolate donut, and that the executives’ desires for chocolate donuts are independent of each other. Let X be the number of chocolate donuts the executives at this board meeting will want. a) What is the probability distribution of X ? b) Suppose Steve brings a dozen chocolate donuts to the meeting. What is the proba- bility that X = 12; that is, everybody who wants a chocolate donut gets one, and there are

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: no chocolate donuts left over? By hand: ConFrm your answer with R: dbinom(x=12,size=25,prob=.4) 1 Statistics 3011, Course Notes Supplement 4 October 11, 2010 The pbinom function The pbinom function computes the lower tail probability of the binomial distribution. In other words, if X ∼ Bin ( n,p ), then pbinom(q=k, size=n, prob=p) (substitute numbers in for k, n and p) gives P ( X ≤ k ). Note that P ( X ≤ k ) n = P ( X < k ), because X is discrete. Example (continued) c) If Steve brings a dozen chocolate donuts to the meeting, what is the probability that at least one executive who wants a chocolate donut does not get one? By hand: Solve the problem with R: 1 - pbinom(q=12,size=25,prob=.4) d) If Steve brings a dozen chocolate donuts to the meeting, what is the probability that there will be at least 3 chocolate donuts left over? By hand: Solve the problem with R: 2...
View Full Document

{[ snackBarMessage ]}

### Page1 / 2

Binomial_R_f10 - no chocolate donuts left over By hand...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online