You are on page 1of 11

Statistical Methods Dr.

Asmaa El-Toony

Confidence Intervals

• Confidence Interval for a Population Mean: (CI) Suppose researchers


wish to estimate the mean of some normally distributed population.
They draw a random sample of size n from the population and
compute, which they use as a point estimate of . Because random
sampling involves chance, then 𝑋̅ can’t be expected to be equal to .
The value of 𝑋̅ may be greater than or less than .

It would be much more meaningful to estimate  by an interval. We


want to find two values L and U between which  lies with high
probability, i.e.
P (L ≤  ≤ U) = 1-
1-α is called the confidence coefficient
L = lower limit of the confidence interval
U= upper limit of the confidence interval
(L, U) is the (1-) 100% confidence interval (C.I.) for .
Statistical Methods Dr. Asmaa El-Toony

Assumption of finding CI:

• CI for the population mean (one population)


Case 1: when 𝝈𝟐 is known
A (1- α) 100% confidence interval for μ is :
𝜎 𝜎 𝜎
( 𝑋̅ - 𝑍(/2) < μ < 𝑋̅ + 𝑍(/2) ) or 𝑋̅ ± 𝑍( /2)
√𝑛 √𝑛 √𝑛

𝜎
The term 𝑍(/2) is called the margin of error (also called the maximum error
√𝑛
of the estimate).
Statistical Methods Dr. Asmaa El-Toony

Case 2: when 𝝈𝟐 is unknown and 𝒏 ≥ 𝟑𝟎


A (1- α) 100% confidence interval for μ is :
𝑆 𝑆 𝑆
( 𝑋̅ - 𝑍( /2) < μ < 𝑋̅ + 𝑍(/2) ) or 𝑋̅ ± 𝑍(/2)
√𝑛 √𝑛 √𝑛

Case 3: when 𝝈𝟐 is unknown and 𝒏 < 𝟑𝟎


A (1- α) 100% confidence interval for μ is :
𝑆 𝑆 𝑆
( 𝑋̅ - 𝑡(,n−1) < μ < 𝑋̅ + 𝑡(,n−1) ) or 𝑋̅ ± 𝑡(,n−1)
2 √𝑛 2 √𝑛 2 √𝑛

Example 1:
Ten randomly selected people were asked how long they slept at night. The mean
time was 7.1 hours, and the standard deviation was 0.78 hour. Find the 95%
confidence interval of the mean time. Assume the variable is normally distributed.
Solution
Statistical Methods Dr. Asmaa El-Toony

Therefore, one can be 95% confident that the population mean is between 6.54 and
7.66 inches.

Example 2:
A researcher wishes to estimate the number of days it takes an automobile dealer to
sell a Chevrolet Aveo. A sample of 50 cars had a mean time on the dealer’s lot of
54 days. Assume the population standard deviation to be 6.0 days. Find the 95%
confidence interval of the population mean.
Solution

Hence one can say with 95% confidence that the interval between 52.3 and 55.7
days does contain the population mean, based on a sample of 50 automobiles.

Example 3 :
Suppose a researcher, interested in obtaining an estimate of the average level
of some enzyme in a certain human population, takes a sample of 10
individuals, determines the level of the enzyme in each, and computes a
sample mean of approximately. Suppose further it is known that the variable
of interest is approximately normally distributed with a variance of 45. Find
the 95% CI for .
Statistical Methods Dr. Asmaa El-Toony

Solution
1- =0.95→ =0.05→ /2=0.025, variance =𝜎 2 = 45 , 𝜎 = √45, n=10 ,
𝑥̅ = 22, 𝑍0.025 = 1.96 .
Then 95% CI for  is given by:
𝜎 𝜎
( 𝑋̅ - 𝑍(/2) , 𝑋̅ + 𝑍(/2) )
√𝑛 √𝑛
22 ± 1.96 ( 45 / 10) → (22-4.1578, 22+4.1578) → (17.84, 26.16)

Example 4:

The activity values of a certain enzyme measured in normal gastric tissue of


35 patients with gastric carcinoma has a mean of 0.718 and a standard
deviation of 0. 511.We want to construct a 90 % confidence interval for the
population mean.

