Binomial - To Fnd the probability P ( Y y ), use the sum...

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

View Full Document Right Arrow Icon
Binomial Distribution A discrete random variable is said to have a binomial distribution if The experiment involves a Fxed number of independent and identical trials, n . Each of the n trials has two possible outcomes, success and failure. The probability of success on each of the n trials is the same, p . Therefore, the probability of failure on each of the n trials is 1 - p = q . The random variable Y is deFned as the total number of successes in the n trials. The parameters for a binomial random variable Y are the number of trials n and the proba- bility of success on each trial p . The probability distribution function of the binomial random variable Y is p ( y ) = p n y P p y (1 - p ) n - y for y = 0 , 1 , . . . , n The theoretical mean of the binomial random variable Y is μ = E ( Y ) = np The variance of the binomial random variable Y is σ 2 = V ( Y ) = np (1 - p ) = npq Working with binomial random variables in R. ±inding probabilities. To Fnd a probability P ( Y = y ) = p ( y ) for a single value y , the command in R is dbinom(y,n,p)
Background image of page 1

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

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: To Fnd the probability P ( Y y ), use the sum command to add up all p ( y ) values for y between and including 0 and y . sum(dbinom(0:y,n,p)) To Fnd the probability P ( y 1 Y y 2 ), use the sum command to add up all p ( y ) values for y between and including y 1 and y 2 . sum(dbinom(y1:y2,n,p)) To Fnd the probability P ( Y y ), use the sum command to add up all p ( y ) values for y between and including y and n 1 sum(dbinom(y:n,n,p)) Finally, to get a list of all p ( y ) values for a particular binomial random variable Y , use the dbinom command to list all p ( y ) for values of y between and including 0 and n . dbinom(0:n,n,p) Generating observed values. You can also use R to generate observed values from a binomial distribution with n and p . The command is rbinom(numobs, n,p) where numobs is the number of observed values you would like to generate. 2...
View Full Document

This note was uploaded on 01/27/2010 for the course STAT 342 taught by Professor Staff during the Spring '08 term at Iowa State.

Page1 / 2

Binomial - To Fnd the probability P ( Y y ), use the sum...

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

View Full Document Right Arrow Icon
Ask a homework question - tutors are online