Docsity

Confidence Intervals - Lecture Slides | MATH 243, Study notes of Probability and Statistics

Toggle sidebar
bg1
Math 243: Lecture File 8
N. Christopher Phillips
23 April 2009
N. Christopher Phillips () Math 243: Lecture File 8 23 April 2009 1 / 36
Confidence intervals
“Statistics is never having to say you are certain.”
(Outside a UO statistician’s office door.)
A 95% confidence interval means:
I got this result using a method that gives a correct statement 95% of the
time.
N. Christopher Phillips () Math 243: Lecture File 8 23 April 2009 2 / 36
Confidence intervals: an example
Crumple-horned snorkacks have horn lengths (in centimeters) which are
normally distributed with standard deviation σ= 6,but we don’t know the
mean µ.
We choose a simple random sample of 9 crumple-horned snorkacks, and
find that the mean xof the horn lengths of the snorkacks in our sample is
43.
The sampling distribution of xis N(µ, 6/√9) = N(µ, 2).(Remember, we
don’t know µ.)
N. Christopher Phillips () Math 243: Lecture File 8 23 April 2009 3 / 36
We want a 95% confidence interval for the mean horn length µof all
crumple-horned snorkacks. For a normal distribution, we find the number
z∗such that 95% of all data is within z∗standard deviations of the mean.
That is, 95% of all data has z-scores between −z∗and z∗.
That is, for N(µ, σ),95% of all data lies in (µ−z∗σ, µ +z∗σ).
These numbers are in the 3rd last line of Table C—see the next page. We
get z∗≈1.960.(The Rule of Thumb gives z∗≈2.)
We apply this to the sampling distribution, which is N(µ, 2).
Thus, 95% of all simple random samples of 9 crumple-horned snorkacks
have mean horn length xin (µ−(1.960)(2), µ + (1.960)(2)).
N. Christopher Phillips () Math 243: Lecture File 8 23 April 2009 4 / 36
pf3
pf4
pf5
pf8
pf9

Partial preview of the text

Download Confidence Intervals - Lecture Slides | MATH 243 and more Study notes Probability and Statistics in PDF only on Docsity!

Math 243: Lecture File 8

N. Christopher Phillips

23 April 2009

N. Christopher Phillips () Math 243: Lecture File 8 23 April 2009 1 / 36

Confidence intervals

“Statistics is never having to say you are certain.”

(Outside a UO statistician’s office door.)

A 95% confidence interval means:

I got this result using a method that gives a correct statement 95% of the time.

N. Christopher Phillips () Math 243: Lecture File 8 23 April 2009 2 / 36

Confidence intervals: an example

Crumple-horned snorkacks have horn lengths (in centimeters) which are normally distributed with standard deviation σ = 6, but we don’t know the mean μ.

We choose a simple random sample of 9 crumple-horned snorkacks, and find that the mean x of the horn lengths of the snorkacks in our sample is

The sampling distribution of x is N(μ, 6 /

  1. = N(μ, 2). (Remember, we don’t know μ.)

We want a 95% confidence interval for the mean horn length μ of all crumple-horned snorkacks. For a normal distribution, we find the number z∗^ such that 95% of all data is within z∗^ standard deviations of the mean. That is, 95% of all data has z-scores between −z∗^ and z∗. That is, for N(μ, σ), 95% of all data lies in (μ − z∗σ, μ + z∗σ). These numbers are in the 3rd last line of Table C—see the next page. We get z∗^ ≈ 1. 960. (The Rule of Thumb gives z∗^ ≈ 2 .)

We apply this to the sampling distribution, which is N(μ, 2). Thus, 95% of all simple random samples of 9 crumple-horned snorkacks have mean horn length x in (μ − (1.960)(2), μ + (1.960)(2)).

Interruption: Table C

The first row of Table C, and the third row from the bottom, sideways (so that it fits on my page):

Confidence level C z∗ 50% 0. 674 60% 0. 841 70% 1. 036 80% 1. 282 90% 1. 645 95% 1. 960 96% 2. 054 98% 2. 326 99% 2. 576 99 .5% 2. 807 99 .8% 3. 091 99 .9% 3. 291

N. Christopher Phillips () Math 243: Lecture File 8 23 April 2009 5 / 36

What the entries in Table C mean

Table entries: 90% gives 1. 645.

  • 4 - 3 - 2 - 1 0 1 2 3 4

This shows the standard normal distribution. The shaded region extends from − 1 .645 to 1. 645 , and has area very close to 0. 9.

N. Christopher Phillips () Math 243: Lecture File 8 23 April 2009 6 / 36

What the entries in Table C mean (continued)

Table entries: 95% gives 1. 960.

  • 4 - 3 - 2 - 1 0 1 2 3 4

This shows the standard normal distribution. The shaded region extends from − 1 .960 to 1. 960 , and has area very close to 0. 95.

95% of all simple random samples of 9 crumple-horned snorkacks have mean horn length x such that

μ − (1.960)(2) ≤ x ≤ μ + (1.960)(2)).

