Math 311, Spring 2007, Lab 7 The Tools Inferences With Minitab:

advertisement
Math 311, Spring 2007, Lab 7
The Tools
In this section you’ll learn the mechanics of 2-sample t-tests and χ2-tests
Inferences With Minitab:
Have Minitab compute two columns of 10,000 rows of data. Choose the first (C1) from a
normally distributed population (use N(0,1)) and the second (C2) from a uniformly distributed
population, distributed between 0 and 1. Store this data in columns C1 and C2. Recall one does
this by selecting Calc>Random Data> …. We will use these data in our tests below.
2-sample t-tests:
We can perform 2-sample inferences by viewing the data in
columns C1 and C2 as samples from independent populations and by following the directions
below:
a. Select Stat>Basic Statistics>2-Sample t…
b. Select Samples in Different Columns (in this example, we’re going to compare the
samples in C1 and C2).
c. Enter C1 in First: and C2 in Second:
d. Select Options to set the confidence level and type of hypothesis test (1-sided vs. 2sided) and the value of the mean in the null hypothesis.
e. Finally, select OK (twice) and get something like this:
Two-Sample T-Test and CI: C1, C2
Two-sample T for C1 vs C2
C1
C2
N
10000
10000
Mean StDev SE Mean
0.00
1.00
0.010
0.501 0.290
0.0029
Difference = mu (C1) - mu (C2)
Estimate for difference: -0.500785
95% CI for difference: (-0.521260, -0.480310)
T-Test of difference = 0 (vs not =): T-Value = -47.94
11659
P-Value = 0.000
DF =
f. Note Estimate for difference = difference of sample means = x1  x2 . DF =
degrees of freedom (recall that Minitab uses a much more complicated, albeit more
correct, formula for computing degrees of freedom.
g. Important note: the samples from the two populations do not need to be in separate
columns – one may select the option Samples in one column. For example, suppose
we were comparing the pollution levels in streams on the east coast vs. the west coast.
If the pollution data was in C1 and the location (east or west coast) was in C2, then
we could compare the mean pollution levels by entering C1 in the Samples: box and
C2 in the Subscripts: box. You’ll need to try this in the following questions.
 2 - tests for fun and profit: Recall that in class we examined the following data
set regarding the weight classification of 4208 7th – 12th graders who participated in a national
study of adolescent attitudes and behaviours:
Two-way
Table
Underweight
Male
Female
Total
92
81
173
Normal
1376
1528
2904
Risk of Overwt
279
324
603
Overweight:
280
248
528
Total:
2027
2181
4208
We were, in fact, interested in determining if the weight classifications of males and females
differed. Thus we formed the following hypotheses:
H0: there is no difference in the weight classifications of males and females
HA: there is a difference in the weight classifications of males and females
To decide the question, we performed a  - test by hand. Today we’ll learn how do get Minitab
to do the work for us. So, if you haven’t done so already, open Minitab.
2
1. Enter the data in Minitab so that it looks like this:
C1
Male
92
1376
279
280
C2
Female
81
1528
324
248
a. Notice that there is no need to enter the weight classifications – the first row will
be called (1), the second (2), etc..
b. Also (very important) do not include the totals in
your table.
2. Now select Stat>Tables>Chi-Square Test (Table in Worksheet…)
3. A window will appear – double click on C1 Male & C2 Female. The box “Columns
containing the table:” should now contain “Male Female.”
4. Select OK and get the following:
Chi-Square Test: Male, Female
Expected counts are printed below observed counts
Chi-Square contributions are printed below expected counts
Male
92
83.33
0.901
Female
81
89.67
0.837
Total
173
2
1376
1398.86
0.374
1528
1505.14
0.347
2904
3
279
290.47
0.453
324
312.53
0.421
603
4
280
254.34
2.589
248
273.66
2.406
528
Total
2027
2181
4208
1
Chi-Sq = 8.328, DF = 3, P-Value = 0.040
Make certain that you can identify each number this table!!!
Since the P-value is so small (p < 0.05), we may conclude that there is a difference in the
distribution of the weight classifications for males and females.
note: we may note conclude more than “there is a
difference/relationship.”
Okay, that’s it. 2-sample t-tests and chi-squared tests are pretty easy in Minitab. So now it’s
your turn to hone the mad skills learned above.
The Questions
!!!BE CERTAIN TO READ EACH QUESTION CAREFULLY – THEY CONTAIN USEFUL CLUES!!!
Nutrition – platewaste in the 4th & 5th grades:
Two years ago colleagues from the Family and Consumer Sciences Department and I studied
various factors that affect the amount of food elementary school children eat during lunch. Four
schools were studied – each for ten days. The platewaste of each child was compared to the
amount served that day and was used to compute the nutrients each child consumed that day.
The results for each child in 4th and 5th grade are recorded in the file nutri.mtw. Get this file
now.
Column C4 contains the data concerning the placement of recess with respect to lunch (before
and after).
Column C11 contains the data concerning the number of calories consumed by the child that
day.
Some days the children were served more and some days, less. To adjust for this, I computed the
percent of the calories served that were consumed. These data are recorded in C12. Thus if a
child ate half the calories served that day, .50 would appear in C12.
Similar analysis was done for other nutrients (scroll right to see the results). Let’s investigate
these data….
1. Does the placement of recess affect the number of calories consumed? State your
hypotheses, perform the appropriate test, and report the P-value you found. State your
conclusions.
Note: in this worksheet, the data is recorded in one column (C11) while the subscripts
are contained in another column (C4).
2. The difference in calories consumed by each sample is not very large. Find another food
item in your house that contains the same number of calories as this difference.
3. Does gender affect the number of calories consumed? State your hypotheses, perform the
appropriate test, and report the P-value you found. State your conclusions.
4. A study of the relationship between men’s marital status and the level of their jobs used
data on all 8235 male managers and professionals employed by a large manufacturing
firm. Each man’s job has a grade set by the company that reflects the value of that
particular job to the company. The authors of the study grouped the many job grades into
quarters. Grade 1 jobs contain jobs in the lowest quarter of job grades, and grade 4
contains those in the highest quarter. Here are the data:
Marital Status
Job
Grade
1
2
3
4
Single
58
222
50
7
Married
874
3927
2396
533
Divorced
15
70
34
7
Widowed
8
20
10
4
Do these data show a statistically significant relationship between marital status and job
grade?
Explicitly state your hypotheses, the results of your analysis, and your conclusions!
5. These data come from a report of a survey which investigated whether snoring was
related to various diseases. Those surveyed were classified according to the amount they
snored, on the basis of reports from their spouses. These particular data relate to the
presence or absence of heart disease. Is there a relationship between that amount of
snoring and heart disease?
Heart
Disease
yes
no
non-snorers
24
1355
occasional snorers
35
603
snores nearly every
night
21
192
snores every night
30
224
Download