Chapter 7 Confidence Intervals

Report
Chapter 7
Confidence Intervals
INTRODUCTION
DERIVATION
NOTATIONS AND GENERAL FORM
1 SAMPLE Z-INTERVAL FOR Μ
1 SAMPLE T-INTERVAL FOR Μ
2 INDEPENDENT SAMPLE T-INTERVAL FOR Μ
2 DEPENDENT SAMPLE T-INTERVAL FOR Μ
Z-INTERVAL FOR P
SAMPLE SIZE
Introduction
In this chapter, we will estimate the population parameter
using an interval.
This interval will ‘capture’ the true population parameter with
a certain measure of precision.
Example: A 95% confidence interval for µ is (13, 18)
Notations and General Form
CI - confidence interval
CV - critical value
ME - margin of error
SE - standard error
SD - standard deviation
pt.est. - point estimate
Zα/2 - normal distribution critical value(use invnorm)
t(n-1,α/2) - students t distribution critical value with n-1
degrees of freedom (use math solver or the invT)
Notations and General Form
General Formula:
Pt .est  CV  SE
Notations and General Form
PointEstimate
Pointestimate
Parameter

X
pˆ
p
Standard Error(SE)
for X, SE  SD/ n
for pˆ , SE 
pˆ (1- pˆ )
n
Notations and General Form
Critical Value
Z-critical value
Z1-α/2 = InvNorm(1 - α/2)
example: 95% Confidence interval
α = 1 – 0.95
= 0.05
Z 1-α /2 = InvNorm(1- α/2)
= InvNorm(1-(.05/2))
= 1.96
Notations and General Form
Critical Value
T-critical value
t (1-α /2, df) = InvT(1-α/2, degrees of freedom)
or
t (1-α /2, df) = L on math solver (for TI-83)
Math -> solver -> tcdf(L,U,D) – A
L = CV
U = 9999
D = degrees of freedom
A = α/2
Notations and General Form
Example: 95% confidence interval based on a sample
size of 20. (α = .05, df = n-1 = 19)
T-critical value
t (1-α /2, df) = InvT(1-(0.05/2), 19)
Math->solver->tcdf(L,U,D) – A
L = CV (highlight and then press alpha enter)
U = 9999
D = 19
A = .025
ANSWER: t (1-0.025, 19) = 2.0930
1 Sample Z-interval for µ
Population Standard Deviation (σ) is known
Formula
X  Z / 2( / n )
where
X  pt.est.
Z1 / 2  Crit icalValue
( / n )  St andard Error
Z1 / 2 ( / n )  Margin of Error
1 Sample Z-interval for µ
Suppose the time allotted for commercials on a primetime
TV program is known to have a normal distribution with a
standard deviation of 1.5 minutes. A study of 25 showings
gave an average commercial time of 11 minutes. Find the
95% confidence interval for the true population mean, μ.
Given:
  1.5 (thisis theknown populationstandarddeviation)
n  25
X  11
Confidence level = 0.95
Critical value = invNorm(1-.05/2) = 1.96
1 Sample Z-interval for µ
A 95% confidence interval for μ is
 pt.est  CV * SE
 X  Z * ( / n )
 11 1.96* (1.5 / 25)
 11 1.96* 0.3
 11 0.588
 (10.412,11.588)
We are 95% confident that the average time in
commercials is between 10.412 and 11.588 minutes
Using 1-sampZInterval in TI-83/84
Stat -> Tests -> ZInterval
Notes on intervals
Effect of confidence level
Higher confidence level results to a longer confidence
interval since CV increases as α decreases.
Example, Z = 1.645 when α = .10 while Z = 1.96 when α = .05
Effect of sample size
Increasing sample size (n) shortens the confidence
interval since SE = SD/sqrt(n).
Note: level of significance (α)
confidence level (1- α)*100%
1 Sample t-interval for µ
Population Standard Deviation (σ) is unknown
Formula
X  t ( / 2, n  1)( SD / n )
where
X  pt.est.
t (1   / 2, n  1)  CriticalValue
SD / n  Standard Error
t (1   / 2, n  1)( SD / n )  Margin of Error
df  n - 1
1 Sample t-interval for µ
A random sample of 12 graduates of a certain secretarial school typed an
average of 79.3 words per minute with a standard deviation of 7.8 words
per minute. Assuming normal distribution for the number of words typed
per minute, find a 95% confidence interval for the average number of
words typed by all graduates of this school.
Given:
  not given
n  12
X  79.3
SD  7.8
Confidence level = 0.95
Critical value = 2.201
1 Sample t-interval for µ
A 95% confidence interval for μ is
 X  t ( SD / n )
 79.3  2.201* (7.8 / 12)
 79.3  2.201* 2.2517
 79.3  4.9559
 (74.3441,84.2559)
We are 95% confident that the average number of words
the graduates type per minute is between 74.3441 and 84.2559
words.
Using 1-samptInterval in TI-83/84
Stat -> Tests -> tInterval
2 Independent Sample t-interval for µ
.
Confidence Interval for µ1 - µ2
Formula
( X 1  X 2 )  t ( / 2, n1  n 2  2)
1 1
S   
 n1 n2 