Solution Note that  is unknown and n=35 (n>30) n is large

s=0.511, 1- =0.90→ =0.1→ /2=0.05,


90%confidence interval for  is given by:
𝑆 𝑆
( 𝑋̅ - 𝑍( /2) , 𝑋̅ + 𝑍( /2) )
√𝑛 √𝑛

0.718 ± 1.645 (0.511) / 35→ (0.718-0.1421, 0.718+0.1421) = (0.576,0.860).

Example 5:
Suppose a researcher, studied the effectiveness of early weight bearing and
ankle therapies following acute repair of a ruptured Achilles tendon. One of
the variables they measured following treatment the muscle strength. In 19
subjects, the mean of the strength was 250.8 with standard deviation of 130.9.
we assume that the sample was taken from is approximately normally
distributed population. Calculate 95% confident interval for the mean of the
strength?
Statistical Methods Dr. Asmaa El-Toony

Solution: Note that  is unknown and n=19 (n<30)

1- =0.95→ =0.05→ /2=0.025, s = 130.9 , n=19


95%confidence interval for  is given by
𝑆 𝑆
( 𝑋̅ - 𝑡 
( ,n−1) √𝑛, 𝑋̅ + 𝑡  )
( ,n−1) √𝑛
2 2

250.8 ± 2.101 (130.9 / 19) → (250.8- 63.1 , 22+63.1) → (187.7, 313.9)

Exercises
(1) A researcher wishes to estimate the number of days it takes an automobile
dealer to sell a Chevrolet Aveo. A sample of 50 cars had a mean time on the
dealer’s lot of 54 days. Assume the population standard deviation to be 6.0
days. Find the best point estimate of the population mean and the 95%
confidence interval of the population mean.

(2) A survey of 30 emergency room patients found that the average waiting
time for treatment was 174.3 minutes. Assuming that the population
standard deviation is 46.5 minutes, find the best point estimate of the
population mean and the 99% confidence of the population mean.

(3) The following data represent a sample of the assets (in millions of dollars)
of 30 credit unions in southwestern Pennsylvania. Find the 90% confidence
interval of the mean.
12.23 16.56 4.39 2.89 1.24 2.17 13.19 9.16 1.42 73.25 1.91 14.64 11.59 6.69 1.06
8.74 3.17 18.13 7.92 4.78 16.85 40.22 2.42 21.58 5.01 1.47 12.24 2.27 12.77 2.76

(4) Ten randomly selected people were asked how long they slept at night. The
mean time was 7.1 hours, and the standard deviation was 0.78 hour. Find the 95%
confidence interval of the mean time. Assume the variable is normally distributed.
(5) The data represent a sample of the number of home fires started by candles
for the past several years. (Data are from the National Fire Protection
Statistical Methods Dr. Asmaa El-Toony

Association.) Find the 99% confidence interval for the mean number of home fires
started by candles each year.
5460 5900 6090 6310 7160 8440 9930

• CI for the difference between two population means


𝝁𝟏 − 𝝁𝟐 :
Case 1: when 𝝈𝟐 𝟏 and 𝝈𝟐 𝟐 are known
A (1- α) 100% confidence interval for 𝝁𝟏 − 𝝁𝟐 is :
𝟐𝝈 𝝈 𝟐 𝝈𝟐 𝟏 𝝈𝟐 𝟐
(𝑋̅1 - 𝑋̅2 ) - 𝑍(/2) √ 𝟏 + 𝟐
< 𝝁𝟏 − 𝝁𝟐 < (𝑋̅1 - 𝑋̅2 ) + 𝑍(/2) √ +
𝑛1 𝑛2 𝑛1 𝑛2

Case 2: when 𝝈𝟐 𝟏 and 𝝈𝟐 𝟐 are unknown and 𝒏𝟏 ≥ 𝟑𝟎, 𝒏𝟐 ≥ 𝟑𝟎


