STAT111 Introductory Statistics
Download
Report
Transcript STAT111 Introductory Statistics
STAT 111 Introductory Statistics
Lecture 8: More on the Binomial Distribution
and Sampling Distributions
June 1, 2004
Today’s Topics
• More on the binomial distribution
– Mean and variance
•
•
•
•
•
Sample proportion
Normal approximation of the binomial
Continuity correction
Sampling distribution of sample means
Central Limit Theorem
Recall: The Binomial Setting
• There are a fixed number n of trials.
• The n trials are all independent.
• Each trial has one of two possible outcomes,
labeled “success” and “failure.”
• The probability of success, p, remains the same
for each trial.
Recall: The Binomial Distribution
• The distribution of the count X of successes in
the binomial setting is called the binomial
distribution with parameter n and p, where
– n is the number of trials
– p is the probability of a success on any trial
• The count X is a discrete random variable,
typically abbreviated as X ~ B(n, p).
• Possible values of X are the whole numbers from
0 to n.
The Binomial Distribution
• If X ~ B(n,p), then
n x
n!
n x
x
n x
P( X x) p (1 p)
p (1 p)
x!(n x)!
x
• Examples: Let n = 3.
n 3
3!
3 2 1
x 0 :
1
x 0 0!3! (1)(3 2 1)
n 3
3!
3 2 1
x 1 :
3
x 1 1!2! (1)( 2 1)
Developing Binomial Probabilities for
n=3
S1 p
p
1-p
p
1-p
F1
1-p
S2
p
S3
F2 1-p
p
S2 1-p
p
1-p
p
F3
S3
F3
S3
F3
S3
F2 1-p
F3
P(SSS) = p3
P(SSF) = p2(1 – p)
P(SFS) = p2(1 – p)
P(SFF) = p(1 – p)2
P(FSS) = p2(1 – p)
P(FSF) = p(1 – p)2
P(FFS) = p(1 – p)2
P(FFF) = (1 – p)3
Binomial Probabilities for n = 3
• Let X be the number of successes in three trials.
P(X = 0) = (1 – p)3
P(X = 1) = 3p(1 – p) 2
P(X = 2) = 3p2(1 – p)
P(X = 3) = p3
P(FFF) = (1 – p)3
X=0
P(SSF) = p2(1 – p)
P(SFS) = p2(1 – p)
X=1
P(SFF) = p(1 – p)2
P(FSS) = p2(1 – p)
X=2
P(FSF) = p(1 – p)2
P(FFS) = p(1 – p)2
X=3
P(SSS) = p3
Example: Rolling a Die
• Roll a die 4 times, let X be the number of times the
number 5 appears.
• “Success” = get a roll of 5, so P(Success) = 1/6.
X=0
X=1
X=2
X=3
X=4
4!
P( X 0)
(1 / 6) 0 (1 1 / 6) 40 0.4823
0!(4 0)!
4!
P( X 1)
(1 / 6)1 (1 1 / 6) 41 0.3858
1!(4 1)!
4!
(1 / 6) 2 (1 1 / 6) 42 0.1157
2!(4 2)!
4!
P( X 3)
(1 / 6)3 (1 1 / 6) 43 0.0154
3!(4 3)!
P( X 2)
P( X 4)
4!
(1 / 6) 4 (1 1 / 6) 44 0.0008
4!(4 4)!
Example: Rolling a Die
• Find the probability that we get at least 2 rolls of
5.
Expected Value and Variance of a
Binomial Random Variable
• If X~B(n,p),then
E ( X ) X np
Var ( X ) X2 np (1 p )
X np (1 p )
Set-up for Derivation
• Let Xi indicate whether the i th trial is a success or
failure by,
Xi =1, if ith trial is a success
i = 1,2,….,n.
Xi =0, if ith trial is a failure.
• X1, …, Xn are independent and identically
distributed with probability distribution
Outcome:
1
Probability: p
0
1-p
Binomial Example: Checkout Lanes
• A grocery store has 10 checkout lanes. During a
busy hour the probability that any given lane is
occupied (has at least one customer) is 0.75.
Assume that the lanes are occupied or not
occupied independently of each other.
– What is the probability that a customer will find at
least one lane unoccupied?
– What is the expected number of occupied lanes?
– What is the standard deviation of the number of
occupied lanes?
Sample Proportions
• In statistical sampling we often want to estimate
the proportion p of “successes” in a population.
• The sample proportion is defined as
X count of successes in sample
pˆ
n
size of sample
• If the count X is B(n, p), then the mean and
standard deviation of the sample proportion are
E ( pˆ ) pˆ p
pˆ p (1 p ) n
Sample Proportions
• Our sample proportion is an unbiased estimator
of the population proportion p.
• The variability of our estimator decreases as
sample size increases.
• In particular, we must multiply the sample size by
4 if we want the cut the standard deviation in
half.
Sample Proportions
• The histogram of the distribution of the sample
proportion when n = 1000, p = 0.6
0.30
0.25
0.15
0.10
0.05
p_hat
1
0.9
0.8
0.7
0.6
0.5
0.4
0.3
0.2
0.1
0.00
0
P(X)
0.20
Normal Approximation for Counts,
Proportions
• Let X be the number of successes in a SRS of size
n from a large population having proportion p of
successes, and let the sample proportion of
successes be denoted by
• Then for large n,
X
pˆ
n
– X is approximately normal with mean np and variance
np(1 – p).
– p̂ is approximately normal with mean p and variance
p(1 – p) / n.
Normal Approximation: Rule of
Thumb
• The accuracy of the approximation generally
improves as the sample size n increases.
• For any fixed sample size, the approximation is
most accurate when p is close to 0.5, and least
accurate when p is near 0 or 1.
• As a general rule of thumb, then, we use the
normal approximation for values of n and p such
that np ≥ 10 and n(1 – p) ≥ 10.
Example
• The Laurier Company’s brand has a market share
of 30%. Suppose that in a survey, 1,000
consumers of the product are asked which brand
they prefer. What is the probability that more than
32% of the respondents will say they prefer the
Laurier brand?
Another Example
• A quality engineer selects an SRS of size 100
switches from a large shipment for detailed
inspection. Unknown to the engineer, 10% of the
switches in the shipment fail to meet the
specifications. The actual binomial probability
that no more than 9 of the switches in the sample
fail inspection is P(X ≤ 9) = .4513.
• How accurate is the normal approximation for
this probability?
Another Example (cont.)
• Let X be the number of bad switches; then
X ~ B(100, 0.1).
X np
9
100
(
0
.
1
)
P( X 9) P
np (1 p)
100
(
0
.
1
)(
1
0
.
1
)
P( Z 0.33) 0.3707
• It’s not that accurate. Note that np = 10, so n and
p are on the border of values for which we are
willing to use the approximation.
Continuity Correction
• While the binomial distribution places probability
exactly on X = 9 and X = 10, the normal
distribution spreads probability continuously in
that interval.
• The bar for X = 9 in a probability histogram goes
from 8.5 to 9.5, but calculating P(X ≤ 9) using the
normal approximation only includes the area to
the left of the center of this bar.
• To improve the accuracy of our approximation,
we should let X = 9 extend from 8.5 to 9.5, etc.
Continuity Correction
• Use continuity correction to approximate the
binomial probability P(X=10) when n=100,
p=0.1
• Using the normal approximation to the binomial
distribution, X is approximately distributed as
N(10, 3).
Continuity Correction
The exact binomial probability is P(X=10)=0.13187
P(9.5<Xnormal<10.5)=0.13237
9.5 10 10.5
P(Xbinomial=10)=0.13187
Continuity Correction
8
8.5
P( X binomial 8) P( X normal 8.5)
Q: what about continuity correction for P(X<8)?
Continuity Correction
P( X binomial 14) P( X normal 13.5)
13.514
Q: what about continuity correction for P(X>14)?
Example Re-visited
• Using the continuity correction, the probability
that no more than 9 of the switches in the sample
fail inspection is
P( X binomial 9) P( X normal 9.5)
9
.
5
100
(
0
.
1
)
P Z
100
(
0
.
1
)(
1
0
.
1
)
P( Z .1667) 0.4338
Example: Inspection of Switches
• Find the probability that at least 5 but at most 15
switches fail the inspection.
P(5 X binom 15) P( X binom 15) P( X binom 4)
Sampling Distributions
• Counts and proportions are discrete random
variables; used to describe categorical data.
• Statistics used to describe quantitative data are
most often continuous random variables.
• Examples: sample mean, percentiles, standard
deviation
• Sample means are among the most common
statistics.
Sampling Distributions
• Regarding sample means,
– They tend to be less variable than individual
observations.
– Their distribution tends to be more normal than that
of individual observations.
• We’ll see why later.
Sampling Distributions of Sample
Means
• Let x be the mean of an SRS of size n from a
population having mean µ and standard deviation
σ.
• The mean and standard deviation of x are
x
x
• Why?
n
Sampling Distributions of Sample
Means
• The shape of the distribution of the sample mean
depends on the shape of the population
distribution itself.
• One special case: normal population distribution
If a population has the N ( , ) distributi on, then
the sample mean x of n independen t observatio ns
has the N ( , / n ) distributi on.
• Because: any linear combination of independent
normal random variables is normal distributed.
Example
• The foreman of a bottling plant has observed that
the amount of soda pop in each “32-ounce”
bottle is actually a normally distributed random
variable, with a mean of 32.2 ounces and a
standard deviation of .3 ounce.
– If a customer buys one bottle, what is the probability
that that bottle contains more than 32 ounces?
– If that same customer instead buys a carton of 4
bottles, what is the probability that the mean of those
4 bottles is greater than 32 ounces?
Example
• The starting salaries of M.B.A.s at Wilfrid Laurier
Univ.(WLU) are normally distributed with a mean
of $62,000 and a standard deviation of $14,500.
The starting salaries of M.B.A.s at the University
of Western Ontario (UWO) are normally
distributed with a mean of $60,000 and a standard
deviation of $18,300.
– A random sample of 50 WLU M.B.A.s and a random
sample of 60 UWO M.B.A.s are selected
– What is the probability that the sample mean of WLU
graduates will exceed that of the UWO graduates?
Central Limit Theorem
• When the population distribution is normal, so is
the sampling distribution of x
• What about when the population distribution is
non-normal?
• For large sample sizes, it turns out that the
distribution of x gets closer to a normal
distribution.
• As long as the population has finite standard
deviation, this will be true regardless of the actual
shape of the population distribution
Central Limit Theorem
• Formally, draw an SRS of size n from any
population with mean µ and finite standard
deviation σ.
• As n approaches infinity (gets very large)
x is approximat ely N ,
n
• This can hold even if the observations are not
independent or identically distributed.
• This is why normal distributions are common
models for observed data.