Skip to main content

Introductory Statistics

Section A.6 Inference For Categorical Data

Solution 1. Exercise 1
  1. False. Doesn’t satisfy success-failure condition.
  2. True. The success-failure condition is not satisfied. In most samples we would expect \(\hat{p}\) to be close to 0.08, the true population proportion. While \(\hat{p}\) can be much above 0.08, it is bound below by 0, suggesting it would take on a right skewed shape. Plotting the sampling distribution would confirm this suspicion.
  3. False. \(SE_{\hat{p}} = 0.0243\text{,}\) and \(\hat{p} = 0.12\) is only \(\frac{0.12 - 0.08}{0.0243} = 1.65\) SEs away from the mean, which would not be considered unusual.
  4. True. \(\hat{p}=0.12\) is 2.32 standard errors away from the mean, which is often considered unusual.
  5. False. Decreases the SE by a factor of \(1/\sqrt{2}\text{.}\)
Solution 2. Exercise 3
  1. True. See the reasoning of 6.1.
  2. .
  3. True. We take the square root of the sample size in the SE formula.
  4. True. The independence and success-failure conditions are satisfied.
  5. True. The independence and success-failure conditions are satisfied.
Solution 3. Exercise 5
  1. False. A confidence interval is constructed to estimate the population proportion, not the sample proportion.
  2. True. 95\% CI: \(82\%\ \pm\ 2\%\text{.}\)
  3. True. By the definition of the confidence level.
  4. True. Quadrupling the sample size decreases the SE and ME by a factor of \(1/\sqrt{4}\text{.}\)
  5. True. The 95\% CI is entirely above 50\%.
Solution 4. Exercise 7
With a random sample, independence is satisfied. The success-failure condition is also satisfied. \(ME = z^{\star} \sqrt{ \frac{\hat{p} (1-\hat{p})} {n} } = 1.96 \sqrt{ \frac{0.56 \times 0.44}{600} }= 0.0397 \approx 4\%\)
Solution 5. Exercise 9
  1. No. The sample only represents students who took the SAT, and this was also an online survey.
  2. (0.5289, 0.5711). We are 90\% confident that 53\% to 57\% of high school seniors who took the SAT are fairly certain that they will participate in a study abroad program in college.
  3. 90\% of such random samples would produce a 90\% confidence interval that includes the true proportion.
  4. Yes. The interval lies entirely above 50\%.
Solution 6. Exercise 11
  1. We want to check for a majority (or minority), so we use the following hypotheses: [Math: &H_0: p = 0.5 &&H_A: p \neq 0.5 ] We have a sample proportion of \(\hat{p} = 0.55\) and a sample size of \(n = 617\) independents. Since this is a random sample, independence is satisfied. The success-failure condition is also satisfied: \(617 \times 0.5\) and \(617 \times (1 - 0.5)\) are both at least 10 (we use the null proportion \(p_0 = 0.5\) for this check in a one-proportion hypothesis test). Therefore, we can model \(\hat{p}\) using a normal distribution with a standard error of [Math: SE = \sqrt{\frac{p(1 - p)}{n}} = 0.02 ] (We use the null proportion \(p_0 = 0.5\) to compute the standard error for a one-proportion hypothesis test.) Next, we compute the test statistic: [Math: Z = \frac{0.55 - 0.5}{0.02} = 2.5 ] This yields a one-tail area of 0.0062, and a p-value of \(2 \times 0.0062 = 0.0124\text{.}\) Because the p-value is smaller than 0.05, we reject the null hypothesis. We have strong evidence that the support is different from 0.5, and since the data provide a point estimate above 0.5, we have strong evidence to support this claim by the TV pundit.
  2. No. Generally we expect a hypothesis test and a confidence interval to align, so we would expect the confidence interval to show a range of plausible values entirely above 0.5. However, if the confidence level is misaligned (e.g. a 99\% confidence level and a \(\alpha = 0.05\) significance level), then this is no longer generally true.