A (1- α) 100% confidence interval for 𝝁𝟏 − 𝝁𝟐 is :
𝟐𝑺 𝑺 𝟐 𝑺𝟐 𝟏 𝑺𝟐 𝟐
(𝑋̅1 - 𝑋̅2 ) - 𝑍(/2) √ 𝟏 + 𝟐
< 𝝁𝟏 − 𝝁𝟐 < (𝑋̅1 - 𝑋̅2 ) + 𝑍(/2) √ +
𝑛1 𝑛2 𝑛1 𝑛2

Case 3: when 𝝈𝟐 𝟏 and 𝝈𝟐 𝟐 are unknown and unequal,𝒏𝟏 < 𝟑𝟎, 𝒏𝟐 <
𝟑𝟎 (or one of them < 30)
A (1- α) 100% confidence interval for 𝝁𝟏 − 𝝁𝟐 is :
𝟐
𝑺 𝑺 𝟐 𝑺𝟐 𝟏 𝑺𝟐 𝟐
(𝑋̅1 - 𝑋̅2 ) - 𝑡(,n−1) √ 𝟏 + 𝟐
< 𝝁𝟏 − 𝝁𝟐 < (𝑋̅1 − 𝑋̅2 ) + 𝑡(,n−1) √ +
2 𝑛1 𝑛2 2 𝑛1 𝑛2
For 𝑡(,n−1) we choose the smallest value between 𝑛1 and 𝑛1
2

Example 6:
An experiment was conducted to compare time length (duration time) of two
types of surgeries (A) and (B). 75 surgeries of type (A) and 50 surgeries of type (B)
were performed. The average time length for (A) was 42 minutes and the average
Statistical Methods Dr. Asmaa El-Toony

for (B) was 36 minutes. Find a 96% confidence interval for 𝜇𝐴 − 𝜇𝐵 . Assume that
the population standard deviations are 8 and 6 for type (A) and (B), respectively.
Solution

𝑍0.02 = 2.055
A 96% CI for 𝜇𝐴 − 𝜇𝐵 is:
𝟐𝝈 𝝈 𝟐 𝝈𝟐 𝑨 𝝈𝟐 𝑩
(𝑋̅𝐴 - 𝑋̅𝐵 ) - 𝑍(/2) √ 𝑨 + 𝑩
< 𝝁𝑨 − 𝝁𝑩 < (𝑋̅𝐴 - 𝑋̅𝐵 ) + 𝑍(/2) √ +
𝑛𝐴 𝑛𝐵 𝑛𝐴 𝑛𝐵

𝟖𝟐 𝟔𝟐 𝟖𝟐 𝟔𝟐
(42- 36) - 2.055 √ + < 𝝁𝑨 − 𝝁𝑩 < (42- 36) + 2.055 √ +
75 50 75 50

3.422 < 𝝁𝑨 − 𝝁𝑩 < 8.58

Example 7:
To compare the time length (duration time) of two types of surgeries (A) and (B),
an experiment shows the following results based on two independent samples:
Type A: 140, 138, 143, 142, 144, 137
Type B: 135, 140, 136, 142, 138, 140
Assuming normal populations with unequal variances, find a 95% confidence
interval for 𝝁𝑨 − 𝝁𝑩 .
Solution
𝒕(𝟎.𝟎𝟐𝟓,𝟓) = 𝟐. 𝟓𝟕𝟏
Statistical Methods Dr. Asmaa El-Toony

𝑺𝟐 𝑺𝟐 𝟐
𝑺 𝑺𝟐 𝑩
(𝑋̅𝐴 - 𝑋̅𝐵 ) - 𝑡(,n−1) √ 𝑨 + 𝑩
< 𝝁𝑨 − 𝝁𝑩 < (𝑋̅𝐴 - 𝑋̅𝐵 ) + 𝑡(,𝑛−1) √ 𝑨
+
2 𝑛𝐴 𝑛𝐵 2 𝑛𝐴 𝑛𝐵

𝟕.𝟖𝟕 𝟕.𝟏𝟎
(140.67- 138.50) - 2.571 √ + < 𝝁𝑨 − 𝝁𝑩 < (140.67- 138.50) + 2.571
6 6

𝟕.𝟖𝟕 𝟕.𝟏𝟎
√ +
6 6
Statistical Methods Dr. Asmaa El-Toony
Statistical Methods Dr. Asmaa El-Toony

You might also like