Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
A lecture file from math 243, likely covering the topics of confidence intervals and hypothesis tests for means. It includes examples using normal and t distributions, as well as references to quizzes, review sessions, and exam information.
Typology: Exams
1 / 9
N. Christopher Phillips
4 June 2009
N. Christopher Phillips () Math 243: Lecture File 20 4 June 2009 1 / 36
There is a quiz in the discussion sections this week.
The quiz will be mostly review.
In particular, be prepared to do any of the kinds of confidence intervals and hypothesis tests we have seen.
N. Christopher Phillips () Math 243: Lecture File 20 4 June 2009 2 / 36
Friday 5 June, 4:00–5:20 pm, given by Tristan Brand, 110 Fenton. Saturday 6 June, 11:00 am–12:50 pm, given by John Jasper, 110 Fenton. Saturday 6 June, 2:00–3:30 pm, given by Blair Ahlquist, 110 Fenton. Sunday 7 June, 9:00–10:30 am, given by Elizabeth Henning, 110 Fenton.
The final exam is Monday 8 June, 8–10 am. If you are in any of Jasper’s sections, or in Brand’s Th 5:00 or F 9: sections, go to 182 Lillis. Otherwise, go to 150 Columbia (here). (List by CRN below.) You need to arrive 10 minutes early, to find your assigned seat.
CRN Time Room GTF Final room 33389 Th 4:00–4:50 pm 30 Pacific Ahlquist 150 Columbia 33390 Th 5:00–5:50 pm 106 Deady Ahlquist 150 Columbia 33391 F 8:00–8:50 am 102 Peterson Ahlquist 150 Columbia 33395 F 9:00–9:50 am 102 Peterson Ahlquist 150 Columbia 35726 Th 4:00–4:50 pm 123 LLC North Brand 150 Columbia 35727 Th 5:00–5:50 pm 307 Deady Brand 182 Lillis 35728 F 8:00–8:50 am 107 Esslinger Brand 150 Columbia 35729 F 9:00–9:50 am 185 Lillis Brand 182 Lillis 33400 Th 4:00–4:50 pm 303 Gerlinger Henning 150 Columbia 33401 Th 5:00–5:50 pm 306 Deady Henning 150 Columbia 33402 F 8:00–8:50 am 208 Deady Henning 150 Columbia 33403 F 10:00–10:50 am 102 Petersen Henning 150 Columbia 33393 Th 4:00–4:50 pm 104 Condon Jasper 182 Lillis 33394 Th 5:00–5:50 pm 102 Deady Jasper 182 Lillis 33396 F 8:00–8:50 am 105 Fenton Jasper 182 Lillis 33397 F 9:00–9:50 am 208 Deady Jasper 182 Lillis
N. Christopher Phillips () Math 243: Lecture File 20 4 June 2009 5 / 36
Suppose adult male Martians have heights which are normally distributed with mean μ = 2.0000 meters and standard deviation σ = 0.1000 meters. (This is N(2, 0 .1).) Martians lead extremely regimented lives, being ruled by a government which keeps up to date records of where every Martian lives and compels them to respond truthfully to inquiries by statisticians.
Suppose a single adult male Martian is chosen at random. What is the probability that his height x in meters satisfies x ≥ 2 .196?
Recall the normal probability calculations from early in the quarter: find
z = x − μ σ
The quantity z is normally distributed with mean 0 and standard deviation 1, so we can look up the probability in Table A. We find that P(z < 1 .96) ≈ 0. 9750 , so P(z ≥ 1 .96) ≈ 0. 0250.
N. Christopher Phillips () Math 243: Lecture File 20 4 June 2009 6 / 36
Suppose a single adult male Martian is chosen at random. What is the probability that his height x in meters satisfies x ≤ 1 .804?
Find z =
x − μ σ
Table A gives P(z ≤ − 1 .96) ≈ 0. 0250. Suppose a single adult male Martian is chosen at random. What is the probability that his height x in meters satisfies 1. 804 < x < 2 .196?
We got P(z ≥ 1 .96) ≈ 0 .0250 and P(z ≤ − 1 .96) ≈ 0. 0250 , so the answer is 1 − [P(z ≥ 1 .96) + P(z ≤ − 1 .96)] ≈ 0. 9500.
The curve is the N(0, 1) density curve, and the red shaded region extends from − 1 .960 to 1.960 and has area 0. 9500.
Now choose a simple random sample of 25 adult male Martians. Let x be the mean height, in meters, of the Martians in the sample. What is the probability that x satisfies x ≥ 2 .0392?
The numbers x for simple random samples of size 25 are normally distributed with mean μ = 2.0000 meters (just as for the population) and standard deviation, in meters, σ √ n
Again, z has the N(0, 1) distribution. So our z-score computation is now
z =
x − μ σ/
n
Just as before, P(z ≥ 1 .96) ≈ 0. 0250.
N. Christopher Phillips () Math 243: Lecture File 20 4 June 2009 9 / 36
Choose a simple random sample of 25 adult male Martians. Let x be the mean height, in meters, of the Martians in the sample. What is the probability that x satisfies x ≤ 1 .9608?
Find z =
x − μ σ/
n
Just as before, Table A gives P(z ≤ − 1 .96) ≈ 0. 0250.
What is the probability that x satisfies 1. 9608 < x < 2 .0392?
Again, this turns out to be P(− 1. 960 < z < 1 .960) ≈ 0. 9500.
N. Christopher Phillips () Math 243: Lecture File 20 4 June 2009 10 / 36
Let’s reinterpret this. Let z∗^ be the number (“critical value”) such that P(−z∗^ < z < z∗) = 0. 95. (Thus, z∗^ ≈ 1. 960 .) Then
μ − z∗
σ √ n
< x < μ + z∗
σ √ n
This is the probability that x is within distance σ/
n of μ. Restated, this is the probability that μ is within distance σ/
n of x. Rewritten,
x − z∗
σ √ n
< μ < x + z∗
σ √ n
For simple random samples of size 25,
P
x − z∗
σ √ n
< μ < x + z∗
σ √ n
Now a statistician from Earth visits Mars. He doesn’t know μ, but he manages to get the Martian government to tell him what σ is. Using those detailed government records, he selects a simple random sample of 25 adult male Martians, measures their heights (all are available, by government order), and computes the sample mean x. Suppose he gets x = 2.02 (in meters, of course). The resulting confidence interval is: ( x − z∗
σ √ n
, x + z∗
σ √ n
With 95% confidence, he believes
x − z∗
σ √ n
< μ < x + z∗
σ √ n
With 95% confidence, the statistician believes
x − z∗
σ √ n
< μ < x + z∗
σ √ n
Recall that z∗^ ≈ 1. 960. Thus, the interval is
< μ < 2 .02 + (1.960)
that is,
N. Christopher Phillips () Math 243: Lecture File 20 4 June 2009 13 / 36
In the expression
< μ < 2 .02 + (1.960)
2 .02 is the sample mean (estimator for the population mean μ), 1.960 is the critical value (of z), and √^0. 251 is the sampling standard deviation.
All confidence intervals will have approximately this form.
N. Christopher Phillips () Math 243: Lecture File 20 4 June 2009 14 / 36
The 95% confidence interval was obtained by a method which, in the long run, gives the right answer about 95% of the time.
What this means: Suppose 1, 000 ,000 statisticians from Earth descend on Mars, and each one chooses his own independent simple random sample of 25 adult male Martians and computes his own confidence interval. Then about 950,000 of these confidence intervals will contain the true mean height μ of adult male Martians, and the remaining about 50, 000 confidence intervals will not contain the true mean height μ of adult male Martians.
(We certainly don’t expect exactly 50,000 confidence intervals to not contain the true mean height μ of adult male Martians. But probably (at a guess) within a few hundred of the number don’t contain true mean height μ of adult male Martians.)
The next year’s batch of statisticians goes to Mars and discovers that, despite its efficiency, the government no longer knows σ. What do they do?
Each one still chooses a simple random sample of 25 adult male Martians, and measures the mean height x of the Martians in the sample. Instead of σ, each one uses his sample standard deviation s.
Suppose, for example, that one of them gets x = 2.02 and s = 0. 11.
With z∗^ ≈ 1. 960 , we had
P
μ − z∗
σ √ n
< x < μ + z∗
σ √ n
that is (standardizing), with
z = x − μ σ/
n
z has the distribution N(0, 1), so P(−z∗^ < z < z∗) = 0. 95. Since we don’t know σ, we are using
t =
x − μ s/
n
This does not have a normal distribution, but rather a slightly different distribution called t(24). (The number 24 is n − 1 , one less than the sample size.) This distribution has the critical value t∗^ ≈ 2 .064 rather than z∗^ ≈ 1. 960. Thus (picture below), if the procedure is repeated many times, P(−t∗^ < t < t∗) = 0. 95. N. Christopher Phillips () Math 243: Lecture File 20 4 June 2009 17 / 36
The curve is the t(24) density curve, and the red shaded region extends from − 2 .064 to 2.064 and has area 0. 9500. N. Christopher Phillips () Math 243: Lecture File 20 4 June 2009 18 / 36
Recall: t =
x − μ s/
n and, if the procedure is repeated many times,
P(−t∗^ < t < t∗) = 0. 95.
That is, P
−t∗^ < x − μ s/
n
< t∗
so P
μ − t∗
s √ n
< x < μ + t∗
s √ n
equivalently,
P
x − t∗
s √ n
< μ < x + t∗
s √ n
For many repetitions of our procedure, we have
P
x − t∗
s √ n
< μ < x + t∗
s √ n
Thus, our 95% confidence interval is
x − t∗
s √ n
< μ < x + t∗
s √ n
Recall that one of our statisticians got, with n = 25, x = 2. 02 and s = 0. 11. From Table C, looking in the row for 24 degrees of freedom and column for 95% confidence, we found the critical value t∗^ ≈ 2. 064. Therefore the confidence interval is:
< μ < 2 .02 + (2.064)
The confidence interval is:
< μ < 2 .02 + (2.064)
It has the same general form as before: 2.02 is the sample mean (estimator for the population mean μ), 2.064 is the critical value (of t), and 0 √.^1125 is the (sampling) standard error.
Doing the arithmetic, we get for the 95% confidence interval:
N. Christopher Phillips () Math 243: Lecture File 20 4 June 2009 21 / 36
95% confidence interval:
As before, it was obtained by a method which, in the long run, gives the right answer about 95% of the time.
What this means: Suppose again the next year, 1, 000 ,000 statisticians from Earth descend on Mars, and each one chooses his own independent simple random sample of 25 adult male Martians and computes his own confidence interval. Then about 950,000 of these confidence intervals will contain the true mean height μ of adult male Martians, and the remaining about 50,000 confidence intervals will not contain the true mean height μ of adult male Martians.
We certainly don’t expect exactly 50,000 confidence intervals to not contain the true mean height μ of adult male Martians.
N. Christopher Phillips () Math 243: Lecture File 20 4 June 2009 22 / 36
The other procedures have similar confidence intervals, although the distributions are now only approximate.
Suppose our statistician wants a 95% confidence interval for the mean amount by which the heights of adult male Martians exceed the mean heights of 16 year old male Martians. He chooses a simple random sample of 25 adult male Martians and gets
x 1 = 2. 02 and s 1 = 0. 11.
He also chooses a simple random sample of 17 sixteen year old male Martians and gets, say
x 2 = 1. 87 and s 2 = 0. 13.
n 1 = 25, x 1 = 2. 02 , and s 1 = 0. 11. n 2 = 17, x 2 = 1. 87 and s 2 = 0. 13. For details see the lecture file for 14 May, but the form of the confidence interval is the same. The standard error (of the sampling distribution) is √ s 12 n 1
s^22 n 2
The quantity (x 1 − x 2 ) − (μ 1 − μ 2 ) √ s 12 n 1 +^
s 22 n 2 has approximately a t distribution whose number of degrees of freedom is given by a complicated formula, but one can use the conservative choice min(n 1 − 1 , n 2 − 1) = min(24, 16) = 16. This gives t∗^ ≈ 2 .120 for 95% confidence.
n 1 = 25, x 1 = 2. 02 , and s 1 = 0. 11. n 2 = 17, x 2 = 1. 87 and s 2 = 0. 13. The conservative choice for t∗^ is t∗^ ≈ 2. 120.
So our interval is
x 1 − x 2 ± t∗
s 12 n 1
s 22 n 2 or
That is,
N. Christopher Phillips () Math 243: Lecture File 20 4 June 2009 25 / 36
The procedures for confidence intervals for one or two proportions (for large samples) have the same general form. The estimator is the sample proportion (or the difference of the sample proportions). The formulas for the standard error now involve the sample proportion(s). The relevant quantity (test statistic) is now approximately normally distributed (provided the samples are large enough), so one uses critical values of z.
The “plus four” methods consist of adding certain imaginary observations to the data and applying the large sample method to the result.
N. Christopher Phillips () Math 243: Lecture File 20 4 June 2009 26 / 36
Let’s now look at hypothesis tests. I will consider only the one sample z procedure. The modifications for the others are similar to the modifications needed for the confidence intervals.
Smith’s Cheap Vodka is sold in bottles which are supposed to contain 500 ml of vodka. The bottle filling machinery yields a vodka volume which is normally distributed with mean μ (which at the moment isn’t known because the machinery hasn’t been calibrated for a while) and with standard deviation σ = 1 ml.
You suspect that bottles of Smith’s Cheap Vodka are being underfilled. You choose a simple random sample of 100 bottles of Smith’s Cheap Vodka, and find that the mean volume of vodka in them is x = 499.804 ml. If the bottles were being filled correctly, how unlikely is this?
You suspect that bottles of Smith’s Cheap Vodka are being underfilled. Hypotheses (do this before collecting data!): H 0 : μ = 500. Ha : μ < 500. You choose a simple random sample of 100 bottles of Smith’s Cheap Vodka, and find that the mean volume of vodka in them is 499.804 ml.
If the bottles were being filled correctly, what is the probability of getting x = 499. 804 or worse? (This probability is the “P-value”.)
In this case (one sided test), “x = 499.804 or worse” means x ≤ 499. 804.
As usual, we standardize: x has distribution
μ,
σ √ n
So z =
x − μ σ/
n
x − 500
We had x = 499. 804 , so
z =
From Table A, we find P(z ≤ − 1 .96) ≈ 0. 0250.
N. Christopher Phillips () Math 243: Lecture File 20 4 June 2009 29 / 36
We got P(z ≤ − 1 .96) ≈ 0. 0250. Equivalently, P(x ≤ 499 .804) ≈ 0. 0250. If the bottles are being correctly filled, the observed outcome from our sample (namely x ≤ 499 .804) would be quite unlikely (only about a 2.5% chance of occurring). We interpret this as evidence that the original assumption, namely μ = 500 (that is, that the bottles are being filled correctly) was not, after all, correct. In statistics language, if, say, we were using significance level α = 0.05 (so that P < α), we reject H 0. We conclude that we have strong evidence that bottles of Smith’s Cheap Vodka are being underfilled. Warning: The P-value is not the probability that H 0 is false!
N. Christopher Phillips () Math 243: Lecture File 20 4 June 2009 30 / 36
If we were testing whether the mean volume of the contents of the bottles differs from 500 ml (a two sided test), then “x = 499.804 or worse” would mean x ≤ 499. 804 or x ≥ 500. 196. (Go as far above the supposed true mean as below it.)
Jones’ Super-Expensive Premium Vodka is also sold in bottles which are supposed to contain 500 ml of vodka. He bought his bottle filling machinery from the same company as Smith did, so it too yields a vodka volume which is normally distributed with mean μ (which at the moment isn’t known) and with standard deviation σ = 1 ml. However, Jones has a long-standing reputation for careful maintenance of his equipment.
You choose a simple random sample of 100 bottles of Jones’ Super-Expensive Premium Vodka, and find that the mean volume of vodka in them is x = 499.804 ml. If the bottles were being filled correctly, how unlikely is this?
The data are the same as for the previous sample of bottles of Smith’s Cheap Vodka, so you get the same P-value P ≈ 0. 0250 , and in principle draw the same conclusion: You want to conclude that we have strong evidence that bottles of Jones’ Super-Expensive Premium Vodka are being underfilled.
Smith hasn’t calibrated his bottle filling machinery for while, while Jones has a long-standing reputation for careful maintenance of his equipment. For both of them, independent tests of H 0 : μ = 500 Ha : μ < 500 gave P ≈ 0. 0250. For which one is it more plausible that the bottles are being underfilled?
You have quite a good case against Smith. There is no particular reason to believe he is not underfilling his bottles.
You don’t have such a good case against Jones. Given the outcome, it seems quite plausible that you got an improbable result by choosing a sample which happened to have an unusually low x. Remember that when μ really is 500, this still happens occasionally.
If you really want to sue Jones, you had better use a smaller value of α.
N. Christopher Phillips () Math 243: Lecture File 20 4 June 2009 33 / 36
Jones’ Super-Expensive Premium Vodka costs five times as much as Smith’s Cheap Vodka, but both taste more or less the same. Even if Smith’s bottles are slightly underfilled, which kind of vodka are you going to buy?
N. Christopher Phillips () Math 243: Lecture File 20 4 June 2009 34 / 36
Jennifer Wang is investigating the practices of vodka producers. She chooses simple random samples of vodka bottles from each of 96 vodka plants. For each vodka plant, she runs a significance test at α = 0.05 for the alternate hypothesis that the vodka bottles from this plant are being underfilled.
For six of these vodka plants, she rejects the null hypothesis (that the bottles are being properly filled), at significance α = 0.05 for each of these plants. She is now proposing to sue the owners of those six plants.
If the judge understands statistics (and rules on the basis of the law), the cases will be thrown out of court. A significance level of α = 0.05 means that, if you run many tests at that level for which the null hypotheses are all true, you expect in the long run to improperly reject the null hypothesis about 5% (proportion 0.05) of the time. Now 6/96 is a little more than 0.05 (it is 0.0625), but it should be no surprise if 6 out of a total of 100 true null hypotheses are improperly rejected.
The t hypothesis tests work like the z hypothesis test, using the appropriate t test statistic in place of the z test statistic used above. For the proportion z procedures, there is one additional twist. The standard deviations depend on the true proportions. The null hypothesis makes specific assertions about the true proportions. Since the tests are conducted assuming the null hypothesis is true, one uses the assertions it makes about the population in the standard error. Thus, in a one proportion z test, the null hypothesis asserts that the population proportion is p 0. Therefore one uses the standard deviation √ p 0 (1 − p 0 ) n (not something computed from the sample proportion ̂p). In a two proportion z test, the null hypothesis asserts that the populations are really two parts of a single large population. One therefore uses the sample proportion in this combined population (with additional twists).