Lab #10 - BetsyMcCall.net

advertisement
Stat 2470, Lab #10, Spring 2015
Name ____________________________________
Hypothesis Testing for Two Proportions and Two Means
Directions: Complete the lab according to the directions included in the body of the lab. Some
modifications may be necessary depending on the version of Excel you are using. (These were
originally designed for Excel 2010.) When you have completed all the parts, paste your graphs,
any tables you created, and answers to the questions. You may delete the directions before
submitted the final work; however, take care not to delete your own answers. Save frequently.
If you are doing this lab on your own, you should complete three of the six experiments (at least
one from each part). If you are doing this lab with a partner, each person should do at least one
experiment from each part.
Part I: Hypothesis Testing for Two Proportions
OBJECTIVES:
 To use Excel to calculate test statistics and p-values when comparing two sample
proportions
 To use the p-value method to make conclusions.
 To use confidence intervals to test to determine if proportions from two populations are
different.
EXCEL PROCEDURES:
Experiment 1:
Of thirty-five randomly selected moms of toddlers, 18 report sleeping more than 7 hours/night.
Of 40 randomly selected dads of toddlers, 25 reported sleeping more than 7 hours/night. Is there
evidence at the .02 level of significance to suggest that the proportion of moms that sleep more
than 7 hours/night is different than the proportion of dads that get this much sleep?
a. Ho:
Ha:
Excel Procedure:
1. In cell A1 through A8 type x1, x2, n1, n2, phat1 (𝑝̂1), phat2 (𝑝̂ 2 ), pbar (𝑝̅ ), and
qbar (𝑞̅ ).
2. In cell B1 through B4 enter the corresponding values for the variables in column
A.
3. In cell B5 enter =B1/B3 and in cell B6 type =B2/B4.
4. In cell B7 enter =(B1+B2)/(B3+B4) and in cell B8 type =1-B7.
Stat 2470, Lab #10
1|Page
5. In cell D1 type “Z” and in cell D2 type “Area to the left of Z”.
6. In cell E1 type =(B5-B6)/SQRT(B7*B8/B3+B7*B8/B4). This will calculate the
test statistic Z for this hypothesis test.
7. Select cell E2, then Formulas (the tab at the top of the Excel window)->More
Functions->Statistical->NORM.S.DIST (NOTE: this is NORMSDIST in 2007).
8. When the Function Arguments window opens select (or enter) cell E1 for Z.
9. In the Cumulative field type TRUE (this is not necessary when using 2007). This
gives the area to the left of Z in the standard normal curve.
b. Test Statistic: __________________
c. P-value: __________________ (NOTE: this is not necessarily the area to the left of Z)
d. Conclusion:
Experiment 2:
Of thirty-five randomly selected moms of toddlers, 18 report sleeping more than 7 hours/night.
Of 40 randomly selected dads of toddlers, 25 reported sleeping more than 7 hours/night.
Construct a 98% Confidence Interval to determine if the proportion of moms that sleep more
than 7 hours/night is different than the proportion of dads that get this much sleep.
a. Moms sample proportion: ___________
b. Dads sample proportion: ___________
c. Sample difference (moms-dads): ___________
Excel Procedure:
1. In cell A10 through A16 type x1, x2, n1, n2, Confidence Level, phat1, and phat2.
2. In cell B10 through B16 enter the corresponding values for the variables in
column A (be sure to enter your Confidence Level as a decimal).
3. In cell B15 enter =B10/B12 and in cell B16 type =B11/B13.
4. In cell D10 through D14 type Zc, ME, Samp Diff, CI Low, and CI High.
5. In cell E10 type =ABS(
6. Select Formulas (tab from the top of the Excel window)->More Functions>Statistical->NORM.S.INV (NOTE: this is NORMSINV in Excel 2007).
7. In the probability field type (1-B14)/2 and select OK.
8. Close your ) for the ABS function.
9. In cell E11 type =E10*SQRT(B15*(1-B15)/B12+B16*(1-B16)/B13).
10. In cell E12 type =B15-B16.
11. In cell E13 type =E12-E11.
12. In cell E14 type =E12+E11.
Stat 2470, Lab #10
2|Page
d. Confidence Interval:
e. Conclusion:
Experiment 3:
Of sixty randomly selected homeowners in Central Ohio, 48 say they generally trust their
neighbors. Of 100 randomly selected apartment renters in Central Ohio, 56 say they generally
trust their neighbors. Is there evidence at the 10% level of significance to suggest that the
proportion of Central Ohio homeowners that trust their neighbor is greater than the proportion
for apartment renters?
a. Ho:
Ha:
Excel Procedure:
1. In cell A18 through A25 type x1, x2, n1, n2, phat1, phat2, pbar, and qbar (or
copy/paste cells A1 thru A8).
2. In cell B18 through B21 enter the corresponding values for the variables in
column A.
3. In cell B22 enter =B18/B20 and in cell B23 type =B19/B21.
4. In cell B24 enter =(B18+B19)/(B20+B21) and in B25 enter =1-B24.
5. Highlight cells D1-E2, Right click in the highlighted area and select Copy.
6. Select cell D18, right click in it and select Paste. This will fill cells D18 through
E19 and will update the formulas from D1-E2 to use the appropriate cells for this
experiment.
b. Test Statistic: __________________
c. P-value: __________________(NOTE: this is not necessarily the area to the left of Z)
d. Conclusion:
Copy and paste the table of results from your three hypothesis tests at the end of this lab.
Stat 2470, Lab #10
3|Page
Part II: Hypothesis Testing of Two Means
OBJECTIVES:
 To use Excel to calculate p-values when comparing two sample means
 To identify independent and dependent (paired and matched) samples
 To recognize that hypothesis tests for paired and matched samples are treated the same
 To use the p-value method to make conclusions
