Sampling Distributions and Confidence Intervals
Sampling Distributions and Confidence Intervals
Random variable, X,
is age of individuals
Values of X: 18, 20,
22, 24 (years)
Developing a
Sampling Distribution
(continued)
μ
X i P(x)
N .3
18 20 22 24 .2
21
4 .1
0
σ
(X μ)
i
2
2.236
18 20 22 24 x
N A B C D
Developing a
Sampling Distribution
(continued)
Now consider all possible samples of size n=2
16 Sample
1st 2nd Observation
Obs Means
18 20 22 24
1st 2nd Observation
18 18,18 18,20 18,22 18,24 Obs 18 20 22 24
20 20,18 20,20 20,22 20,24 18 18 19 20 21
22 22,18 22,20 22,22 22,24
20 19 20 21 22
24 24,18 24,20 24,22 24,24
16 possible samples 22 20 21 22 23
(sampling with
replacement)
24 21 22 23 24
Developing a
Sampling Distribution
(continued)
μX
X i
18 19 21 24
21
N 16
σX
( X i μ X
) 2
.2 .2
.1 .1
0
X
0
18 19 20 21 22 23 24
_
18 20 22 24 X
A B C D
Expected Value of Sample Mean
Different samples of the same size from
the same population will yield different
sample means.
Let X represent a sample mean,
represent the population mean.
Expected value of sample means:
E ( X)
Standard Error of the Mean
A measure of the variability in the mean from
sample to sample is given by the Standard
Error of the Mean:
σ
σX
n
Note that the standard error of the mean
decreases as the sample size increases
If the Population is Normal
If a population is normal with mean μ and
standard deviation σ, the sampling distribution
of X is also normally distributed with
σ
μX μ and σX
n
Sampling Distribution Properties
Normal Population
μx μ Distribution
μ x
(i.e. x is unbiased ) Normal Sampling
Distribution
(has the same mean)
μx
x
Sampling Distribution Properties
(continued)
As n increases, Larger
σ decreases
x
sample size
Smaller
sample size
μ x
If the Population is not Normal
We can apply the Central Limit Theorem:
σ
μx μ and σx
n
Central Limit Theorem
the sampling
As the n↑
distribution
sample
becomes
size gets
almost normal
large
regardless of
enough…
shape of
population
x
Illustrations of
Central Limit Theorem
How Large is Large Enough?
( X μX ) ( X μ)
Z
σX σ
n
where: X = sample mean
μ = population mean
σ = population standard deviation
n = sample size
Example
Suppose a population has mean μ = 8 and
standard deviation σ = 3. Suppose a random
sample of size n = 36 is selected.
Lower Upper
Confidence Confidence
Point Estimate
Limit Limit
Width of
confidence interval
Confidence Intervals
How much uncertainty is associated with a
point estimate of a population parameter?
Sample
Confidence Level, (1-)
Confidence for which the interval will contain
the unknown population parameter
Suppose confidence level = 95%, also written
(1 - ) = 0.95
Interpretation: in the long run, 95% of all the
confidence intervals that can be constructed
will contain the unknown true parameter
A specific interval either will contain or will not
contain the true parameter (no probability
involved in a specific interval)
Confidence Intervals
Confidence
Intervals
Population Population
Mean Proportion
σ Known σ Unknown
Confidence Interval for μ
(σ2 Known)
Assumptions
Population variance σ2 is known
Population is normally distributed
If population is not normal, use large sample
X
z
n
α α
1
2 2
σ σ
x z α/2 μ x z α/2
n n
α α
0.025 0.025
2 2
/2 1 /2
x
Intervals μx μ
extend from x1
σ x2 (1-)x100%
X Z of intervals
n
constructed
to
σ contain μ;
X Z
n ()x100% do
not.
Confidence Intervals
Example
A sample of 11 circuits from a large normal
population has a mean resistance of 2.20
ohms. We know from past testing that the
population standard deviation is 0.35 ohms.
Solution: σ
X Z
n
2.20 1.96 (0.35/ 11 )
2.20 0.2068
1.9932 2.4068
Interpretation
We are 95% confident that the interval
from 1.9932 to 2.4068 ohms contains the
true mean resistance;
Although the true mean may or may not be
in this interval, 95% of intervals formed in
this manner will contain the true mean
Confidence Interval for μ
(σ Unknown)
S S
x t n-1,α/2 μ x t n-1,α/2
n n
where tn-1,α/2 is the critical value of the t distribution with n-1 d.f. and an
area of α/2 in each tail.
Student’s t Distribution
The t is a family of distributions
The t value depends on degrees of
freedom (d.f.)
Number of observations that are free to vary after
sample mean has been calculated
d.f. = n - 1
Degrees of Freedom (df)
Idea: Number of observations that are free to vary
after sample mean has been calculated
Standard
Normal
(t with df = ∞)
t (df = 13)
t-distributions are bell-
shaped and symmetric, but
have ‘longer’ tails than the t (df = 5)
normal
0 t
Student’s T Table
Upper Tail Area
Let: n = 3
df .25 .10 .05 df = n - 1 = 2
= 0.10
1 1.000 3.078 6.314 /2 = 0.05
Confidence t t t Z
Level (10 d.f.) (20 d.f.) (30 d.f.) ____
Note: t Z as n increases
In Excel
TDIST(x, Degree_of_freedom, Tails)
TDIST(2.92, 2, 2) = 0.1
Return the probability T-student distribution
TINV(Probability, Degree_of_freedom)
TINV(0.1, 2) = 2.92
Return the t-value for two tails
Example
A random sample of n = 25 has X = 50 and
S = 8. Form a 95% confidence interval for μ
Population Population
Mean Proportion
σ Known σ Unknown
Confidence Intervals for the
Population Proportion, π
(1 )
σp
n
We will estimate this with sample data
p(1 p)
n
Confidence Interval Endpoints
Upper and lower confidence limits for the population
proportion are calculated with the formula:
p(1 p)
p Z α/2
n
where
Zα/2 is the standard normal value for the level of confidence desired
p is the sample proportion
n is the sample size
Note: must have X = np > 5 and n – X = n(1-p) > 5
Example
A random sample of 100 people shows that
25 are left-handed. Form a 95% confidence
interval for the true proportion of left-handers.
Determining
Sample Size
Determining
Sample Size
For the
Mean
σ σ 2
Z σ 2
XZ eZ n
n n e 2
Sampling Solve
error for n
Required Sample Size Example
If = 45, what sample size is needed to
estimate the mean within ± 5 with 90%
confidence?
2 2 2 2
Z σ (1.645) (45)
n 2
2
219.19
e 5
For the
Proportion
Solution:
For 95% confidence, use Zα/2 = 1.96
e = 0.03
p = 0.12, so use this to estimate π
2
Z/2 π (1 π ) (1.96) (0.12)(1 0.12)
2
n 2
2
450.74
e (0.03)
So use n = 451
Summary
Introduced the concept of confidence intervals
Discussed point estimates
Developed confidence interval estimates
Created confidence interval estimates for the mean
Created confidence interval estimates for the
proportion
Determined sample size
Homeworks
Ebook: Chaper 8
8.66
8.70
8.72
8.86
8.90