Docsity

Confidence Intervals - Lecture Notes | MATH 203, Exams of Statistics

Toggle sidebar
bg1
Dr. Neal, Spring 2009
MATH 203 Confidence Intervals
Confidence Interval for the Mean
Let x
1
, x
2
, . . . , xn be a random sample of a measurement
X
on a population
Ω
with
unknown mean and (unknown) standard deviation . Let
x
be the sample mean
and let
S
be the sample deviation. We wish to use
x
and
S
to approximate , within a
certain margin of error and with a certain “level of confidence.” Initially, we shall
assume that we are sampling from a “large” population.
Recall: (i) For a normally distributed measurement
X
~ N( , ) , the bounds that
contain inner probability
r
=
1−
are given by
±z/2 ,
where z/2 is the
z
-score for the desired confidence-level probability which is usually
0.90, 0.95, 0.98, or 0.99. These
z
-scores are 1.645, 1.96, 2.326, and 2.576.
(ii) For large samples, the distribution of all possible sample means
x
is approximately
N,
n
. (It is exactly N,
n
for any sample size when the measurements are
known to be normally distributed.) Thus, the bounds that contain the various
x
with
probability
r
=
1−
are given by
±z/2
n.
That is, with probability
r
=
1−
, a sample mean
x
is within ±z/2
n of .
Therefore is also within ±z/2
n of
x
with probability
r
. These bounds give us a
“confidence interval” for estimating :
≈ x ±z/2
n
Arbitrary Measurements: Need large samples.
Normal Measurements: Any sample size works.
However, this formula requires that we know the true population standard
deviation , which is often unknown. But for large samples, we may replace with an
estimate, which may be the sample deviation
S
or an upper bound
U
. Thus,
≈ x ±z/2 S
n or ≈ x ±z/2 U
n
Arbitrary measurements with large samples
pf3
pf4
pf5
pf8

Partial preview of the text

Download Confidence Intervals - Lecture Notes | MATH 203 and more Exams Statistics in PDF only on Docsity!

MATH 203 Confidence Intervals

Confidence Interval for the Mean

Let x 1 , x 2 ,... , xn be a random sample of a measurement X on a population Ω with

unknown mean and (unknown) standard deviation. Let x be the sample mean

and let S be the sample deviation. We wish to use x and S to approximate , within a certain margin of error and with a certain “level of confidence.” Initially, we shall assume that we are sampling from a “large” population.

Recall : (i) For a normally distributed measurement X ~ N ( , ) , the bounds that

contain inner probability r = 1 − are given by

± z (^) /2 ,

where z (^) /2 is the z -score for the desired confidence-level probability which is usually

0.90, 0.95, 0.98, or 0.99. These z -scores are 1.645, 1.96, 2.326, and 2.576.

(ii) For large samples, the distribution of all possible sample means x is approximately

N , n

 (^). (It is exactly N , n

 (^) for any sample size when the measurements are

known to be normally distributed.) Thus, the bounds that contain the various x with probability r = 1 − are given by

±

z (^) / n

.

That is, with probability r = 1 − , a sample mean x is within ±

z (^) / n

of.

Therefore is also within ±

z (^) / n

of x with probability r. These bounds give us a

“confidence interval” for estimating :

≈ x ±

z (^) / n

Arbitrary Measurements: Need large samples. Normal Measurements: Any sample size works.

However, this formula requires that we know the true population standard deviation , which is often unknown. But for large samples, we may replace with an estimate, which may be the sample deviation S or an upper bound U. Thus,

≈ x ±

z (^) /2 S n

or ≈ x ±

z (^) /2 U n

Arbitrary measurements with large samples

Example 1. A nationwide survey of first-year college students Ω asked “About how many minutes X do you study on a typical weeknight?” The mean response of 900 students was x = 97.4 minutes with S = 25.8 minutes. Give a 99% confidence interval for the mean study time of all first-year students. Explain the interval in words.

Solution. (By Hand) With the large sample of size n = 900, we can assume that S = 25. is a reasonable approximation of the standard deviation. The 0.99 z -score is 2.576;

thus, ≈ x ±

z (^) /2 S n

