Every problem in the chapter beside the book’s answer, a chapter at a time as you scroll.
Chapter 6: Inference for categorical data
45 problems · 19 figuresGuided Practice 6.2 §6.1 source ↗
Estimate the standard error of . Because is unknown and the standard error is for a confidence interval, use in place of in the formula.
Answer
.
Guided Practice 6.4 §6.1 source ↗
Set up hypotheses to evaluate whether borrowers have a majority support or majority opposition for this type of regulation.
Answer
: . : .
Guided Practice 6.5 §6.1 source ↗
Do payday loan borrowers support a regulation that would require lenders to pull their credit report and evaluate their debt payments? From a random sample of 826 borrowers, 51% said they would support such a regulation. Is it reasonable to model using a normal distribution for a hypothesis test here?
Answer
Independence holds since the poll is based on a random sample. The success-failure condition also holds, which is checked using the null value () from : , .
Guided Practice 6.8 §6.1 source ↗
A manager is about to oversee the mass production of a new tire model in her factory, and she would like to estimate what proportion of these tires will be rejected through quality control. The quality control team has monitored the last three tire models produced by the factory, failing 1.7% of tires in the first model, 6.2% of the second model, and 1.3% of the third model. The manager would like to examine enough tires to estimate the failure rate of the new tire model to within about 1% with a 90% confidence level. There are three different failure rates to choose from. Perform the sample size computation for each separately, and identify three sample sizes to consider.
Answer
For a 90% confidence interval, , and since an estimate of the proportion 0.017 is available, we’ll use it in the margin of error formula:
For sample size calculations, we always round up, so the first tire model suggests 453 tires would be sufficient.
A similar computation can be accomplished using 0.062 and 0.013 for , and you should verify that using these proportions results in minimum sample sizes of 1574 and 348 tires, respectively.
Guided Practice 6.10 §6.1 source ↗
Suppose we want to continually track the support of payday borrowers for regulation on lenders, where we would conduct a new poll every month. Running such frequent polls is expensive, so we decide a wider margin of error of 5% for each individual survey would be acceptable. Based on the original sample of borrowers where 70% supported some form of regulation, how big should our monthly sample be for a margin of error of 0.05 with 95% confidence?
Answer
We complete the same computations as before, except now we use instead of for :
A sample size of 323 or more would be reasonable. (Reminder: always round up for sample size calculations!) Given that we plan to track this poll over time, we also may want to periodically repeat these calculations to ensure that we’re being thoughtful in our sample size recommendations in case the baseline rate fluctuates.
6.1 §6.1 source ↗
Vegetarian college students. Suppose that 8% of college students are vegetarians. Determine if the following statements are true or false, and explain your reasoning.
The distribution of the sample proportions of vegetarians in random samples of size 60 is approximately normal since .
The distribution of the sample proportions of vegetarian college students in random samples of size 50 is right skewed.
A random sample of 125 college students where 12% are vegetarians would be considered unusual.
A random sample of 250 college students where 12% are vegetarians would be considered unusual.
The standard error would be reduced by one-half if we increased the sample size from 125 to 250.
Answer (5 parts)
False. Doesn’t satisfy success-failure condition.
True. The success-failure condition is not satisfied. In most samples we would expect to be close to 0.08, the true population proportion. While 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.
False. , and is only SEs away from the mean, which would not be considered unusual.
True. is 2.32 standard errors away from the mean, which is often considered unusual.
False. Decreases the SE by a factor of .
6.3 §6.1 source ↗
Orange tabbies. Suppose that 90% of orange tabby cats are male. Determine if the following statements are true or false, and explain your reasoning.
The distribution of sample proportions of random samples of size 30 is left skewed.
Using a sample size that is 4 times as large will reduce the standard error of the sample proportion by one-half.
The distribution of sample proportions of random samples of size 140 is approximately normal.
The distribution of sample proportions of random samples of size 280 is approximately normal.
Answer (4 parts)
True. See the reasoning of 6.1(b).
True. We take the square root of the sample size in the SE formula.
True. The independence and success-failure conditions are satisfied.
True. The independence and success-failure conditions are satisfied.
6.5 §6.1 source ↗
Gender equality. The General Social Survey asked a random sample of 1,390 Americans the following question: “On the whole, do you think it should or should not be the government’s responsibility to promote equality between men and women?” 82% of the respondents said it “should be”. At a 95% confidence level, this sample has 2% margin of error. Based on this information, determine if the following statements are true or false, and explain your reasoning.
We are 95% confident that between 80% and 84% of Americans in this sample think it’s the government’s responsibility to promote equality between men and women.
We are 95% confident that between 80% and 84% of all Americans think it’s the government’s responsibility to promote equality between men and women.
If we considered many random samples of 1,390 Americans, and we calculated 95% confidence intervals for each, 95% of these intervals would include the true population proportion of Americans who think it’s the government’s responsibility to promote equality between men and women.
In order to decrease the margin of error to 1%, we would need to quadruple (multiply by 4) the sample size.
Based on this confidence interval, there is sufficient evidence to conclude that a majority of Americans think it’s the government’s responsibility to promote equality between men and women.
Answer (5 parts)
False. A confidence interval is constructed to estimate the population proportion, not the sample proportion.
True. 95% CI: .
True. By the definition of the confidence level.
True. Quadrupling the sample size decreases the SE and ME by a factor of .
True. The 95% CI is entirely above 50%.
6.7 §6.1 source ↗
Fireworks on July 4. A local news outlet reported that 56% of 600 randomly sampled Kansas residents planned to set off fireworks on July . Determine the margin of error for the 56% point estimate using a 95% confidence level.
Answer
With a random sample, independence is satisfied. The success-failure condition is also satisfied.
6.9 §6.1 source ↗
Study abroad. A survey on 1,509 high school seniors who took the SAT and who completed an optional web survey shows that 55% of high school seniors are fairly certain that they will participate in a study abroad program in college.
Is this sample a representative sample from the population of all high school seniors in the US? Explain your reasoning.
Let’s suppose the conditions for inference are met. Even if your answer to part (a) indicated that this approach would not be reliable, this analysis may still be interesting to carry out (though not report). Construct a 90% confidence interval for the proportion of high school seniors (of those who took the SAT) who are fairly certain they will participate in a study abroad program in college, and interpret this interval in context.
What does “90% confidence" mean?
Based on this interval, would it be appropriate to claim that the majority of high school seniors are fairly certain that they will participate in a study abroad program in college?
Answer (4 parts)
No. The sample only represents students who took the SAT, and this was also an online survey.
(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.
90% of such random samples would produce a 90% confidence interval that includes the true proportion.
Yes. The interval lies entirely above 50%.
6.11 §6.1 source ↗
National Health Plan, Part I. A Kaiser Family Foundation poll for US adults in 2019 found that 79% of Democrats, 55% of Independents, and 24% of Republicans supported a generic “National Health Plan”. There were 347 Democrats, 298 Republicans, and 617 Independents surveyed.
A political pundit on TV claims that a majority of Independents support a National Health Plan. Do these data provide strong evidence to support this type of statement?
Would you expect a confidence interval for the proportion of Independents who oppose the public option plan to include 0.5? Explain.
Answer (2 parts)
We want to check for a majority (or minority), so we use the following hypotheses:
We have a sample proportion of and a sample size of independents.
Since this is a random sample, independence is satisfied. The success-failure condition is also satisfied: and are both at least 10 (we use the null proportion for this check in a one-proportion hypothesis test).
Therefore, we can model using a normal distribution with a standard error of
(We use the null proportion to compute the standard error for a one-proportion hypothesis test.) Next, we compute the test statistic:
This yields a one-tail area of 0.0062, and a p-value of .
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.
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 significance level), then this is no longer generally true.
6.13 §6.1 source ↗
Taste test. Some people claim that they can tell the difference between a diet soda and a regular soda in the first sip. A researcher wanting to test this claim randomly sampled 80 such people. He then filled 80 plain white cups with soda, half diet and half regular through random assignment, and asked each person to take one sip from their cup and identify the soda as diet or regular. 53 participants correctly identified the soda.
Do these data provide strong evidence that these people are any better or worse than random guessing at telling the difference between diet and regular soda?
Interpret the p-value in this context.
Answer (2 parts)
. . Independence (random sample) is satisfied, as is the success-failure conditions (using , we expect 40 successes and 40 failures). the one tail area is 0.0018, so the p-value is 0.0036. Since the p-value , we reject the null hypothesis. Since we rejected 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.
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.
6.15 §6.1 source ↗
National Health Plan, Part II. Exercise 6.11 presents the results of a poll evaluating support for a generic “National Health Plan” in the US in 2019, reporting that 55% of Independents are supportive. If we wanted to estimate this number to within 1% with 90% confidence, what would be an appropriate sample size?
National Health Plan, Part I. A Kaiser Family Foundation poll for US adults in 2019 found that 79% of Democrats, 55% of Independents, and 24% of Republicans supported a generic “National Health Plan”. There were 347 Democrats, 298 Republicans, and 617 Independents surveyed.
(a) A political pundit on TV claims that a majority of Independents support a National Health Plan. Do these data provide strong evidence to support this type of statement?
(b) Would you expect a confidence interval for the proportion of Independents who oppose the public option plan to include 0.5? Explain.
Answer. (a) We want to check for a majority (or minority), so we use the following hypotheses:
We have a sample proportion of and a sample size of independents.
Since this is a random sample, independence is satisfied. The success-failure condition is also satisfied: and are both at least 10 (we use the null proportion for this check in a one-proportion hypothesis test).
Therefore, we can model using a normal distribution with a standard error of
(We use the null proportion to compute the standard error for a one-proportion hypothesis test.) Next, we compute the test statistic:
This yields a one-tail area of 0.0062, and a p-value of .
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.
(b) 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 significance level), then this is no longer generally true.
Answer
Because a sample proportion () is available, we use this for the sample size calculations. The margin of error for a 90% confidence interval is . We want this to be less than 0.01, where we use in place of :
From this, we get that must be at least 6697.
Guided Practice 6.13 §6.2 source ↗
A 5-year experiment was conducted to evaluate the effectiveness of fish oils on reducing cardiovascular events, where each subject was randomized into one of two treatment groups. We’ll consider heart attack outcomes in these patients:
| heart attack | no event | Total | |
| fish oil | 145 | 12788 | 12933 |
| placebo | 200 | 12738 | 12938 |
Create a 95% confidence interval for the effect of fish oils on heart attacks for patients who are well-represented by those in the study. Also interpret the interval in the context of the study.
Answer
Because the patients were randomized, the subjects are independent, both within and between the two groups. The success-failure condition is also met for both groups as all counts are at least 10. This satisfies the conditions necessary to model the difference in proportions using a normal distribution.
Compute the sample proportions (, ), point estimate of the difference (), and standard error ( ). Next, plug the values into the general formula for a confidence interval, where we’ll use a 95% confidence level with :
We are 95% confident that fish oils decreases heart attacks by 0.15 to 0.71 percentage points (off of a baseline of about 1.55%) over a 5-year period for subjects who are similar to those in the study. Because the interval is entirely below 0, the data provide strong evidence that fish oil supplements reduce heart attacks in patients like those in the study.
Guided Practice 6.14 §6.2 source ↗
Is this study an experiment or an observational study?
Answer
This is an experiment. Patients were randomized to receive mammograms or a standard breast cancer exam. We will be able to make causal conclusions based on this study.
Guided Practice 6.15 §6.2 source ↗
Set up hypotheses to test whether there was a difference in breast cancer deaths in the mammogram and control groups.
Answer
: the breast cancer death rate for patients screened using mammograms is the same as the breast cancer death rate for patients in the control, .
: the breast cancer death rate for patients screened using mammograms is different than the breast cancer death rate for patients in the control, .
Guided Practice 6.19 §6.2 source ↗
A quadcopter company is considering a new manufacturer for rotor blades. The new manufacturer would be more expensive, but they claim their higher-quality blades are more reliable, with 3% more blades passing inspection than their competitor. Set up appropriate hypotheses for the test.
Answer
: The higher-quality blades will pass inspection 3% more frequently than the standard-quality blades. . : The higher-quality blades will pass inspection some amount different than 3% more often than the standard-quality blades. .
Guided Practice 6.21 §6.2 source ↗
Prerequisite: Section 3.4. We can rewrite the equation above in a different way:
Explain where this formula comes from using the formula for the variability of the sum of two random variables.
Answer
The standard error squared represents the variance of the estimate. If and are two random variables with variances and , then the variance of is . Likewise, the variance corresponding to is . Because and are just another way of writing and , the variance associated with may be written as .
6.17 §6.2 source ↗
Social experiment, Part I. A “social experiment" conducted by a TV program questioned what people do when they see a very obviously bruised woman getting picked on by her boyfriend. On two different occasions at the same restaurant, the same couple was depicted. In one scenario the woman was dressed “provocatively” and in the other scenario the woman was dressed “conservatively”. The table below shows how many restaurant diners were present under each scenario, and whether or not they intervened.
| Scenario | ||||
| Provocative | Conservative | Total | ||
| Intervene | Yes | 5 | 15 | 20 |
| No | 15 | 10 | 25 | |
| Total | 20 | 25 | 45 | |
Explain why the sampling distribution of the difference between the proportions of interventions under provocative and conservative scenarios does not follow an approximately normal distribution.
Answer
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.
6.19 §6.2 source ↗
Gender and color preference. A study asked 1,924 male and 3,666 female undergraduate college students their favorite color. A 95% confidence interval for the difference between the proportions of males and females whose favorite color is black was calculated to be (0.02, 0.06). Based on this information, determine if the following statements about undergraduate college students are true or false, and explain your reasoning for each statement you identify as false.
We are 95% confident that the true proportion of males whose favorite color is black is 2% lower to 6% higher than the true proportion of females whose favorite color is black.
We are 95% confident that the true proportion of males whose favorite color is black is 2% to 6% higher than the true proportion of females whose favorite color is black.
95% of random samples will produce 95% confidence intervals that include the true difference between the population proportions of males and females whose favorite color is black.
We can conclude that there is a significant difference between the proportions of males and females whose favorite color is black and that the difference between the two sample proportions is too large to plausibly be due to chance.
The 95% confidence interval for cannot be calculated with only the information given in this exercise.
Answer (5 parts)
False. The entire confidence interval is above 0.
True.
True.
True.
False. It is simply the negated and reordered values: (-0.06,-0.02).
6.21 §6.2 source ↗
National Health Plan, Part III. Exercise 6.11 presents the results of a poll evaluating support for a generically branded “National Health Plan” in the United States. 79% of 347 Democrats and 55% of 617 Independents support a National Health Plan.
Calculate a 95% confidence interval for the difference between the proportion of Democrats and Independents who support a National Health Plan , and interpret it in this context. We have already checked conditions for you.
True or false: If we had picked a random Democrat and a random Independent at the time of this poll, it is more likely that the Democrat would support the National Health Plan than the Independent.
National Health Plan, Part I. A Kaiser Family Foundation poll for US adults in 2019 found that 79% of Democrats, 55% of Independents, and 24% of Republicans supported a generic “National Health Plan”. There were 347 Democrats, 298 Republicans, and 617 Independents surveyed.
(a) A political pundit on TV claims that a majority of Independents support a National Health Plan. Do these data provide strong evidence to support this type of statement?
(b) Would you expect a confidence interval for the proportion of Independents who oppose the public option plan to include 0.5? Explain.
Answer. (a) We want to check for a majority (or minority), so we use the following hypotheses:
We have a sample proportion of and a sample size of independents.
Since this is a random sample, independence is satisfied. The success-failure condition is also satisfied: and are both at least 10 (we use the null proportion for this check in a one-proportion hypothesis test).
Therefore, we can model using a normal distribution with a standard error of
(We use the null proportion to compute the standard error for a one-proportion hypothesis test.) Next, we compute the test statistic:
This yields a one-tail area of 0.0062, and a p-value of .
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.
(b) 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 significance level), then this is no longer generally true.
Answer (2 parts)
Standard error:
Using , we get:
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.
True.
6.23 §6.2 source ↗
Offshore drilling, Part I. A survey asked 827 randomly sampled registered voters in California “Do you support? Or do you oppose? Drilling for oil and natural gas off the Coast of California? Or do you not know enough to say?” Below is the distribution of responses, separated based on whether or not the respondent graduated from college.
(a) What percent of college graduates and what percent of the non-college graduates in this sample do not know enough to have an opinion on drilling for oil and natural gas off the Coast of California?
(b) Conduct a hypothesis test to determine if 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.
| College Grad | ||
| Yes | No | |
| Support | 154 | 132 |
| Oppose | 180 | 126 |
| Do not know | 104 | 131 |
| Total | 438 | 389 |
Answer (2 parts)
College grads: 23.7%. Non-college grads: 33.7%.
Let and represent the proportion of college graduates and non-college graduates who responded “do not know". . . Independence is satisfied (random sample), and the success-failure condition, which we would check using the pooled proportion ( ), is also satisfied. p-value = 0.0014. Since the p-value is very small, we reject . 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 ).
6.25 §6.2 source ↗
Offshore drilling, Part II. Results of a poll evaluating support for drilling for oil and natural gas off the coast of California were introduced in Exercise 6.23.
| College Grad | ||
| Yes | No | |
| Support | 154 | 132 |
| Oppose | 180 | 126 |
| Do not know | 104 | 131 |
| Total | 438 | 389 |
What percent of college graduates and what percent of the non-college graduates in this sample support drilling for oil and natural gas off the Coast of California?
Conduct a hypothesis test to determine if the data provide strong evidence that the proportion of college graduates who support off-shore drilling in California is different than that of non-college graduates.
Offshore drilling, Part I. A survey asked 827 randomly sampled registered voters in California “Do you support? Or do you oppose? Drilling for oil and natural gas off the Coast of California? Or do you not know enough to say?” Below is the distribution of responses, separated based on whether or not the respondent graduated from college.
(a) What percent of college graduates and what percent of the non-college graduates in this sample do not know enough to have an opinion on drilling for oil and natural gas off the Coast of California?
(b) Conduct a hypothesis test to determine if 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.
| College Grad | ||
| Yes | No | |
| Support | 154 | 132 |
| Oppose | 180 | 126 |
| Do not know | 104 | 131 |
| Total | 438 | 389 |
Answer. (a) College grads: 23.7%. Non-college grads: 33.7%. (b) Let and represent the proportion of college graduates and non-college graduates who responded “do not know". . . Independence is satisfied (random sample), and the success-failure condition, which we would check using the pooled proportion ( ), is also satisfied. p-value = 0.0014. Since the p-value is very small, we reject . 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 ).
Answer (2 parts)
College grads: 35.2%. Non-college grads: 33.9%.
Let and represent the proportion of college graduates and non-college grads who support offshore drilling. . . Independence is satisfied (random sample), and the success-failure condition, which we would check using the pooled proportion ( ), is also satisfied. p-value . Since the p-value (0.05), we fail to reject . 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.
6.27 §6.2 source ↗
Sleep deprived transportation workers. The National Sleep Foundation conducted a survey on the sleep habits of randomly sampled transportation workers and a control sample of non-transportation workers. The results of the survey are shown below.
| Transportation Professionals | |||||
| Truck | Train | Bus/Taxi/Limo | |||
| Control | Pilots | Drivers | Operators | Drivers | |
| Less than 6 hours of sleep | 35 | 19 | 35 | 29 | 21 |
| 6 to 8 hours of sleep | 193 | 132 | 117 | 119 | 131 |
| More than 8 hours | 64 | 51 | 51 | 32 | 58 |
| Total | 292 | 202 | 203 | 180 | 210 |
Conduct a hypothesis test to evaluate if these data provide evidence of a difference between the proportions of truck drivers and non-transportation workers (the control group) who get less than 6 hours of sleep per day, i.e. are considered sleep deprived.
Answer
Subscript means control group. Subscript means truck drivers. . . Independence is satisfied (random samples), as is the success-failure condition, which we would check using the pooled proportion (). p-value . Since the p-value is high (default to alpha = 0.05), we fail to reject . The data do not provide strong evidence that the rates of sleep deprivation are different for non-transportation workers and truck drivers.
6.29 §6.2 source ↗
HIV in sub-Saharan Africa. In July 2008 the US National Institutes of Health announced that it was stopping a clinical study early because of unexpected results. The study population consisted of HIV-infected women in sub-Saharan Africa who had been given single dose Nevaripine (a treatment for HIV) while giving birth, to prevent transmission of HIV to the infant. The study was a randomized comparison of continued treatment of a woman (after successful childbirth) with Nevaripine vs Lopinavir, a second drug used to treat HIV. 240 women participated in the study; 120 were randomized to each of the two treatments. Twenty-four weeks after starting the study treatment, each woman was tested to determine if the HIV infection was becoming worse (an outcome called virologic failure). Twenty-six of the 120 women treated with Nevaripine experienced virologic failure, while 10 of the 120 women treated with the other drug experienced virologic failure.
Create a two-way table presenting the results of this study.
State appropriate hypotheses to test for difference in virologic failure rates between treatment groups.
Complete the hypothesis test and state an appropriate conclusion. (Reminder: Verify any necessary conditions for the test.)
Answer (3 parts)
Summary of the study:
| Virol. failure | ||||
| Yes | No | Total | ||
| Treatment | Nevaripine | 26 | 94 | 120 |
| Lopinavir | 10 | 110 | 120 | |
| Total | 36 | 204 | 240 | |
. There is no difference in virologic failure rates between the Nevaripine and Lopinavir groups. . There is some difference in virologic failure rates between the Nevaripine and Lopinavir groups.
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 (), is satisfied. p-value . Since the p-value is low, we reject . 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.
Guided Practice 6.24 §6.3 source ↗
Figure 6.7 shows three chi-square distributions.
How does the center of the distribution change when the degrees of freedom is larger?
What about the variability (spread)?
How does the shape change?
Answer (3 parts)
The center becomes larger. If took a careful look, we could see that the mean of each distribution is equal to the distribution’s degrees of freedom.
The variability increases as the degrees of freedom increases.
The distribution is very strongly skewed for , and then the distributions become more symmetric for the larger degrees of freedom and . We would see this trend continue if we examined distributions with even more larger degrees of freedom.
Guided Practice 6.28 §6.3 source ↗
Figure 6.8(d) shows a cutoff of 11.7 on a chi-square distribution with 7 degrees of freedom. Find the area of the upper tail.
Answer
The area is 0.1109. If using a table, we would identify that it falls between 0.1 and 0.2.
Guided Practice 6.29 §6.3 source ↗
Figure 6.8(e) shows a cutoff of 10 on a chi-square distribution with 4 degrees of freedom. Find the area of the upper tail.
Answer
Precise value: 0.0404. If using the table: between 0.02 and 0.05.
Guided Practice 6.30 §6.3 source ↗
Figure 6.8(f) shows a cutoff of 9.21 with a chi-square distribution with 3 df. Find the area of the upper tail.
Answer
Precise value: 0.0266. If using the table: between 0.02 and 0.05.
Guided Practice 6.34 §6.3 source ↗
Figure 6.11 provides a set of count data for waiting times (, , ...) and expected counts under the geometric distribution (, , ...). Compute the chi-square test statistic, .
| Days | 1 | 2 | 3 | 4 | 5 | 6 | 7+ | Total | ||
| Observed | 717 | 369 | 155 | 69 | 28 | 14 | 10 | 1362 | ||
| Geometric Model | 743 | 338 | 154 | 70 | 32 | 14 | 12 | 1362 |
Answer
Guided Practice 6.35 §6.3 source ↗
Because the expected counts are all at least 5, we can safely apply the chi-square distribution to . However, how many degrees of freedom should we use?
Answer
There are groups, so we use .
6.31 §6.3 source ↗
True or false, Part I. Determine if the statements below are true or false. For each false statement, suggest an alternative wording to make it a true statement.
The chi-square distribution, just like the normal distribution, has two parameters, mean and standard deviation.
The chi-square distribution is always right skewed, regardless of the value of the degrees of freedom parameter.
The chi-square statistic is always positive.
As the degrees of freedom increases, the shape of the chi-square distribution becomes more skewed.
Answer (4 parts)
False. The chi-square distribution has one parameter called degrees of freedom.
True.
True.
False. As the degrees of freedom increases, the shape of the chi-square distribution becomes more symmetric.
6.33 §6.3 source ↗
Open source textbook. A professor using an open source introductory statistics book predicts that 60% of the students will purchase a hard copy of the book, 25% will print it out from the web, and 15% will read it online. At the end of the semester he asks his students to complete a survey where they indicate what format of the book they used. Of the 126 students, 71 said they bought a hard copy of the book, 30 said they printed it out from the web, and 25 said they read it online.
State the hypotheses for testing if the professor’s predictions were inaccurate.
How many students did the professor expect to buy the book, print the book, and read the book exclusively online?
This is an appropriate setting for a chi-square test. List the conditions required for a test and verify they are satisfied.
Calculate the chi-squared statistic, the degrees of freedom associated with it, and the p-value.
Based on the p-value calculated in part (d), what is the conclusion of the hypothesis test? Interpret your conclusion in this context.
Answer (5 parts)
: The distribution of the format of the book used by the students follows the professor’s predictions. : The distribution of the format of the book used by the students does not follow the professor’s predictions.
. . .
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.
, , p-value = 0.313.
Since the p-value is large, we fail to reject . The data do not provide strong evidence indicating the professor’s predictions were statistically inaccurate.
Guided Practice 6.39 §6.4 source ↗
If the questions were actually equally effective, meaning about 27.85% of respondents would disclose the freezing issue regardless of what question they were asked, about how many sellers would we expect to hide the freezing problem from the Positive Assumption group?
Answer
We would expect . It is okay that this result, like the result from Example 6.38, is a fraction.
From the experiment, we can compute the proportion of all sellers who disclosed the freezing problem as . If there really is no difference among the questions and 27.85% of sellers were going to disclose the freezing problem no matter the question that was put to them, how many of the 73 people in the General group would we have expected to disclose the freezing problem?
Answer. We would predict that sellers would disclose the problem. Obviously we observed fewer than this, though it is not yet clear if that is due to chance variation or whether that is because the questions vary in how effective they are at getting to the truth.
Guided Practice 6.42 §6.4 source ↗
A chi-square test for a two-way table may be used to test the hypotheses in Example 6.41. As a first step, compute the expected values for each of the six table cells.
Figure 6.17 summarizes the results of an experiment evaluating three treatments for Type 2 Diabetes in patients aged 10-17 who were being treated with metformin. The three treatments considered were continued treatment with metformin (met), treatment with metformin combined with rosiglitazone (rosi), or a lifestyle intervention program. Each patient had a primary outcome, which was either lacked glycemic control (failure) or did not lack that control (success). What are appropriate hypotheses for this test?
Answer. : There is no difference in the effectiveness of the three treatments.
: There is some difference in effectiveness between the three treatments, e.g. perhaps the rosi treatment performed better than lifestyle.
Answer
The expected count for row one / column one is found by multiplying the row one total (234) and column one total (319), then dividing by the table total (699): . Similarly for the second column and the first row: . Row 2: 105.9 and 126.1. Row 3: 106.3 and 126.7.
Guided Practice 6.43 §6.4 source ↗
Compute the chi-square test statistic for the data in Figure 6.17.
| Failure | Success | Total | |
| lifestyle | 109 | 125 | 234 |
| met | 120 | 112 | 232 |
| rosi | 90 | 143 | 233 |
| Total | 319 | 380 | 699 |
Answer
For each cell, compute . For instance, the first row and first column: . Adding the results of each cell gives the chi-square test statistic: .
Guided Practice 6.44 §6.4 source ↗
Because there are 3 rows and 2 columns, the degrees of freedom for the test is . Use , , evaluate whether to reject the null hypothesis using a significance level of 0.05.
Answer
If using a computer, we can identify the p-value as 0.017. That is, we reject the null hypothesis because the p-value is less than 0.05, and we conclude that at least one of the treatments is more or less effective than the others at treating Type 2 Diabetes for glycemic control.
6.35 §6.4 source ↗
Quitters. Does being part of a support group affect the ability of people to quit smoking? A county health department enrolled 300 smokers in a randomized experiment. 150 participants were assigned to a group that used a nicotine patch and met weekly with a support group; the other 150 received the patch and did not meet with a support group. At the end of the study, 40 of the participants in the patch plus support group had quit smoking while only 30 smokers had quit in the other group.
Create a two-way table presenting the results of this study.
Answer each of the following questions under the null hypothesis that being part of a support group does not affect the ability of people to quit smoking, and indicate whether the expected values are higher or lower than the observed values.
(i) How many subjects in the “patch + support" group would you expect to quit?
(ii) How many subjects in the “patch only" group would you expect to not quit?
Answer
(a) Two-way table:
| Quit | |||
| Treatment | Yes | No | Total |
| Patch + support group | 40 | 110 | 150 |
| Only patch | 30 | 120 | 150 |
| Total | 70 | 230 | 300 |
(b-i) . This is lower than the observed value.
(b-ii) . This is lower than the observed value.
6.37 §6.4 source ↗
Offshore drilling, Part III. The table below summarizes a data set we first encountered in Exercise 6.23 that examines the responses of a random sample of college graduates and non-graduates on the topic of oil drilling. Complete a chi-square test for these data to check whether there is a statistically significant difference in responses from college graduates and non-graduates.
| College Grad | ||
| Yes | No | |
| Support | 154 | 132 |
| Oppose | 180 | 126 |
| Do not know | 104 | 131 |
| Total | 438 | 389 |
Offshore drilling, Part I. A survey asked 827 randomly sampled registered voters in California “Do you support? Or do you oppose? Drilling for oil and natural gas off the Coast of California? Or do you not know enough to say?” Below is the distribution of responses, separated based on whether or not the respondent graduated from college.
(a) What percent of college graduates and what percent of the non-college graduates in this sample do not know enough to have an opinion on drilling for oil and natural gas off the Coast of California?
(b) Conduct a hypothesis test to determine if 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.
| College Grad | ||
| Yes | No | |
| Support | 154 | 132 |
| Oppose | 180 | 126 |
| Do not know | 104 | 131 |
| Total | 438 | 389 |
Answer. (a) College grads: 23.7%. Non-college grads: 33.7%. (b) Let and represent the proportion of college graduates and non-college graduates who responded “do not know". . . Independence is satisfied (random sample), and the success-failure condition, which we would check using the pooled proportion ( ), is also satisfied. p-value = 0.0014. Since the p-value is very small, we reject . 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 ).
Answer
: 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. : Opinions regarding the drilling for oil and natural gas off the coast of California has an association with earning a college degree.
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. , p-value = 0.003. Since the p-value , we reject . There is strong evidence that there is an association between support for off-shore drilling and having a college degree.
6.39 §6.R source ↗
Active learning. A teacher wanting to increase the active learning component of her course is concerned about student reactions to changes she is planning to make. She conducts a survey in her class, asking students whether they believe more active learning in the classroom (hands on exercises) instead of traditional lecture will helps improve their learning. She does this at the beginning and end of the semester and wants to evaluate whether students’ opinions have changed over the semester. Can she used the methods we learned in this chapter for this analysis? Explain your reasoning.
Answer
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.
6.41 §6.R source ↗
Shipping holiday gifts. A local news survey asked 500 randomly sampled Los Angeles residents which shipping carrier they prefer to use for shipping holiday gifts. The table below shows the distribution of responses by age group as well as the expected counts for each cell (shown in parentheses).
| Age | ||||||||
| 18-34 | 35-54 | 55+ | Total | |||||
| Shipping Method | USPS | 72 | (81) | 97 | (102) | 76 | (62) | 245 |
| UPS | 52 | (53) | 76 | (68) | 34 | (41) | 162 | |
| FedEx | 31 | (21) | 24 | (27) | 9 | (16) | 64 | |
| Something else | 7 | (5) | 6 | (7) | 3 | (4) | 16 | |
| Not sure | 3 | (5) | 6 | (5) | 4 | (3) | 13 | |
| Total | 165 | 209 | 126 | 500 | ||||
State the null and alternative hypotheses for testing for independence of age and preferred shipping method for holiday gifts among Los Angeles residents.
Are the conditions for inference using a chi-square test satisfied?
Answer (2 parts)
: The age of Los Angeles residents is independent of shipping carrier preference variable. : The age of Los Angeles residents is associated with the shipping carrier preference variable.
The conditions are not satisfied since some expected counts are below 5.
6.43 §6.R source ↗
College smokers. We are interested in estimating the proportion of students at a university who smoke. Out of a random sample of 200 students from this university, 40 students smoke.
Calculate a 95% confidence interval for the proportion of students at this university who smoke, and interpret this interval in context. (Reminder: Check conditions.)
If we wanted the margin of error to be no larger than 2% at a 95% confidence level for the proportion of students who smoke, how big of a sample would we need?
Answer (2 parts)
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.
We want to be no larger than 0.02 for a 95% confidence level. We use and plug in the point estimate within the SE formula: . The sample size should be at least 1,537.
6.45 §6.R source ↗
Life after college. We are interested in estimating the proportion of graduates at a mid-sized university who found a job within one year of completing their undergraduate degree. Suppose we conduct a survey and find out that 348 of the 400 randomly sampled graduates found jobs. The graduating class under consideration included over 4500 students.
Describe the population parameter of interest. What is the value of the point estimate of this parameter?
Check if the conditions for constructing a confidence interval based on these data are met.
Calculate a 95% confidence interval for the proportion of graduates who found a job within one year of completing their undergraduate degree at this university, and interpret it in the context of the data.
What does “95% confidence" mean?
Now calculate a 99% confidence interval for the same parameter and interpret it in the context of the data.
Compare the widths of the 95% and 99% confidence intervals. Which one is wider? Explain.
Answer (6 parts)
Proportion of graduates from this university who found a job within one year of graduating. .
This is a random sample, so the observations are independent. Success-failure condition is satisfied: 348 successes, 52 failures, both well above 10.
(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.
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.
(0.8267, 0.9133). Similar interpretation as before.
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.
6.47 §6.R source ↗
Rock-paper-scissors. Rock-paper-scissors is a hand game played by two or more people where players choose to sign either rock, paper, or scissors with their hands. For your statistics class project, you want to evaluate whether players choose between these three options randomly, or if certain options are favored above others. You ask two friends to play rock-paper-scissors and count the times each option is played. The following table summarizes the data:
| Rock | Paper | Scissors |
| 43 | 21 | 35 |
Use these data to evaluate whether players choose between these three options randomly, or if certain options are favored above others. Make sure to clearly outline each step of your analysis, and interpret your results in context of the data and the research question.
Answer
Use a chi-squared goodness of fit test. : Each option is equally likely. : 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. and p-value . Since the p-value is less than 5%, we reject . The data provide convincing evidence that some options are preferred over others.
6.49 §6.R source ↗
Browsing on the mobile device. A survey of 2,254 American adults indicates that 17% of cell phone owners browse the internet exclusively on their phone rather than a computer or other device.
According to an online article, a report from a mobile research company indicates that 38 percent of Chinese mobile web users only access the internet through their cell phones. Conduct a hypothesis test to determine if these 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%.
Interpret the p-value in this context.
Calculate a 95% confidence interval for the proportion of Americans who access the internet on their cell phones, and interpret the interval in this context.
Answer (3 parts)
. . Independence (random sample) and the success-failure condition are satisfied. p-value . Since the p-value is very small, we reject . 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.
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.
(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.
Loading chapter 7…
Exercises and answers are adapted from OpenIntro Statistics by David Diez, Mine Çetinkaya-Rundel and Christopher D Barr, which is free to read and download, and are used under the CC BY-SA 3.0 licence. They are taken from the book’s LaTeX source and set for the web, so they may differ slightly from the printed page. This adaptation is released under the same licence and is neither affiliated with nor endorsed by Diez, Çetinkaya-Rundel and Barr or OpenIntro.