# Exercises - Hypothesis Testing (Two Samples)

1. It is believed that the retention rate in private two-year colleges is higher than the retention rate in public two-year colleges. A random sample of 250 two-year public colleges and of 180 two-year private colleges was obtained. This survey determined that the retention rate was 78% for public colleges and 85% for private colleges. Is there a significant difference in the retention rate of these two types of colleges? Show appropriate hypothesis testing procedures.
To answer the question asked: $H_0 : p_1 = p_2 \textrm{ or } p_1 - p_2 = 0$. Note $x_1 = 195$ and $x_2 = 153$. The test statistic is $z = -1.83$; Critical value for $\alpha = 0.05$ is $\pm1.96$. Fail to reject the null hypothesis. There is not a significant difference in the retention rates of teh two groups. If you had been asked to test the original claim, then the null hypothesis would have been $H_0 : p_1 \ge p_2$. One would need to reject the null hypothesis at $\alpha = 0.05$ since the critical value is $-1.645$. This is not a strong rejection and the interpretation should reflect this. Always use common sense when interpreting the results of a directional hypothesis being rejected at an alpha of $0.05$.

2. In a study to determine strength of a basic back kick and a reverse high punch in karate, data were collected from 10 black belt subjects. It is believed that there is no significant difference in the two as far as strength when executed by an expert. Use the strike data collected and hypothesis testing techniques to determine if this belief seems to be true.
$H_0 : \mu_d = 0$. The mean of the differences is $0.168$ and the standard deviation of the differences is $0.411$. You need to be able to find these. The test statistic is $t = 1.29$. The test criterion is $t(9) = 2.262$ for $\alpha = 0.05$. Fail to reject the null hypothesis. There seems to be no difference in strength between the basic back kick and the reverse high punch.

3. It is believed that Seney Hall has poor heat regulation. Two thermostats still work. Records are taken from these two thermostats, one on the second floor and one on the fourth floor. The temperature is recorded at noon for 15 working days. The second floor had a mean of 72.3 with a variance of 7.2 degrees and the fourth floor had a mean of 74.5 with a variance of 5.8 degrees. (a) Test the claim that the two samples have equal variances. Give the null hypothesis, the test statistic, the critical value for alpha of 0.05 and your conclusion. (b) If appropriate, test the claim that the fourth floor is hotter than the second floor. State the null hypothesis, test statistic, $p$-value, conclusion. Interpret your findings.
(a) $H_0 : \sigma_1 = \sigma_2$. Test statistic is $1.242$ with critical value of $F(14,14)$ needed, use $F(15,14) = 2.9493$. Fail to reject. There is not a significant difference between the variances. The assumption of homogeneity of variance is met. (b) $H_0 : \mu_4 \le \mu_2$. Test statistic is $t = 2.363$. For $\alpha = 0.05$, $t(28) = 1.701$, one-tailed test. Note: $s_p^2 = 6.5$. Reject the null hypothesis at $\alpha = 0.05$. The fourth floor has significantly higher temperature than the second floor.