2.576 × 25.

= 97.4 ± 2.2. That is, 95.2 ≤ ≤ 99.6.

(By TI-83/84) Press STAT, scroll right to TESTS, and press 7 for ZInterval. Set the Inpt by highlighting Stats and pressing ENTER. Next, enter the values of = 25.8 , x = 97.4 , n = 900 , and C-Level = .99. Then scroll down to Calculate and press ENTER.

STAT TESTS 7 Enter Stats Output

In words: The average study time per night of all first-year college students is somewhere from 95.2 to 99.6 minutes.

Example 2. Below are the SAT scores for a sample of students from one school district. (Here, Ω = all students taking the test in this district; X = SAT score.) The scores are known to be normally distributed with = 130.

Give a 95% confidence interval for the mean SAT score from that district.

Solution. Enter the data into list L1. Bring up the ZInterval screen from the STAT TESTS menu. Set the Inpt by highlighting Data and pressing ENTER. Adjust the value of , the list, frequency, and confidence level. Then press ENTER on Calculate. The TI will compute the statistics from the data in the list, then display the confidence interval (1054.9, 1175.1) and summary statistics. ( Note : Because of the normally distributed scores, we do not need a large sample here.)

1.96 × 130

or 1054.94 ≤ ≤ 1175.06.

The mean SAT score for students in this district is between 1054.94 and 1175.06.

But among all measurements with range [ c , d ], the largest variance results when c occurs with probability 1/2 and d occurs with probability 1/2. In this case, the variance is given by the average of the squares minus the square of the average as follows:

(^2) = c

(^2) + d 2

2

c + d 2

2

c^2 + d^2 2

c^2 + d^2 + 2 cd 4

 =^

c^2 + d^2 − 2 cd 4

d − c 2

2 .

Hence, the maximum standard deviation is =

d − c 2

. Thus for our population

measurement with range [ c , d ], an upper bound for the standard deviation is given by

U =

d − c 2

. So we can always replace by the upper bound U =

d − c 2

Example 4. A minimum GPA of 2.8 is required of applicants into the Nursing Program. Suppose there are 320 applicants for next year. A random sample of 30 of these applicants yielded a mean GPA of 3.44. Give a 98% confidence interval for the mean GPA of all 320 applicants.

Solution. Here Ω is the group of applicants for next year, and X is the GPA. Then is

unknown but it can replaced by U =

d − c 2

= 0.6. And because we have a small

population, we need the small population correction factor. So a 98% confidence interval for the mean is given by

≈ x ±

z (^) /2 U n

N − n N − 1

2.326 × 0.

Thus, the mean GPA of all applicants is most likely between 3.197 and 3.683.

Choosing the Sample Size

Suppose we wish to construct a confidence interval for a mean with level of

confidence r = 1 −. However we wish to have a reasonably small margin of error e in order to obtain a useful interval. What random sample size n will guarantee a margin of error of no more than e regardless of the measurements we are studying?

If we want the margin error to be no more than e , then we must set

z (^) / n

≤ e

Then we solve for n to obtain n ≥ ( z /2 / e )

2

. But when is unknown, we

cannot simply replace with S because we are trying to determine the required sample size before taking the sample. In that case, we should use an upper bound U. So the required sample size needed to obtain a margin of error of no more than e with level of confidence r = 1 − is given by

n ≥

z (^) / e

2 n ≥

z (^) /2 U e

2 where U =

d − c 2 If is known If is unknown

Note : n is always rounded up to the nearest integer.

Example 5. A random sample of 1000 students gained an average of

v x = 22 points on the SAT mathematics exam when retaking the test. The change in score among all retakes in the past has been normally distributed with a standard deviation of = 50.

(a) Give a 95% confidence interval for the mean change in score among the population Ω of all students retaking the test. (b) What sample size is needed to estimate the mean change in Math SAT score to within ± 2 points with 95% confidence?

Solution. (a) ≈ x ±

z (^) / n

1.96 × 50

(b) We simply apply the sample size formula n ≥ ( z (^) /2 / e )^2 with z (^) /2 = 1.96, = 50,