Solution 7. Exercise 13
  1. \(H_0: p = 0.5\text{.}\) \(H_A: p \neq 0.5\text{.}\) Independence (random sample) is satisfied, as is the success-failure conditions (using \(p_0 = 0.5\text{,}\) we expect 40 successes and 40 failures). \(Z = 2.91\) \(\to\) the one tail area is 0.0018, so the p-value is 0.0036. Since the p-value \(\lt 0.05\text{,}\) we reject the null hypothesis. Since we rejected \(H_0\) and the point estimate suggests people are better than random guessing, we can conclude the rate of correctly identifying a soda for these people is significantly better than just by random guessing.
  2. If in fact people cannot tell the difference between diet and regular soda and they were randomly guessing, the probability of getting a random sample of 80 people where 53 or more identify a soda correctly (or 53 or more identify a soda incorrectly) would be 0.0036.
Solution 8. Exercise 15
Because a sample proportion (\(\hat{p} = 0.55\)) is available, we use this for the sample size calculations. The margin of error for a 90\% confidence interval is \(1.6449 \times SE = 1.6449 \times \sqrt{\frac{p(1 - p)}{n}}\text{.}\) We want this to be less than 0.01, where we use \(\hat{p}\) in place of \(p\text{:}\) [Math: 1.6449 \times \sqrt{\frac{0.55(1 - 0.55)}{n}} \leq 0.01 1.6449^2 \frac{0.55(1 - 0.55)}{0.01^2} \leq n ] From this, we get that \(n\) must be at least 6697.
Solution 9. Exercise 17
This is not a randomized experiment, and it is unclear whether people would be affected by the behavior of their peers. That is, independence may not hold. Additionally, there are only 5 interventions under the provocative scenario, so the success-failure condition does not hold. Even if we consider a hypothesis test where we pool the proportions, the success-failure condition will not be satisfied. Since one condition is questionable and the other is not satisfied, the difference in sample proportions will not follow a nearly normal distribution.
Solution 10. Exercise 19
  1. False. The entire confidence interval is above 0.
  2. True.
  3. True.
  4. True.
  5. False. It is simply the negated and reordered values: (-0.06,-0.02).
Solution 11. Exercise 21
  1. Standard error: [Math: SE = \sqrt{\frac{0.79(1 - 0.79)}{347} + \frac{0.55(1 - 0.55)}{617}} = 0.03 ] Using \(z^{\star} = 1.96\text{,}\) we get: [Math: 0.79 - 0.55 \pm 1.96 \times 0.03 \to (0.181, 0.299) ] We are 95\% confident that the proportion of Democrats who support the plan is 18.1\% to 29.9\% higher than the proportion of Independents who support the plan.
  2. True.
Solution 12. Exercise 23
  1. College grads: 23.7\%. Non-college grads: 33.7\%.
  2. Let \(p_{CG}\) and \(p_{NCG}\) represent the proportion of college graduates and non-college graduates who responded β€œdo not know”. \(H_0: p_{CG} = p_{NCG}\text{.}\) \(H_A: p_{CG} \ne p_{NCG}\text{.}\) Independence is satisfied (random sample), and the success-failure condition, which we would check using the pooled proportion (\(\hat{p}_{\textit{pool}} = 235/827 = 0.284\)), is also satisfied. \(Z = -3.18\) \(\to\) p-value = 0.0014. Since the p-value is very small, we reject \(H_0\text{.}\) The data provide strong evidence that the proportion of college graduates who do not have an opinion on this issue is different than that of non-college graduates. The data also indicate that fewer college grads say they β€œdo not know” than non-college grads (i.e. the data indicate the direction after we reject \(H_0\)).
Solution 13. Exercise 25
  1. College grads: 35.2\%. Non-college grads: 33.9\%.
  2. Let \(p_{CG}\) and \(p_{NCG}\) represent the proportion of college graduates and non-college grads who support offshore drilling. \(H_0: p_{CG} = p_{NCG}\text{.}\) \(H_A: p_{CG} \ne p_{NCG}\text{.}\) Independence is satisfied (random sample), and the success-failure condition, which we would check using the pooled proportion (\(\hat{p}_{\textit{pool}} = 286/827 = 0.346\)), is also satisfied. \(Z = 0.39\) \(\to\) p-value \(=0.6966\text{.}\) Since the p-value \(\gt \alpha\) (0.05), we fail to reject \(H_0\text{.}\) The data do not provide strong evidence of a difference between the proportions of college graduates and non-college graduates who support off-shore drilling in California.
