Lecture 7 Confidence Interval
Lecture 7 Confidence Interval
DSRT 734
UC – Summer 2020
1
Outline
Deviation
2
Section 6.1
Larson/Farber 4th ed 3
Section 6.1 Objectives
Larson/Farber 4th ed 4
Point Estimate for Population μ
Point Estimate
• A single value estimate for a population parameter
• Most unbiased point estimate of the population mean
μ is the sample mean x
Larson/Farber 4th ed 5
Example: Point Estimate for Population μ
9 20 18 16 9 9 11 13 22 16 5 18 6 6 5 12 25
17 23 7 10 9 10 10 5 11 18 18 9 9 17 13 11 7
14 6 11 12 11 6 12 14 11 9 18 12 12 17 11 20
Larson/Farber 4th ed 6
Solution: Point Estimate for Population μ
Larson/Farber 4th ed 7
Interval Estimate
Interval estimate
• An interval, or range of values, used to estimate a population
parameter.
Point estimate
12.4
( • )
Interval estimate
Larson/Farber 4th ed 8
Level of Confidence
Level of confidence c
• The probability that the interval estimate contains the
population parameter. c is the area under the
c standard normal curve
between the critical values.
½(1 – c) ½(1 – c)
z
-zc z=0 zc
Use the Standard Normal
Table to find the
Critical values corresponding z-scores.
Larson/Farber 4th ed 9
Level of Confidence
c = 0.90
z
zc
-zc = -1.645 z=0 zc =zc1.645
Larson/Farber 4th ed 10
Sampling Error
Sampling error
• The difference between the point estimate and the
actual population parameter value.
• For μ:
the sampling error is the difference x – μ
μ is generally unknown
x varies from sample to sample
Larson/Farber 4th ed 11
Margin of Error
Margin of error
• The greatest possible distance between the point estimate
and the value of the parameter it is estimating for a given
level of confidence, c.
• Denoted by E.
Larson/Farber 4th ed 12
Example: Finding the Margin of Error
Larson/Farber 4th ed 13
Solution: Finding the Margin of Error
• First find the critical values
0.95
0.025 0.025
z
-zc = zc
-1.96 z=0 zczc= 1.96
95% of the area under the standard normal curve falls
within 1.96 standard deviations of the mean. (You
can approximate the distribution of the sample means
with a normal curve by the Central Limit Theorem,
because n ≥ 30.)
Larson/Farber 4th ed 14
Solution: Finding the Margin of Error
You are 95% confident that the margin of error for the
population mean is about 1.4 sentences.
Larson/Farber 4th ed 15
Confidence Intervals for the Population
Mean
A c-confidence interval for the population mean μ
• x E x E where E zc
n
Larson/Farber 4th ed 16
Constructing Confidence Intervals for μ
Finding a Confidence Interval for a Population Mean
(n 30 or σ known with a normally distributed population)
In Words In Symbols
1. Find the sample statistics n and x
x
x. n
2. Specify , if known. Otherwise, if n
30, find the sample standard
(x x ) 2
deviation s and use it as an estimate s
n 1
for .
Larson/Farber 4th ed 17
Constructing Confidence Intervals for μ
In Words In Symbols
3. Find the critical value zc that Use the Standard
corresponds to the given Normal Table.
level of confidence.
E zc
4. Find the margin of error E. n
5. Find the left and right Left endpoint: x E
endpoints and form the Right endpoint: x E
confidence interval. Interval:
xE xE
Larson/Farber 4th ed 18
Example: Constructing a Confidence
Interval
Construct a 95% confidence interval for the mean
number of sentences in all magazine advertisements.
Larson/Farber 4th ed 20
Example: Constructing a Confidence
Interval σ Known
A college admissions director wishes to estimate the
mean age of all students currently enrolled. In a random
sample of 20 students, the mean age is found to be 22.9
years. From past studies, the standard deviation is
known to be 1.5 years, and the population is normally
distributed. Construct a 90% confidence interval of the
population mean age.
Larson/Farber 4th ed 21
Solution: Constructing a Confidence
Interval σ Known
• First find the critical values
c = 0.90
z
zc
-zc = -1.645 z=0 zc =zc1.645
zc = 1.645
Larson/Farber 4th ed 22
Solution: Constructing a Confidence
Interval σ Known
• Margin of error:
1.5
E zc 1.645 0.6
n 20
• Confidence interval:
Left Endpoint: Right Endpoint:
xE xE
22.9 0.6 22.9 0.6
22.3 23.5
22.3 < μ < 23.5
Larson/Farber 4th ed 23
Solution: Constructing a Confidence
Interval σ Known
With 90% confidence, you can say that the mean age
of all the students is between 22.3 and 23.5 years.
Larson/Farber 4th ed 24
Interpreting the Results
Larson/Farber 4th ed 25
Interpreting the Results
Larson/Farber 4th ed 26
Sample Size
Larson/Farber 4th ed 27
Example: Sample Size
Larson/Farber 4th ed 28
Solution: Sample Size
0.025 0.025
z
-zc = -1.96
zc z=0 zczc= 1.96
zc = 1.96
Larson/Farber 4th ed 29
Solution: Sample Size
Larson/Farber 4th ed 30
Section 6.1 Summary
Larson/Farber 4th ed 31
Section 6.2
Larson/Farber 4th ed 32
Section 6.2 Objectives
Larson/Farber 4th ed 33
The t-Distribution
Larson/Farber 4th ed 34
Properties of the t-Distribution
1. The t-distribution is bell shaped and symmetric
about the mean.
2. The t-distribution is a family of curves, each
determined by a parameter called the degrees of
freedom. The degrees of freedom are the number of
free choices left after a sample statistic such as isx
calculated. When you use a t-distribution to estimate
a population mean, the degrees of freedom are equal
to one less than the sample size.
d.f. = n – 1 Degrees of freedom
Larson/Farber 4th ed 35
Properties of the t-Distribution
3. The total area under a t-curve is 1 or 100%.
4. The mean, median, and mode of the t-distribution are equal to zero.
5. As the degrees of freedom increase, the t-distribution approaches the
normal distribution. After 30 d.f., the t-distribution is very close to the
standard normal z-distribution.
tc = 2.145
Larson/Farber 4th ed 37
Solution: Critical Values of t
c = 0.95
t
-tc = -2.145 tc = 2.145
Larson/Farber 4th ed 38
Confidence Intervals for the Population
Mean
A c-confidence interval for the population mean μ
s
• x E x E where E tc
n
Larson/Farber 4th ed 39
Confidence Intervals and t-Distributions
In Words In Symbols
1. Identify the sample x (x x )2
x s
statistics n, x, and s. n n 1
s
3. Find the margin of error E. E tc
n
Larson/Farber 4th ed 40
Confidence Intervals and t-Distributions
In Words In Symbols
4. Find the left and right Left endpoint: x E
endpoints and form the Right endpoint: x E
confidence interval. Interval:
xE xE
Larson/Farber 4th ed 41
Example: Constructing a Confidence
Interval
You randomly select 16 coffee shops and measure the
temperature of the coffee sold at each. The sample mean
temperature is 162.0ºF with a sample standard deviation
of 10.0ºF. Find the 95% confidence interval for the
mean temperature. Assume the temperatures are
approximately normally distributed.
Solution:
Use the t-distribution (n < 30, σ is unknown,
temperatures are approximately distributed.)
Larson/Farber 4th ed 42
Solution: Constructing a Confidence
Interval
• n =16, x = 162.0 s = 10.0 c = 0.95
• df = n – 1 = 16 – 1 = 15
• Critical Value
Table 5: t-Distribution
tc = 2.131
Larson/Farber 4th ed 43
Solution: Constructing a Confidence
Interval
• Margin of error:
s 10
E tc
• Confidence interval:
2.131 5.3
n 16
Point estimate
156.7 162.0 167.3
( •x )
xE xE
Larson/Farber 4th ed 45
Normal or t-Distribution?
Is n 30? Yes
Use the normal distribution with
σ
No E zc
n
Is the population normally, If is unknown, use s instead.
or approximately No
normally, distributed? Cannot use the normal distribution
or the t-distribution.
Yes
Is known? Yes
Use the normal distribution
No with E z σ
c
n
Use the t-distribution with
s
E tc
n
and n – 1 degrees of freedom.
Larson/Farber 4th ed 46
Example: Normal or t-Distribution?
You randomly select 25 newly constructed houses. The
sample mean construction cost is $181,000 and the
population standard deviation is $28,000. Assuming
construction costs are normally distributed, should you
use the normal distribution, the t-distribution, or neither
to construct a 95% confidence interval for the
population mean construction cost?
Solution:
Use the normal distribution (the population is
normally distributed and the population standard
deviation is known)
Larson/Farber 4th ed 47
Section 6.2 Summary
Larson/Farber 4th ed 48
Section 6.3
Larson/Farber 4th ed 49
Section 6.3 Objectives
Larson/Farber 4th ed 50
Point Estimate for Population p
Population Proportion
• The probability of success in a single trial of a
binomial experiment.
• Denoted by p
Point Estimate for p
• The proportion of successes in a sample.
• Denoted by
x number of successes in sample
pˆ
n number in sample
read as “p hat”
Larson/Farber 4th ed 51
Point Estimate for Population p
Larson/Farber 4th ed 52
Example: Point Estimate for p
Larson/Farber 4th ed 53
Confidence Intervals for p
• pq
ˆˆ
pˆ E p pˆ E where E zc
n
Larson/Farber 4th ed 54
Constructing Confidence Intervals for p
In Words In Symbols
1. Identify the sample statistics n and x.
2. Find the point estimate
x
p̂ .
3. Verify that the sampling distribution pˆ
n
of can be approximated by the
normal distribution.
p̂ npˆ 5, nqˆ 5
4. Find the critical value zc that
corresponds to the given level of
confidence c.
Use the
Standard
Normal Table
Larson/Farber 4th ed 55
Constructing Confidence Intervals for p
In Words In Symbols
pq
ˆˆ
5. Find the margin of error E. E zc
n
Larson/Farber 4th ed 56
Example: Confidence Interval for p
Larson/Farber 4th ed 57
Solution: Confidence Interval for p
Larson/Farber 4th ed 58
Solution: Confidence Interval for p
• Confidence interval:
Left Endpoint: Right Endpoint:
pˆ E pˆ E
0.29 0.025 0.29 0.025
0.265 0.315
0.265 < p < 0.315
Larson/Farber 4th ed 59
Solution: Confidence Interval for p
Point estimate
0.265 0.29 0.315
( • )
p̂ E p̂ p̂ E
Larson/Farber 4th ed 60
Sample Size
Larson/Farber 4th ed 61
Example: Sample Size
Solution:
Because you do not have a preliminary estimate
for p̂ use pˆ 0.5 and qˆ 0.5.
Larson/Farber 4th ed 62
Solution: Sample Size
2 2
zc 1.96
ˆ ˆ (0.5)(0.5)
n pq 1067.11
E 0.03
Larson/Farber 4th ed 63
Example: Sample Size
Solution:
Use the preliminary estimate pˆ 0.31
qˆ 1 pˆ 1 0.31 0.69
Larson/Farber 4th ed 64
Solution: Sample Size
Larson/Farber 4th ed 66
Section 6.4
Larson/Farber 4th ed 67
Section 6.4 Objectives
Larson/Farber 4th ed 68
The Chi-Square Distribution
Larson/Farber 4th ed 69
The Chi-Square Distribution
Larson/Farber 4th ed 70
Properties of The Chi-Square Distribution
Larson/Farber 4th ed 71
Properties of The Chi-Square Distribution
chi-square distributions
Larson/Farber 4th ed 72
Critical Values for χ2
• There are two critical values for each level of
confidence.
• The value χ2R represents the right-tail critical value
• The value χ2L represents the left-tail critical value.
Larson/Farber 4th ed 73
Example: Finding Critical Values for χ2
2 2
Find the critical values R and L for a 90% confidence
interval when the sample size is 20.
Solution:
•d.f. = n – 1 = 20 – 1 = 19 d.f.
• Each area in the table represents the region under the
chi-square curve to the right of the critical value.
1 c 1 0.90
• Area to the right of χ R = 2 2 0.05
2
1 c 1 0.90
• Area to the right of χ L = 2 2 0.95
2
Larson/Farber 4th ed 74
Solution: Finding Critical Values for χ2
Table 6: χ2-Distribution
R2 30.144 L2 10.117
90% of the area under the curve lies between 10.117 and
30.144
Larson/Farber 4th ed 75
Confidence Intervals for 2 and
Larson/Farber 4th ed 76
Confidence Intervals for 2 and
In Words In Symbols
1. Verify that the population has a
normal distribution.
2. Identify the sample statistic n and d.f. = n – 1
the degrees of freedom.
2
( x x )
3. Find the point estimate s2. s2
n 1
4. Find the critical value χ2R and χ2L
that correspond to the given level of Use Table 6 in
confidence c. Appendix B
Larson/Farber 4th ed 77
Confidence Intervals for 2 and
In Words In Symbols
5. Find the left and right endpoints
and form the confidence interval (n 1)s 2 2 (n 1) s 2
2 σ
for the population variance. R L2
6. Find the confidence interval for the
population standard deviation by
taking the square root of each
endpoint.
(n 1)s 2 (n 1)s 2
2 σ
R L2
Larson/Farber 4th ed 78
Example: Constructing a Confidence
Interval
You randomly select and weigh 30 samples of an allergy
medicine. The sample standard deviation is 1.20
milligrams. Assuming the weights are normally
distributed, construct 99% confidence intervals for the
population variance and standard deviation.
Solution:
•d.f. = n – 1 = 30 – 1 = 29 d.f.
Larson/Farber 4th ed 79
Solution: Constructing a Confidence
Interval
1 c 1 0.99
• Area to the right of χ R = 2 2 0.005
2
1 c 1 0.99
• Area to the right of χ L = 2 2 0.995
2
Larson/Farber 4th ed 80
Solution: Constructing a Confidence
Interval
Confidence Interval for 2:
(n 1)s 2 (30 1)(1.20) 2
Left endpoint: 2
52.336
0.80
R
2 2
Right endpoint: (n 1)s (30 1)(1.20)
3.18
L2 13.121
Larson/Farber 4th ed 83