Professional Documents
Culture Documents
Statistical Intervals For A Single Sample
Statistical Intervals For A Single Sample
Section 8.1:
CI for µ when σ 2 known & drawing from normal distribution
Section 8.1.2:
Sample size calculation for estimating µ with specified error, σ 2 known
Section 8.2:
CI for µ when σ 2 unknown & drawing from normal distribution
1 / 31
Confidence Intervals
Point estimates are a good start, but we should also give the client
some idea of the confidence in our estimate.
2 / 31
Confidence Interval for µ - Normal parent population, known σ2
( )
4 5 6 7 8 9 10 11 12
x
3 / 31
Confidence Interval for µ - Normal parent population, known σ2
( )
4 5 6 7 8 9 10 11 12
x
“We are 95% confident that the true mean µ falls in this interval.”
4 / 31
Confidence Interval for µ - Normal parent population, known σ2
X̄ − µ
Z= √ ∼ N (0, 1)
σ/ n
Using this probability distribution, we have
P (−z0.025 ≤ Z ≤ z0.025 ) = 0.95
X̄ − µ
P (−z0.025 ≤ √ ≤ z0.025 ) = 0.95
σ/ n
where z0.025 is the 97.5th percentile of the standard normal (next slide).
5 / 31
Confidence Interval for µ - Normal parent population, known σ2
X̄−µ
P (−z0.025 ≤ √
σ/ n
≤ z0.025 ) = 0.95
-z z
NOTATION: z0.025 is the z-value such that 97.5% of the distribution is below and 2.5% is
above it (an upper tail z-value).
6 / 31
Confidence Interval for µ - Normal parent population, known σ2
We can state the lower and upper end-points of the 95% CI for µ
from a random sample of size n drawn from a normally distributed
population with variance σ 2 and sample mean of x̄ as:
Lower end-point (L) = x̄ − z0.025 √σn
Upper end-point (U) = x̄ + z0.025 √σn
NOTE: x̄ lies in the center of the 2-sided confidence interval.
We are 95% confident that the true parameter value lies in this interval.
NOTE: Because σ 2 was very small and n was fairly large, we have a very narrow confidence
interval for µ (which is good).
8 / 31
Confidence Interval for µ - Normal parent population, known σ2
CI for any choice of confidence level, or 100(1-α)% confidence
The confidence level of choice is stated as 100(1 − α)%.
For a 95% confidence interval, α = 0.05.
For an 80% confidence interval, α = 0.20.
X̄ − µ
P (−zα/2 ≤ √ ≤ zα/2 ) = 1 − α
σ/ n
We are 80% confident that the true parameter value lies in this interval.
NOTE: Because σ 2 was very small and n was fairly large, we have a very narrow confidence
interval for µ (which is good).
11 / 31
Confidence Interval for µ - Normal parent population, known σ2
The 95% CI is wider... i.e. All else being held constant, if you want to
be more confident you capture µ, you’ll have to make your net bigger.
12 / 31
Confidence Interval for µ - Normal parent population, known σ2
x̄ ± zα/2 · √σ
n
|{z} |{z} |{z}
Sample multiplier value
mean based on based on
confidence σ and
level sample size
↑
changes
for different
% CI
↑
standard
error of the
sample mean
13 / 31
Confidence Interval for µ - Normal parent population, known σ2
14 / 31
Confidence Interval Interpretation
For example, the 95% CI for box fill weights was: [12.030, 12.070]
15 / 31
Confidence Interval Interpretation
For a 95% CI, we are 95% confident that the true µ lies in the
interval. This statement of confidence reflects the following...
16 / 31
Confidence Interval Interpretation & Simulation
17 / 31
Sample Size Calculation for µ
What sample size should you choose? (when you CAN choose)
Let E be the error in estimating µ, distance of observed x̄ from target.
E=|x̄ − µ|
18 / 31
Sample Size Calculation for µ
z
α/2 · σ 2
n=
E
19 / 31
Sample Size Calculation for µ
NOTE: Read sample size problems closely to determine if they are giving precision as a
half-width of a CI which is E (the cushion up or down), or the full width of the CI which is 2E.
20 / 31
One-sided Confidence Bounds for µ
21 / 31
Confidence Interval for µ - Normal parent pop’n, unknown σ2
What if we don’t know σ? Can I just plug-in my estimator for σ
(or s) and again have the same 95% CI?
(xi − x̄)2
P
2 2
σ̂ = s =
n−1
This was a 95% CI for µ when σ was known
σ σ
x̄ − z0.025 √ ≤ µ ≤ x̄ + z0.025 √
n n
So, how do we incorporate this extra uncertainty (for not knowing σ)?
22 / 31
Confidence Interval for µ - Normal parent pop’n, unknown σ2
where...
23 / 31
Confidence Interval for µ - Normal parent pop’n, unknown σ2
X̄ − µ
Z= √ ∼ N (0, 1)
σ/ n
X̄ − µ
T = √ ∼ tn−1
S/ n
24 / 31
Confidence Interval for µ - Normal parent pop’n, unknown σ2
What does the t-distribution look like?
There is only one Z-distribution, but there are many t-distributions
(distinguished by their degrees of freedom df as tdf ). They look a lot
like the N (0, 1), except they have heavier tails.
For estimating a single parameter µ, the degrees of freedom is n − 1.
The heaviness of the tails depends on the degrees of freedom
(the subscript on the t), so it depends on the sample size n.
Differing t-distributions are shown below with df = k.
25 / 31
Confidence Interval for µ - Normal parent pop’n, unknown σ2
For a large sample size n, df = n − 1 is very large, and the tn−1 looks
just like the N (0, 1).
26 / 31
Confidence Interval for µ - Normal parent pop’n, unknown σ2
s s
x̄ − tα/2,df √ ≤ µ ≤ x̄ + tα/2,df √
n n
27 / 31
Confidence Interval for µ - Normal parent pop’n, unknown σ2
How do I get the tα/2,n−1 value? Similar to getting a z-value.
When α = 0.05 (for 95% CI) and the sample size is n = 10,
tα/2,n−1 = t0.025,9
This is the t-value for a t9 distribution with 2.5% above and 97.5%
below. Looking at the table...
t0.025,9 = 2.262
28 / 31
Confidence Interval for µ - Normal parent pop’n, unknown σ2
Upper end-point:
x̄ + tα/2,n−1 · √s = x̄ + t0.025,9 · √s = 8.94 + 2.262 4.3
√ = 10.02
n n 10
Lower end-point:
x̄ − tα/2,n−1 · √s = 8.94 − 2.262 4.3
√ = 5.86
n 10
We are 95% confident that the true mean µ is between 5.86 and 10.02.
29 / 31
Confidence Interval for µ - Normal parent pop’n, unknown σ2
30 / 31
100(1 − α)% Confidence Interval for µ
RULE OF THUMB
σ σ
When σ is known, use x̄ − zα/2 √ ≤ µ ≤ x̄ + zα/2 √
n n
s s
When σ is unknown, use x̄ − tα/2,df √ ≤ µ ≤ x̄ + tα/2,df √
n n
31 / 31