2
p
where
Sp
2
(n1  1) S12  (n2  1) S 22

n1  n2  2
t( / 2, n1  n 2  2)  CriticalValue
Requirement 1: Both samples where taken from a normal distribution
Requirement 2: The population standard deviations are equal (σ1=σ2=σ)
2 Independent Sample t-interval for µ
Do credit cards with no annual fee charge higher interest rates than
cards that have annual fees? Among 29 cards surveyed, 17 had no
annual fees while 12 charged an annual fee. Among the cards with no
annual fee, the average interest rate was 19% (SD = 8%). Among cards
with an annual fee, the average interest rate was 17% (SD = 3%).
a. What assumptions do you need to get a confidence interval for the
difference in average interest rate?
b. Calculate the estimate of the common standard deviation.
c. Construct a 95% interval estimate for the difference in average
interest rates.
2 Independent Sample t-interval for µ
a. What assumptions do you need to get a confidence interval for
the difference in average interest rate?
The samples were taken from normally distributed populations
and that they have a common standard deviation.
2 Independent Sample t-interval for µ
b. Calculate the estimate of the common standard deviation.
Average ( )
SD (S)
Sample Size (n)
No Annual Fee
0.19
0.08
17
S2p
With Annual Fee
0.17
0.03
12
X WO  X W
0.19 – 0.17 = 0.02
2
(nWO  1) SWO
 (nW  1) SW2

nWO  nW  2
(17  1)0.082  (12  1)0.032

17  12  2
 0.004159
2 Independent Sample t-interval for µ
c. Construct a 95% interval estimate for the difference in average interest
rates.
Level of Confidence (1-α) = 0.95  α = 0.05
Critical value (tα/2,df=n1+n2-2 = t0.05/2,df=27 = t0.025,27) = 2.052
A 95% confidence interval for is calculated as
1
1 

( X WO  X W )  t S p2  
 n1 n2 
1 
 1
0.02  2.052 0.0041592593



17
12


0.02  2.052(0.0243159875
)
0.02  0.0498964063
( 0.0299,0.06989)
Therefore, with 95% confidence, the difference in average interest
rate will lie between -2.99% and 6.99%.
2 Independent Sample t-interval for µ
Using 2-samptInterval in TI-83/84
Average ( )
SD (S)
Sample Size (n)
No Annual Fee
0.19
0.08
17
Stat -> Tests -> 2samptInt
With Annual Fee
0.17
0.03
12
0.19 – 0.17 = 0.02
2 Independent Sample t-interval for µ
Suppose it is of interest to estimate the difference in
the first exam scores of STAT 2160 male and female
students. A random sample of 16 males and 17
females taking the course this semester was drawn
and asked about their scores. Among male students,
the average was found to be 15.28 with a standard
deviation of 2.3, while among females, the average is
16.5 with a standard deviation of 1.6. Assuming the
scores follow a normal distribution with equal
variances, construct a 95% CI for the true difference
in the first exam scores of male and female STAT
2160 students.
2 Independent Sample t-interval for µ
Step 1: Create a table of given values
MALE
FEMALE
n
16
17
Mean
15.28
16.5
Standard Deviation
2.3
1.6
Step 2: Compute for the common variance
2
2
(
n

1
)
S

(
n

1
)
S
1
2
2
S p2  1
n1  n2  2
2 Independent Sample t-interval for µ
2
2
(
16

1
)
2
.
3

(
17

1
)
1
.
6
2
Sp 
16  17  2
S  3.880967742
2
p
2 Independent Sample t-interval for µ
Step 3: Obtain the Critical Value (CV)
95% CI  α = 0.05
CV = invT(1-α/2, n1+n2-2)
= invT(0.975, 31)
= 2.0395
2 Independent Sample t-interval for µ
Step 4: Plug-in the values in the CI formula
( X 1  X 2 )  t ( / 2, n1  n 2  2)
1 1
S   
 n1 n2 
2
p
1
1
(15.28 16.5)  2.0395 3.880967742
  
 16 17 
 1.22 2.0395(0.6861870765
)
 2.6195,0.1795