Solution 14. Exercise 27
Subscript \(_C\) means control group. Subscript \(_T\) means truck drivers. \(H_0: p_C = p_T\text{.}\) \(H_A: p _C \ne p_T\text{.}\) Independence is satisfied (random samples), as is the success-failure condition, which we would check using the pooled proportion (\(\hat{p}_{\textit{pool}} = 70/495 = 0.141\)). \(Z = -1.65\) \(\to\) p-value \(= 0.0989\text{.}\) Since the p-value is high (default to alpha = 0.05), we fail to reject \(H_0\text{.}\) The data do not provide strong evidence that the rates of sleep deprivation are different for non-transportation workers and truck drivers.
Solution 15. Exercise 29
  1. Summary of the study: \begin{center}\scriptsize \begin{tabular}{l l c c c} & & \multicolumn{2}{c}{\textit{Virol. failure}} & \cline{3-4} & & Yes & No & Total \cline{2-5} \multirow{2}{*}{\textit{Treatment}} & Nevaripine & 26 & 94 & 120 & Lopinavir & 10 & 110 & 120 \cline{2-5} & Total & 36 & 204 & 240 \end{tabular} \end{center}.
  2. \(H_0: p_N = p_L\text{.}\) There is no difference in virologic failure rates between the Nevaripine and Lopinavir groups. \(H_A: p_N \ne p_L\text{.}\) There is some difference in virologic failure rates between the Nevaripine and Lopinavir groups.
  3. Random assignment was used, so the observations in each group are independent. If the patients in the study are representative of those in the general population (something impossible to check with the given information), then we can also confidently generalize the findings to the population. The success-failure condition, which we would check using the pooled proportion (\(\hat{p}_{pool} = 36/240 = 0.15\)), is satisfied. \(Z = 2.89\) \(\to\) p-value \(=0.0039\text{.}\) Since the p-value is low, we reject \(H_0\text{.}\) There is strong evidence of a difference in virologic failure rates between the Nevaripine and Lopinavir groups. Treatment and virologic failure do not appear to be independent.
Solution 16. Exercise 31
  1. False. The chi-square distribution has one parameter called degrees of freedom.
  2. True.
  3. True.
  4. False. As the degrees of freedom increases, the shape of the chi-square distribution becomes more symmetric.
Solution 17. Exercise 33
  1. \(H_0\text{:}\) The distribution of the format of the book used by the students follows the professor’s predictions. \(H_A\text{:}\) The distribution of the format of the book used by the students does not follow the professor’s predictions.
  2. \(E_{hard copy} = 126 \times 0.60 = 75.6\text{.}\) \(E_{print} = 126 \times 0.25 = 31.5\text{.}\) \(E_{online} = 126 \times 0.15 = 18.9\text{.}\)
  3. Independence: The sample is not random. However, if the professor has reason to believe that the proportions are stable from one term to the next and students are not affecting each other’s study habits, independence is probably reasonable. Sample size: All expected counts are at least 5.
  4. \(\chi^2 = 2.32\text{,}\) \(df=2\text{,}\) p-value = 0.313.
  5. Since the p-value is large, we fail to reject \(H_0\text{.}\) The data do not provide strong evidence indicating the professor’s predictions were statistically inaccurate.
Solution 18. Exercise 35
  1. Two-way table: \begin{center}\scriptsize \begin{tabular}{l l c c c} & \multicolumn{2}{c}{\textit{Quit}} & \cline{2-3} \textit{Treatment} & Yes & No & Total \hline Patch + support group & 40 & 110 & 150 Only patch & 30 & 120 & 150 \cline{1-4} Total & 70 & 230 & 300 \cline{1-4} \end{tabular} \end{center} (b-i) \(E_{row_1, col_1} = \frac{(row 1 total)\times(col 1 total)}{table total} = 35\text{.}\) This is lower than the observed value. (b-ii) \(E_{row_2, col_2} = \frac{(row 2 total)\times(col 2 total)}{table total} = 115\text{.}\) This is lower than the observed value.