and e = 2 to find that we would need a sample of size of at least 2401 to obtain a margin of error of ± 2 with 95% confidence. (A smaller sample might suffice, but a sample of size 2401 guarantees the result.)

Example 6. We wish to estimate the average length of newborn babies. From years of observation, we may assume that the lengths range from 8 inches to 24 inches (excluding the rare extreme cases).

(a) If we wish to estimate within 0.75 inches with 95% confidence, then what sample size is required?

(b) If we wish to estimate within 0.5 inches with 98% confidence, then what sample size is required?

(c) A random sample of 900 newborns gave a mean length of x = 19.2 inches. Find a 95% confidence interval for the true mean length.

Solution. (a) Here U = (24 – 8)/2 = 8. For 95% confidence, z (^) /2 ≈ 1.96; thus, we choose

n ≥

z (^) /2 U e

2

1.96 × 8

2 ≈ 437.09. Hence, we need a sample size of at least n = 438.

Practice Exercises

  1. Suppose we want a maximum margin of error of 20 when finding a 99% confidence interval for the average GRE of Graduate School applicants, where a minimum score of 1200 out of a possible 1600 is required. Find the necessary random sample size for such a confidence interval in the following cases:

(a) Among a huge pool of applicants nationwide. (b) Among a select pool of 500 applicants. (c) From the select pool of 500, a random sample of size 160 gives a sample mean of 1380.4. Give a 95% confidence interval for the true mean in this case.

  1. Here are the daily intakes of calcium (in mg) for a group of women between the ages of 18 and 24 who agreed to participate in a study.

Find a 95% confidence interval for the average intake of calcium for all similar women between the ages of 18 and 24. (Use S as a reasonable estimate of .)

  1. A sample of WKU 90's alumni were asked to give the number of years needed to graduate. The results were:

Years 3 3.5 4 4.5 5 5.5 6 6.5 7 Responses 2 5 12 14 16 10 8 3 1

(a) Find a 98% confidence interval for the average number of years needed to graduate for all 90's alumni.

(b) Excluding the rare extreme cases, all graduates took from 3 to 8 years to graduate. If we wanted to estimate the average number of years needed with a maximum margin of error of 0.25 with 98% confidence, what sample size would be needed?

(c) Suppose the sample is just from the 350 chemistry majors. Now find a 98% confidence interval for the average number of years needed to graduate for all 90's chemistry majors.

(d) If the range is still 3 to 8 years, what sample size of the 350 chemistry majors would be needed to estimate the average number of years needed with a maximum margin of error of 0.25 with 98% confidence?

Answers

  1. (a) Here U =

= 200. Need n ≥

2.576 × 200

2

= ( 25.76)^2 = 664

(b)

2.576 × 200

2

2.576 × 200

2 =^

500 × ( 25.76)^2

499 + ( 25.76)^2

= 286 out the 500.

(c) Using U = 200 as an upper bound for , with N = 500 and n =160, we have

≈ x ±

z (^) /2 U n

N − n N − 1

1.96 × 200

The mean GRE of these 500 applicants is between 1354.82 and 1405.98.

  1. Here, n = 38, x = 926.0263, and S = 427.2295. So ≈ x ±

z (^) /2 S n

1.96 × 427.

= 926.0263 ± 135.8393. Thus, the average daily intake of

calcium among 18 to 24 year-old women is from 790.187 to 1061.8656 mg.

  1. Here, n = 71, x = 4.845, and S = 0.8807.

(a) ≈ x ±

z (^) /2 S n

2.326 × 0.

= 4.845 ± 0.243 , or from 4.602 to 5.088 yrs.

(b) Here, U =

= 2.5. So we need n ≥

z (^) /2 U e

2

2.326 × 2.

2

= ( 23.26)^2 = 542

(c) ≈ x ±

z (^) /2 S n

N − n N − 1

2.326 × 0.

= 4.845 ± 0.217 , or from 4.

to 5.062 years.

(d) n ≥

N

z (^) /2 U e

2

N − 1 +

z (^) /2 U e

2.326 × 2.

2

2.326 × 2.

2 =^

350 × ( 23.26)^2

349 + ( 23.26)^2