170 likes | 301 Views
THE BINOMIAL RANDOM VARIABLE. BERNOULLI RANDOM VARIABLE. A random variable X with the following properties is called a Bernoulli random variable: P(X = 1) = p; P(X = 0) = 1-p p = P(success or good or bad or yes or no or 1, etc.) Mean and Variance of a Bernoulli random variable, X
E N D
THE BINOMIAL RANDOM VARIABLE
BERNOULLIRANDOM VARIABLE • A random variable X with the following properties is called a Bernoulli random variable: • P(X = 1) = p; P(X = 0) = 1-p • p = P(success or good or bad or yes or no or 1, etc.) • Mean and Variance of a Bernoulli random variable, X E(X) = 1p +0(1-p) = p Var(X) = (12p + 02(1-p)) - p2 = p- p2 = p(1-p)
BINOMIALRANDOM VARIABLE • When n items are sampled independently, each of which has a probability p of being a success, the number of successes is said to be a binomial random variable • X = number of successes in n tries • Thus, X = X1 + X2 + … + Xn, where X1, X2, … Xn are all Bernoulli random variables with means of p and variances of p(1-p)
BINOMIALMEAN AND VARIANCE • E(X) = E(X1+X2+…+Xn) = E(X1) + E(X2) + … E(Xn) = p+p+…+p = np • Since X1, X2 …Xn are independent random variables Var(X) = Var(X1+X2+…+Xn) = Var(X1) + Var(X2) + … + Var(Xn) = p(1-p) + p(1-p) + … + p(1-p) = np(1-p)
EXAMPLE OF A BINOMIALRANDOM VARIABLE • Distribution of the number of bad batteries in a sample of 4 where each battery has a chance of .1 of being bad (B) (and .9 of being good(G)) X = # bad batteries in a sample of 4
BINOMIAL DISTRIBUTION X Ways of getting X Prob(Each Way)Prob 0 GGGG (.9)4 =.6561 1 BGGG, GBGG, (.1)(.9)3 = .0729 GGBG, GGGB 4(.0729) = .2916 2 BBGG, BGBG, (.1)2(.9)2 = .0081 BGGB, GBGB GBBG, GGBB 6(.0081) = .0486 3 BBBG, BBGB, (.1)3(.9) = .0009 BGBB, GBBB 4(.0009) = .0036 4 BBBB (.1)4 =.0001
BINOMIAL DISTRIBUTIONGENERAL CASE • X = of successes in n tries when the probability of success on any try is p • P(X = x) = (# ways of getting x successes in n tries) px(1-p)n-x • Note: In the previous example a “success” was getting a “bad” battery
# Ways of Gettingx Successes in n Tries n! = product of all positive integers that are n, e.g. 5! = 5(4)(3)(2)(1) = 120 Note: by definition 0! = 1
EXAMPLE • What is the probability of getting exactly 2 bad batteries in a random sample of size 15 when the likelihood that any battery is bad is .1?
Calculating a Binomial Probability from the Binomial Formula
Example of a Cumulative Binomial Probability • What is the probability of getting at most 2 bad batteries in a random sample of 15 when the probability that any battery is bad is .1?
Example (Cont’d) • What is the mean number of bad batteries in a random sample of 15? • = np = 15(.1) = 1.5 • What is the standard deviation of the number of bad batteries in a sample of 15? • Var(X) = np(1-p) = 15(.1)(.9) = 1.35 • Standard Deviation = SQRT(1.35) = 1.162
BINOMIAL PROBABILITIESUSING EXCEL • Sample size = n; probability of success = p • P(EXACTLY x successes) = BINOMDIST(x,n,p,FALSE) • P(x OR LESS successes) =BINOMDIST(x,n,p,TRUE)
=BINOMDIST(3,15,.1,FALSE) =BINOMDIST(5,15,.1,TRUE) Point and Cumulative Probabilities When n = 15, p = .1
“Less Than or Equal”Prob. =BINOMDIST(2,15,.1,True) “Equal To” Prob. =BINOMDIST(3,15,.1,FALSE) “Between” Prob. =BINOMDIST(4,15,.1,TRUE)- BINOMDIST(1,15,.1,TRUE) “Greater Than or Equal to” Prob =1–BINOMDIST(3,15,.1,TRUE) Typical Binomial Probabilities
REVIEW • Bernoulli random variable • Definition, Mean, Variance • Binomial Random Variable • Definition • Mean, Variance, Standard Deviation • Point and Cumulative Probabilities • Using the Binomial Formula • Using Excel