Solution 19. Exercise 37
\(H_0\text{:}\) The opinion of college grads and non-grads is not different on the topic of drilling for oil and natural gas off the coast of California. \(H_A\text{:}\) Opinions regarding the drilling for oil and natural gas off the coast of California has an association with earning a college degree. [Math: &E_{row 1, col 1} = 151.5 && E_{row 1, col 2} = 134.5 &E_{row 2, col 1} = 162.1 && E_{row 2, col 2} = 143.9 &E_{row 3, col 1} = 124.5 && E_{row 3, col 2} = 110.5 ] Independence: The samples are both random, unrelated, and from less than 10\% of the population, so independence between observations is reasonable. Sample size: All expected counts are at least 5. \(\chi^2 = 11.47\text{,}\) \(df = 2\) \(\to\) p-value = 0.003. Since the p-value \(\lt \alpha\text{,}\) we reject \(H_0\text{.}\) There is strong evidence that there is an association between support for off-shore drilling and having a college degree.
Solution 20. Exercise 39
No. The samples at the beginning and at the end of the semester are not independent since the survey is conducted on the same students.
Solution 21. Exercise 41
  1. \(H_0\text{:}\) The age of Los Angeles residents is independent of shipping carrier preference variable. \(H_A\text{:}\) The age of Los Angeles residents is associated with the shipping carrier preference variable.
  2. The conditions are not satisfied since some expected counts are below 5.
Solution 22. Exercise 43
  1. Independence is satisfied (random sample), as is the success-failure condition (40 smokers, 160 non-smokers). The 95\% CI: (0.145, 0.255). We are 95\% confident that 14.5\% to 25.5\% of all students at this university smoke.
  2. We want \(z^{\star}SE\) to be no larger than 0.02 for a 95\% confidence level. We use \(z^{\star}=1.96\) and plug in the point estimate \(\hat{p}=0.2\) within the SE formula: \(1.96\sqrt{0.2(1-0.2)/n} \leq 0.02\text{.}\) The sample size \(n\) should be at least 1,537.
Solution 23. Exercise 45
  1. Proportion of graduates from this university who found a job within one year of graduating. \(\hat{p} = 348/400 = 0.87\text{.}\)
  2. This is a random sample, so the observations are independent. Success-failure condition is satisfied: 348 successes, 52 failures, both well above 10.
  3. (0.8371, 0.9029). We are 95\% confident that approximately 84\% to 90\% of graduates from this university found a job within one year of completing their undergraduate degree.
  4. 95\% of such random samples would produce a 95\% confidence interval that includes the true proportion of students at this university who found a job within one year of graduating from college.
  5. (0.8267, 0.9133). Similar interpretation as before.
  6. 99\% CI is wider, as we are more confident that the true proportion is within the interval and so need to cover a wider range.
Solution 24. Exercise 47
Use a chi-squared goodness of fit test. \(H_0\text{:}\) Each option is equally likely. \(H_A\text{:}\) Some options are preferred over others. Total sample size: 99. Expected counts: (1/3) * 99 = 33 for each option. These are all above 5, so conditions are satisfied. \(df = 3 - 1 = 2\) and \(\chi^2 = \frac{(43 - 33)^2}{33} + \frac{(21 - 33)^2}{33} + \frac{(35 - 33)^2}{33} = 7.52 \to\) p-value \(= 0.023\text{.}\) Since the p-value is less than 5\%, we reject \(H_0\text{.}\) The data provide convincing evidence that some options are preferred over others.
Solution 25. Exercise 49
  1. \(H_0: p = 0.38\text{.}\) \(H_A: p \ne 0.38\text{.}\) Independence (random sample) and the success-failure condition are satisfied. \(Z=-20.5\) \(\to\) p-value \(\approx 0\text{.}\) Since the p-value is very small, we reject \(H_0\text{.}\) The data provide strong evidence that the proportion of Americans who only use their cell phones to access the internet is different than the Chinese proportion of 38\%, and the data indicate that the proportion is lower in the US.
  2. If in fact 38\% of Americans used their cell phones as a primary access point to the internet, the probability of obtaining a random sample of 2,254 Americans where 17\% or less or 59\% or more use their only their cell phones to access the internet would be approximately 0.
  3. (0.1545, 0.1855). We are 95\% confident that approximately 15.5\% to 18.6\% of all Americans primarily use their cell phones to browse the internet.