EXCEL PROCEDURES:
Experiment 1:
Data is collected from a random sample of 16 third grade children to see if reading to a dog
improves the average reading speed (wpm). It can be assumed that the reading speeds of the third
graders are normally distributed. See Excel spread sheet for data and test the claim at a 0.10
level of significance.
a. Ho:
Ha:
b. Are these samples independent or dependent? Circle one.
c. If dependent are they matched or paired? Circle one.
Excel Procedure:
1. In cell C5 type “p-value”.
2. Select cell C6.
3. Select Formulas (tab at top of Excel window)->More Functions->Statistical->T.Test
(NOTE: this function is called Ttest in Excel 2007).
4. In the Array1 field select the data for “WPM” and in the Array 2 field select the data for
“WPM with dog”.
5. Enter the appropriate number of tails in the Tails field based on your stated Ha.
6. Enter 1 in the Type field to indicate a Matched or Paired test (NOTE: Excel does not
distinguish between paired and matched data since the test is the same for each).
d. P-value: __________________
e. Conclusion:
Stat 2470, Lab #10
4|Page
Experiment 2:
Shoe sizes are collected from a random sample of 8 fathers and their adult sons to determine if
the mean shoe size for fathers is significantly smaller than the average shoe size of the sons. It
can be assumed that the shoes sizes of both the fathers and the sons are normally distributed. See
Excel spread sheet for the sample data and test the claim at a 5% level of significance.
a. Ho:
Ha:
b. Are these samples independent or dependent? Circle one.
c. If dependent are they matched or paired? Circle one.
Excel Procedure:
1. In cell G5 type “p-value”.
2. Select cell G6.
3. Select Formulas (tab at top of Excel window)->More Functions->Statistical->T.Test.
4. In the Array1 field select the data for Fathers and in the Array 2 field select the data for
Sons.
5. Enter the appropriate number of tails in the Tails field based on your stated Ha.
6. Enter 1 in the Type field to indicate a Paired test (NOTE: Excel does not distinguish
between paired and matched data since the test is the same for each).
d. P-value: __________________
e. Conclusion:
Experiment 3:
Fifteen female CSCC students and 10 male CSCC students are randomly selected to determine if
the mean time studying for females is significantly different than the mean study time for males.
It can be assumed that all study times are normally distributed. See Excel spread sheet
(2470lab10_data_part2.xlsx) for the sample data and test the claim at a 0.02 level of significance.
a. Ho:
Ha:
Stat 2470, Lab #10
5|Page
b. Are these samples independent or dependent? Circle one.
c. If dependent are they matched or paired? Circle one.
Excel Procedure:
1. In cell K5 type “p-value”.
2. Select cell K6.
3. Select Formulas (tab at top of Excel window)->More Functions->Statistical->T.Test
(NOTE: this function is called Ttest in Excel 2007).
4. In the Array1 field select the data for the males and in the Array 2 field select the
females.
5. Enter the appropriate number of tails in the Tails field based on your stated Ha.
6. Enter 3 in the Type field to indicate a test with unequal variance (NOTE: we will always
assume unequal variance unless specified or tested for).
d. P-value: __________________
e. Conclusion:
Copy and paste the table of results from your three hypothesis tests to the end of this lab.
Stat 2470, Lab #10
6|Page
Download