(x is within distance (1.960)(2) of μ.) This inequality is the same as

x − (1.960)(2) ≤ μ ≤ x + (1.960)(2)

(μ is within distance (1.960)(2) of x.)

We had x = 43. So we conclude, with 95% confidence, that

43 − (1.960)(2) ≤ μ ≤ 43 + (1.960)(2),

that is, that μ is in the interval (39. 080 , 46 .920).

Since we used a simple random sample, we got this answer by a method which, in the long run, gives the correct answer 95% of the time.

What 95% confidence really means: Pictures

Population mean 64, population standard deviation 2. 7 , and for a simple random sample of size 100 I got x = 64. 3921. My 95% confidence interval for the true mean μ is 64. 3921 ± 0. 5292. (The number 0.5292 was obtained as 1.960(2. 7 /

100), and 1.960 came from the third row from the bottom in Table C.) That is, with 95% confidence I think the true mean μ is between 63. 8629 and 64. 9213.

I found that the mean is between 63.8629 and 64. 9213 , using a method that gives a correct statement 95% of the time.

N. Christopher Phillips () Math 243: Lecture File 8 23 April 2009 13 / 36

Here are one hundred 95% confidence intervals obtained using simple random samples of size 100. The ones in red do not contain the true mean: those statisticians got an incorrect statement.

62.5 63.0 63.5 64.0 64.5 65.0 65.

N. Christopher Phillips () Math 243: Lecture File 8 23 April 2009 14 / 36

Another hundred 95% confidence intervals.

63.0 63.5 64.0 64.5 65.0 65.

Another hundred 95% confidence intervals.

62.5 63.0 63.5 64.0 64.5 65.0 65.

Another hundred 95% confidence intervals.

63.0 63.5 64.0 64.5 65.0 65.

N. Christopher Phillips () Math 243: Lecture File 8 23 April 2009 17 / 36

Another hundred 95% confidence intervals.

62.5 63.0 63.5 64.0 64.5 65.0 65.

N. Christopher Phillips () Math 243: Lecture File 8 23 April 2009 18 / 36

Conditions for z confidence intervals and hypothesis tests

We are using the “one sample z procedure”. We have talked about the procedure for confidence intervals; hypothesis tests are in the next chapter.

Conditions: We have a simple random sample from the population in question. (In particular, no difficulties with such things as nonresponse.) The variable we measure has normal distribution N(μ, σ). We know σ. These are of course not realistic. Even though the first two may be approximately satisfied, the third is usually quite unreasonable. We will learn later how to do without it. We concentrate on this case first because it is the easiest to understand.

(There are occasional situations in which we do know σ but not μ, such as for the calibration of certain scientific instruments.)

Further examples

Recall the general form of the confidence interval:

Let σ be the population standard deviation. Let n be the sample size. Then the sampling standard deviation is σ/

