This preview shows pages 1–2. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full 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.
 Spring '08
 Staff
 Binomial, Probability

Click to edit the document details