iClicker
2 Dependent Sample t-interval for µ
There is one sample but measured twice
Formula
X DIFF  t ( / 2, n  1)( SDDIFF / n )
where
X DIFF  averageof thedifferences
t ( / 2, n  1)  Critical value
SD DIFF / n  SE of thedifferences
2 Dependent Sample t-interval for µ
The table below shows the opening and closing prices of a sample of 10 active
stocks on a certain day. Give an estimate of the difference in the average stock
prices? What is the corresponding standard error of this estimate?
Intel Corp
Citigroup Inc
Bank of America Corp
JPMorgan Chase & Co
General Electric Co
Microsoft Corp
Pfizer Inc
Exxon Mobil Corp
Coca-Cola Co
Alcoa Inc
Opening Price
16.09
17.47
25.6
41.52
20.11
23.77
17.03
67.69
46.48
11.54
Closing Price
16.25
16.32
24.67
42.33
19.37
23.44
16.93
62.92
49.23
10.09
2 Dependent Sample t-interval for µ
First, we need to take the difference between the two prices for each
stock.
Intel Corp
Citigroup Inc
Bank of America Corp
JPMorgan Chase & Co
General Electric Co
Microsoft Corp
Pfizer Inc
Exxon Mobil Corp
Coca-Cola Co
Alcoa Inc
Opening Price
Closing Price
Difference
16.09
17.47
25.6
41.52
20.11
23.77
17.03
67.69
46.48
11.54
16.25
16.32
24.67
42.33
19.37
23.44
16.93
62.92
49.23
10.09
-0.16
1.15
0.93
-0.81
0.74
0.33
0.1
4.77
-2.75
1.45
2 Dependent Sample t-interval for µ
Then calculate the mean of the differences and the corresponding
standard deviation then calculate the standard error.
X DIFF  0.575
S DIFF  1.904592403
S DIFF 1.904592403
SE( X DIFF ) 

 0.6022850008
n
10
2 Dependent Sample t-interval for µ
Construct a 95% confidence interval for the
difference in opening and closing stock prices.
Use 1-samptInterval in TI-83/84 since we converted
the two samples into a sample of differences.
Answer: (-0.7875, 1.9375)
Z-interval for P
Formula



p  Z / 2 p(1  p) / n
where
Z / 2  Crit icalValue


p(1  p) / n  Standard Error
Z-interval for P
In a random sample of 500 families owning television sets in the city of
Hamilton, Canada, it was found that 340 subscribed to HBO. Find a 95%
confidence interval for the actual proportion of families in this city who
subscribe to HBO.
Given:
# successesin thesample 340

p 

 0.68
sample size
500
Find: A 95% CI for the population proportion, p.
Level of Confidence (1-α) = 0.95  α = 0.05
Critical value (z1-α/2 = z1-0.05/2 = z0.975) = InvNorm(0.975) = 1.96
Z-interval for P
The confidence interval is calculated as follows:



p  z p(1  p) / n
0.68  1.96
0.68* (1  0.68)
500
0.68  1.96(0.0208614477
)
0.68  0.0408884375
0.6391,0.7209
Therefore, we are 95% confident that the actual proportion of
families in this city who subscribe to HBO is between 64% and
72%.
A function in TI-83/84 is 1propZInt. Stat -> Tests -> 1propZInt
iClicker
Sample Size
In order to be (1-α) x 100% confident that the sample mean is within a
distance ME of the mean μ, choose a sample size equal to
n = z2σ2/M2
For computing sample size for estimating population proportion,
the formula is
n
2

z p (1  p )
M2
Sample Size
A consumer group wishes to estimate the average electric bills for the month of
July for single-family homes in a large city. Based on studies conducted in other
cities, the standard deviation is assumed to be $25. The group wants to estimate
the average bill for July to be within  $5 of the true average with 95% confidence.
a. How many single-family homes should be selected?
b. If the group wants to be correct to within  $10, what sample size is
necessary?
c. If 99% confidence and a sampling error of  $5 are desired, how many
single-family homes are necessary?
Given:
ME = 5
Level of Confidence (1-α) = 0.95  α = 0.05
Critical value (zα/2 = z0.05/2 = z0.025) = InvNorm(0.025) = -1.96
σ = 25
Sample Size
a. How many single-family homes should be selected?
Given:
ME = 5
Level of Confidence (1-α) = 0.95  α = 0.05
Critical value (zα/2 = z0.05/2 = z0.025) = InvNorm(0.025) = -1.96
σ = 25
n

z 2 2
M2
(1.96) 2 (25) 2
(5) 2
 96.04
 97 single- family homes
Sample Size
b. If the group wants to be correct to within  $10, what sample size is
necessary?
n

z 2 2
M2
(1.96) 2 (25) 2
(10) 2
 24.01
 25 single- family homes
Sample Size
c. If 99% confidence and a sampling error of  $5 are desired, how many
single-family homes are necessary?
M=5
Level of Confidence (1-α) = 0.99  α = 0.01
Critical value (zα/2 = z0.01/2 = z0.005) = InvNorm(0.01/2) = -2.576
σ = 25
n

z 2 2
M2
(2.576) 2 (25) 2
(5) 2
 165.89
 166single- family homes
iClicker
Sample Size
In a random sample of 500 families owning television sets in the city of Hamilton,
Canada, it was found that 340 subscribed to HBO. Suppose that a CI for the
proportion of families who subscribe to HBO is computed at 90% confidence level
and within ± 0.05, what will the new sample size be?

Given : p  0.68
Z/2  invNorm(.10/2)  1.645
ME  0.05


z 2 p (1  p )
n
ME 2
2
1.645 * .68* (1  .68)

2
0.05
 235.53
 236
iClicker

similar documents