n. Let z∗^ be the appropriate critical value (usually found via Table C). Then the confidence interval is ( x − z∗

σ √ n

, x + z∗

σ √ n

It is also written: x ± z∗

σ √ n

Further examples (continued)

Spiral-horned snorkacks have horn lengths (in cm) distributed N(μ, 12) with μ unknown. A simple random sample of 100 spiral-horned snorkacks has sample mean horn length 121.502 (again, in cm). Find a 95% confidence interval for the true mean horn length of spiral-horned snorkacks. (The only difference from before is the required confidence level, now 95% instead of 90%.) The confidence interval is ( x − z∗

σ √ n

, x + z∗

σ √ n

We have σ = 12, x = 121. 502 , and n = 100. For z∗, look at the entry under 95% in the 3rd last line of Table C, finding z∗^ ≈ 1. 960.

N. Christopher Phillips () Math 243: Lecture File 8 23 April 2009 25 / 36

Further examples (continued)

The confidence interval is ( x − z∗

σ √ n

, x + z∗

σ √ n

We have σ = 12, x = 121. 502 , n = 100, and z∗^ ≈ 1. 960.

Put these into the formula for the confidence interval, getting:

(121. 502 − (1.960)(1.2), 121 .502 + (1.960)(1.2)) ≈ (119. 150 , 123 .854).

N. Christopher Phillips () Math 243: Lecture File 8 23 April 2009 26 / 36

Further examples (continued)

The margin of error is m = z∗

σ √ n

We have σ = 12, x = 121. 502 , n = 100, and z∗^ ≈ 1. 960.

Put these into the formula for the margin of error, getting:

So we can also write our confidence interval as

  1. 502 ± 2. 352.

Further examples (continued)

Spiral-horned snorkacks have horn lengths (in cm) distributed N(μ, 12) with μ unknown. A simple random sample of 100 spiral-horned snorkacks has sample mean horn length 121.502 (again, in cm). Find a 99% confidence interval for the true mean horn length of spiral-horned snorkacks. (The only difference from before is the required confidence level, now 99% instead of 90% or 95%.) The confidence interval is ( x − z∗

σ √ n

, x + z∗

σ √ n

We have σ = 12, x = 121. 502 , and n = 100. For z∗, look at the entry under 99% in the 3rd last line of Table C, finding z∗^ ≈ 2. 576.

Further examples (continued)

The confidence interval is ( x − z∗

σ √ n

, x + z∗

σ √ n

We have σ = 12, x = 121. 502 , n = 100, and z∗^ ≈ 2. 576.

Put these into the formula for the confidence interval, getting:

(121. 502 − (2.576)(1.2), 121 .502 + (2.576)(1.2)) ≈ (118. 411 , 124 .593).

N. Christopher Phillips () Math 243: Lecture File 8 23 April 2009 29 / 36

Further examples (continued)

The margin of error is m = z∗

σ √ n

We have σ = 12, x = 121. 502 , n = 100, and z∗^ ≈ 2. 576.

Put these into the formula for the margin of error, getting:

So we can also write our confidence interval as

  1. 502 ± 3. 091.

N. Christopher Phillips () Math 243: Lecture File 8 23 April 2009 30 / 36

Compare the margins of error

Our results: Confidence level z∗^ Confidence interval Margin of error 90% 1. 645 (119. 528 , 123 .476) 1. 974 95% 1. 960 (119. 150 , 123 .854) 2. 352 99% 2. 576 (118. 411 , 124 .593) 3. 091

Insisting on higher confidence requires a larger z∗, so gives a larger margin of error, and hence a larger confidence interval.

If you want to be more confident that the true mean is in your interval, you must use a larger interval.

A further example

You have a scientific instrument which measures the amount of uranium hexaflouride in air samples. For any given air sample, the results of using this instrument vary normally with mean the true amount of uranium hexaflouride in the air sample and standard deviation 12.5 mg (milligrams). You use this instrument on 10 one liter bottles of air from a room suspected to be polluted with uranium hexaflouride. The air is well mixed, so the concentration is the same in all the bottles. The results (in mg) are: 236 254 258 269 258 261 247 251 272 239 Assuming your measurements can be treated as a simple random sample of all possible measurements of air from this room with this instrument (a common and reasonable assumption for repeated use of a measuring device), find a 98% confidence interval for the concentration of uranium hexaflouride in the air in this room. Warning: The word “sample” is used in two different senses here! One is “air sample”; the other is as in simple random sample.