4. Among 200 randomly selected females, 36% have "9 to 5" daytime jobs. Among 250 randomly selected males, 42% have "9 to 5" daytime jobs. (a) Test the claim that there is no difference between sexes as to the proportion having "9 to 5" jobs. (b) Give a 99% confidence interval for the difference of proportions. Interpret your findings. (c) Are the two results found (parts a and b) consistent? Explain clearly.
(a) $H_0 : p_1 - p_2 = 0$, test statistic is $z = -1.29$, $p$-value of $0.197$. Fail to reject the null hypothesis. There is not a significant difference in the proportion of males and females who have "9 to 5" type jobs. (b) $-0.18 \lt p_1 - p_2 \lt 0.06$. One can be 99% confident that the difference in the proportion of females in "9 to 5" jobs and that of males in "9 to 5" jobs is inside the interval from $-0.18$ to $0.06$. (c) The value $0$ (in part a, failed to reject $H_0 : p_1 - p_2 = 0$ is inside the confidence interval $(-0.18,0.06)$. The two results are consistent.

5. Newton County and Fulton County use two different procedures for selecting jurors. The mean waiting time for the 40 randomly selected subjects from Newton County is 183.0 minutes with a standard deviation of 21 minutes. The mean waiting time for the 50 randomly selected subjects from Fulton County is 253.1 minutes with a standard deviation of 29.2 minutes. (a) Test the claim that the mean waiting time of prospective jurors is the same for both counties. (b) Construct a 98% confidence interval estimate of the difference between the two mean waiting times. Is your conclusion in part a consistent with the confidence interval found in part b.
(a) $H_0 : \mu_1 = \mu_2$, test statistic is $z = -13.229$, highly significant for a value of $z$ on the standard normal table; $p$-value is $p \lt 0.0001$. Reject the null hypothesis. There is a significant difference in mean waiting times for the two counties. (b) $-82.4 \lt \mu_1 - \mu_2 \lt -57.8$. The interval does not include zero and the null hypothesis in part a was rejected. These are consistent results.

6. It is believed that freshman have higher averages in Math 111 than do the sophomores in Math 111. The results of past classes reveal an average for the freshmen ($n = 57$) of 83.63 with a standard deviation of 6.3 and an average for the sophomores ($n=19$) of 79.3 with a standard deviation of 8.6. Is the claim realistic in light of the past two years?
Check to see if the variances are not significantly different. $H_0 : \sigma_1^2 = \sigma_2^2$ gives test statistic $F = 1.865$. Critical value at $\alpha = 0.05$ is (two-tailed) $F(20,60) = 1.9445$. Fail to reject $H_0$. The assumption of homogeneity of variances has been met. Test the claim of $\mu_1 \gt \mu_2$ with $H_0 : \mu_1 \le \mu_2$ or use the notation $H_0 : \mu_1 - \mu_2 \le 0$ where $\mu_1$ represents freshmen. One of the samples is less than $30$, so small samples test statistic, $t = 2.359$. Critical value $t(74)$ is estimated on the standard normal, $z(0.01) = 2.327$ (Note: degrees freedom is $19 + 57 - 2 = 74$). Reject $G_0$, the freshmen have a significantly higher average than the sophomores in Math 111.

7. It is believed that men get more speeding tickets than do women, probably because men drive more miles than women. A random sample was obtained from drivers classified as good by insurance companies and the results for last year are: $$\begin{array}{l|c|c|c} & \textrm{speeding tickets} & \textrm{avg miles traveled} & \textrm{std dev} \\\hline \textrm{men} (n = 300) & 28 & 18,050 & 2,205 \\\hline \textrm{women} (n = 280) & 23 & 14,326 & 1,918 \end{array}$$ (a) Is there a significant difference in the proportion of speeding tickets for men and women who are good drivers? (b) Is there a difference in the average number of miles traveled by men and women who are good drivers? (c) Is there a difference in the ratio of tickets to average miles for men and women? (d) How would you analyze the above belief?
(a) $H_0 : p_m = p_w$ where $p_m = 28/300$ and $p_w = 23/280$. Test statistic of $z = 0.4755$ gives a $p$-value of $0.6312$. Fail to reject $H_0$. There is no difference in the proportion of speeding tickets between men and women. (b) $H_0 : \mu_m = \mu_w$ gives test statistic of $z = 21.74$. This value is way off your chart! Reject $H_0$, there is a highly significant difference between the average number of miles driven by men and women. Men travel significantly more miles than women. (c) $H_0 : p_m = p_w$ where $p_m = 28/18050$ and $p_w = 23/14326$. Test statistic $z = -0.135$ with $p$-value of $0.8886$. Fail to reject $H_0$. There is no significant difference between men and women as to the ratio of tickets to average miles traveled. (d) Men drive more miles (see b above) but they do not receive more tickets than do women (see a above). There is no significant difference between men and women as to the ratio of tickets to miles traveled (see c above).

8. Before beginning and upon completion of a four-week exercise program, the weights of the students were taken. Use this data to test the claim that the difference in the pre-weight and the post-weight is zero.
$H_0 : \mu_d = 0$ or $\overline{D} = 0$. The mean of the difference is $0.888^+$ and the standard deviation of the difference is $4.4566$. Test statistic, $t = 0.5984$. For $\alpha = 0.05$, $t(8) = 2.306$. Fail to reject $H_0$. The exercise program did not seem to make a significant difference in the weight of the subjects.

9. Two different cereal companies make a raison bran cereal. Twelve different 18-ounce boxes are randomly selected for each brand and the contents weighed. Brand A has a mean of 18.05 oz and a standard deviation of 0.20 oz. Brand B has a mean of 17.98 oz and a standard deviation of 0.24 oz. Is there a significant difference in the variances or in the weights of the two brands? Interpret your results.
The variances are not significantly different. $H_0 : \sigma_1^2 = \sigma_2^2$ gave test statistic of $F = 1.44$. The critical value $F(11,11) = 3.4286$ or is approsimated by $F(10,11) = 3.5257$ (for $\alpha = 0.025$ in one tail). Faile to reject $H_0$. Variances are not significantly different. The assumption of homogeneity of variances is met. The weights of the two brands are not significantly different: $H_0 : \mu_1 - \mu_2 = 0$ gives test statistic of $t = 0.7762$. (Note: $s_p^2 = 0.0488$) Critical value: $t(22) = 2.074$ at $\alpha = 0.05$. Fail to reject $H_0$. The weights are not significantly different between brands of raison bran cereal.

10. A study of obsessive-compulsive people included a measurement of the volume of the brain by x-ray tomography. Brain volumes for a sample of 10 healthy persons and for a sample of 10 obsessive compulsive persons were obtained. Obsessive-compulsive: $\mu = 1390.03$, $s = 156.84$. Healthy: $\mu = 1268.41$, $s = 137.97$. Is there a significant difference in brain size between the two groups?
The variances are not significantly different: Testing $H_0 : \sigma_1^2 = \sigma_2^2$ gave a test statistic of $F = 1.2922$. The critical value for $\alpha = 0.05$ is $F(9,9) = 4.0260$ (two-tailed test). Fail to reject $H_0$, the assumption of homogeneity of variances is met. There is not a significant difference in the brain size between the two groups: $H_0 : \mu_1 = \mu_2$ for small samples. Test statistic is $t = 1.84$. Critical value for $\alpha = 0.05$ is $t(18) = 2.101$. Fail to reject $H_0$.

11. It is believed that the proportion of college graduates who vote is different from the proportion of high school graduates who vote. A random sample of voters was taken. It was found that 36% of the 250 high school graduates votes while 40% of the 150 college graduates vote. (a) Is this belief correct? (b) Construct a 95% confidence interval for the difference of the two proportions. Explain how your confidence interval is consistent with your hypothesis testing results.
(a) $H_0 : p_{hs} - p_c = 0$. The test statistic is $z = -0.80$. Fail to reject $H_0$. There is not a significant difference between the proportion of high school graduates who vote and the proportion of college graduates who vote. (b) A 95% confidence interval gives: $-0.04 \pm E$ or $-0.14 \lt p_{hs} - p_c \lt 0.06$. The null hypothesis (there is no difference) was not rejected and the value $0$ is in the interval. These results are consistent.

12. A sample of newborn boy weights (in pounds) in a middle class neighborhood is taken. (a) Is there an outlier? If so, discard. Explain your decision. (b) It is assumed that the distribution of weights of newborn boys is normally distributed. Check to make sure that the distribution is not significantly skewed. (c) The national average of weights of newborn boys is 7.8 pounds. Is the above sample significantly different from the national average? (d) A second sample of newborn boy weights (in pounds) in a lower socioeconomic neighborhood hospital is taken. Check this sample for outliers and discard if needed. Is this distribution significantly skewed? Is this sample significantly different from the national average? (e) For the two samples, are the variances homogeneous? (f) It is believed that the birth weight of newborns in lower socioeconomic homes is lower than the birth weights of thos in middle or upper socioeconomic homes. With these samples, test this belief.
(a) $2.3$ is an outlier by both definitions; (b) $I = 0.03$, not skewed; (c) $H_0 : \mu = 7.8; t = 1.223$ is the test statistic; $t(18) = 2.101$ is the critial value; Fail to reject the null hypothesis. The sample is not significantly different from the national average birth weight of boys. (d) No outliers; $I = -0.066$, not significantly skewed; $H_0 : \mu = 7.8; t = -3.051$ is the test statistic; $t(19) = 2.093$ is the critical value; reject the null hypothesis. This sample is significanlty different from the national average. (e) $H_0 : \sigma_1 = \sigma_2$; $F = 1.306$ is the test statistic; $F(19,18) = 2.559$ is the critical value for $\alpha = 0.05$; The samples are homogeneous; (f) $H_0 : \mu_2 \ge \mu_1 : t = -3.077, p = 0.002; t(37) = -1.645, \alpha = 0.05$; Reject the null hypothesis. The birth weight of boys from lower socioeconomic homes is significantly lower than the birth weight of boys from the middle socioeconomic homes.

13. A study of reaction times was conducted with 12 volunteers. Their reaction times (in milliseconds) before and after the consumption of one alcoholic beverage was measured. Use hypothesis testing techniques to test the claim that reaction time is different after consumption of this beverage. Check all assumptions.
The value $-713$ (or $713$ depending on which you subtracted) is an outlier, so remove it. $t = -0.403$, so not significantly skewed. Data set: mean is $-202.1$, $s = 45.4$, median is$-196$, $n = 11$. The claim is that the difference is not zero. $H_0 : \overline{D} = 0$; test statistic $t = -14.76$; critical value for $\alpha = 0.05$, $t(10) = \pm 2.228$; Reject the null hypothesis. There is significant evidence to support the claim that reaction time is different after consumption of the beverage.

14. A regional sales manages selects two similar offices to study the effectiveness of a new training program aimed at increasing sales. One office institutes the program and the other does not. The office that does not, Office 1, has 47 sales people. For this office, the mean sales per person over the next month is $\$3,193$with a standard deviation of$\$102$. Office 2, the office that does institute the training program, has 51 sales people. For this office, the mean sales per person over the next month is $\$3,229$with a standard deviation of$\$107$. (a) At a 5% significance level, does the training program appear to increase sales? (Show all steps clearly) (b) Construct a 90% confidence interval for the difference in mean sales of the two offices. Interpret your findings. (c) Are the results of parts (a) and (b) consistent? Clearly explain your reasoning.
(a) Claim: $\mu_2 \gt \mu_1$ and $H_0 : \mu_2 - \mu_1 \le 0$. Test statistic, $z = 1.705$; Critical value at $\alpha = 0.05$, $z = 1.645$; $p$-value is $0.0436$ (area in right tail when using the test statistic value as the cut-off). Reject the null hypothesis. The training program seems to produce a significant increase in sales (b) $E = 34.7$ and the interval is $(1.3,70.7)$. We are 90% confident that the difference between the means is in the interval given. (c) Yes. The null hypothesis was rejected and the value $0$ is not in the above interval since all points in the interval are positive. The results are consistent. This problem used a one-tailed test because it was reasonable to assume that the training would increase sales.

15. For a survey on labor-force participation rates, a random sample of 300 American women and 250 Canadian women are selected. It is found that 184 of the American women and 148 of the Canadian women are in their respective labor forces. (a) Is there a significant difference between the labor-force participation rates of American and Canadian women? Include an appropriate critical value and the $p$-value. Show all steps clearly. (b) Find a 95% confidence interval for the difference between the labor-force participation rates of Americxan and Canadian women. Interpret your results.
Note that the assumption is met, $np$ and $nq$ for both samples are well above $5$. (a) $H_0 : p_1 = p_2$ or $H_0 : p_1 - p_2 = 0$; test statistic is $0.5093$ (note: $\overline{p} = 0.6036$). Critical value: $\pm 1.96$, $p$-value is $0.61$. Fail to reject the null hypothesis, there seems to be no significant difference in the two labor-force participation rates. (b) $E = 0.0821$, $\hat{p_1} - \hat{p_2} = 0.0213$, interval is $(-0.0608,0.1034)$. We are 95% confident that the difference in the rates is between $-0.0608$ and $0.1034$. The results are consistent since the interval contains zero and we failed to reject the null hypothesis of no difference.

16. An instructor wants to compare the number of hours a student studies for a calculus exam to the number of hours a student studies for a statistics exam. The instructor takes random samples of his calculus students and statistics students to this end. Determine, at a 5% significance level, whether the two courses have different mean study times for an exam. Clearly check all appropriate assumptions.
Assumptions: No outliers; for skewness: $I = -0.21$ for the calculus group and $I = 0.836$ for the statistics group, therefore neither are significantly skewed. Test for homogeneity of variances: $H_0 : \sigma_1^2 = \sigma_2^2$. $F = 2.307$ and the critical value $F(9,13) = 3.3120$. Variances are homogeneous. Test the means: $H_0 : \mu_1 - \mu_2 = 0$. (Note: $s_p^2 = 2.284$) Test statistic $t = 1.486$ at $\alpha = 0.05$, the critical value is $t(22) = \pm 2.074$. Fail to reject the null hypothesis. There does not seem to be a significant difference in the mean study time for the students in the two courses.