Topic 16: Inference Practice (Part B)

About

This is a continuation of the Topic 16 (Part A) activity. This second of three practice notebooks contains four more scaffolded inference problems — Problems 5 through 8. No new content is introduced.

Inference Practice

This activity continues where Part A left off. For convenience, the reference documents are linked here:

For any problems involving hypothesis tests, assume \(\alpha = 0.05\) unless otherwise stated.

No Hints

There are no hints included in this activity. Use the reference documents linked above and your previous notebooks to guide you.


Problem 5

A pollster working for Pete Buttigieg is interested in identifying the proportion of registered Democrats planning to vote in the NH primary for whom Mayor Pete is their first or second choice candidate. If the pollster wants to estimate this proportion to within one percentage point at 95% confidence, how many voters should be included in a sample if data from a focus group suggests that the proportion is near 42%?

Problem 5, Part I

To answer the question as asked, we should:

Problem 5, Part II

The parameter the pollster is attempting to measure is a:

Use the code block below to input or compute the desired margin of error.

0.01

0.01

Use the code block below to compute the critical value (\(z_{\alpha/2}\)) for a 95% confidence level.

qnorm(0.975)

qnorm(0.975)

Use the code block below to input the value of \(p\) to be used in the sample size calculation.

0.42

0.42

Use the code block below to compute the minimum required sample size.

ceiling((qnorm(0.975) / 0.01)^2 * 0.42 * (1 - 0.42))

ceiling((qnorm(0.975) / 0.01)^2 * 0.42 * (1 - 0.42))
Reminder: Always Round Up

Did you remember to round your answer up to the nearest whole number? Rounding down results in either a loss of confidence or an increased margin of error, violating the stated requirements for the estimate.


Problem 6

A Gallup poll surveyed 1,000 randomly sampled Greeks in 2011 and found that 25% of them said they would rate their lives poorly enough to be considered suffering. Construct a 95% confidence interval for the true proportion of Greeks who are suffering.

Problem 6, Part I

To answer the question as asked, we should:

Problem 6, Part II

What is the desired level of confidence?

Problem 6, Part III

Is your confidence interval being built to capture a mean (\(\mu\)), a proportion (\(p\)), or something else?

Problem 6, Part IV

Does the population parameter belong to a single group or is it a comparison of multiple groups?

Problem 6, Part V

Which standard error formula should be used?

Problem 6, Part VI

Which distribution should be used to identify the critical value?

Use the code block below to compute the critical value.

qnorm(0.975)

qnorm(0.975)

Use the code block below to compute the point estimate.

0.25

0.25

Use the code block below to compute the standard error.

sqrt(0.25 * (1 - 0.25) / 1000)

sqrt(0.25 * (1 - 0.25) / 1000)

Use the code block below to compute the lower bound of the confidence interval.

0.25 - qnorm(0.975) * sqrt(0.25 * 0.75 / 1000)

0.25 - qnorm(0.975) * sqrt(0.25 * 0.75 / 1000)

Use the code block below to compute the upper bound of the confidence interval.

0.25 + qnorm(0.975) * sqrt(0.25 * 0.75 / 1000)

0.25 + qnorm(0.975) * sqrt(0.25 * 0.75 / 1000)
Problem 6, Part VII

The correct interpretation of this confidence interval is:


Problem 7

A “social experiment” conducted by a TV program questioned what people do when they see a very angry father upset with his child about their poor athletic performance. On two different occasions at the same restaurant, a father and child were depicted — in one scenario the child was a son and in the other a daughter. The table below shows how many restaurant diners were present under each scenario and whether or not they intervened.

Son Daughter Total
Intervened 15 25 40
No Action 25 20 45
Total 40 45 85

Conduct a hypothesis test to determine whether there is evidence to suggest that the proportion of individuals willing to intervene is dependent on the gender of the child.

Problem 7, Part I

To answer the question as asked, we should:

Problem 7, Part II

What is the level of significance associated with this test?

Problem 7, Part III

Does this hypothesis test involve testing a statement about a mean (\(\mu\)), a proportion (\(p\)), or something else?

Problem 7, Part IV

How many groups are being compared in this test?

Problem 7, Part V

Which of the following are the hypotheses associated with this test?

Problem 7, Part VI

Which standard error formula should be used?

Problem 7, Part VII

Which distribution does the test statistic follow?

Use the code block below to compute the point estimate.

(15/40) - (25/45)

(15/40) - (25/45)

Use the code block below to compute the null value.

0

0

Use the code block below to compute the standard error.

sqrt(((15/40) * (1 - 15/40) / 40) + ((25/45) * (1 - 25/45) / 45))

sqrt(((15/40) * (1 - 15/40) / 40) + ((25/45) * (1 - 25/45) / 45))

Use the code block below to compute the test statistic.

se <- sqrt(((15/40) * (1 - 15/40) / 40) + ((25/45) * (1 - 25/45) / 45)) ((15/40) - (25/45)) / se

se <- sqrt(((15/40) * (1 - 15/40) / 40) + ((25/45) * (1 - 25/45) / 45))
((15/40) - (25/45)) / se

Use the code block below to compute the \(p\)-value.

se <- sqrt(((15/40) * (1 - 15/40) / 40) + ((25/45) * (1 - 25/45) / 45)) ts <- ((15/40) - (25/45)) / se 2 * (1 - pnorm(abs(ts)))

se <- sqrt(((15/40) * (1 - 15/40) / 40) + ((25/45) * (1 - 25/45) / 45))
ts <- ((15/40) - (25/45)) / se
2 * (1 - pnorm(abs(ts)))
Problem 7, Part VIII

What is the result of the test?

Problem 7, Part IX

The result of the test means that:


Problem 8

A University has a policy that its sports teams require no more than 15 hours per week of time commitment from players during the off-season. A random survey of 12 players from the University’s Quidditch team during the Fall Semester (Quidditch is a Spring sport) resulted in a mean of 15.25 hours per week of Quidditch-related activity, with a standard deviation of 1 hour. Is there evidence to suggest that the University Quidditch coach is not following University policy? Use \(\alpha = 0.10\).

Problem 8, Part I

To answer the question as asked, we should:

Problem 8, Part II

What is the level of significance associated with this test?

Problem 8, Part III

Does this hypothesis test involve testing a statement about a mean (\(\mu\)), a proportion (\(p\)), or something else?

Problem 8, Part IV

How many groups are being compared in this test?

Problem 8, Part V

Which of the following are the hypotheses associated with this test?

Problem 8, Part VI

Do we know the population standard deviation (\(\sigma\)) for hours spent on Quidditch?

Problem 8, Part VII

Which standard error formula should be used?

Problem 8, Part VIII

Which distribution does the test statistic follow?

Use the code block below to compute the point estimate.

15.25

15.25

Use the code block below to compute the null value.

15

15

Use the code block below to compute the standard error.

1 / sqrt(12)

1 / sqrt(12)

Use the code block below to compute the test statistic.

(15.25 - 15) / (1 / sqrt(12))

(15.25 - 15) / (1 / sqrt(12))

Use the code block below to compute the \(p\)-value.

ts <- (15.25 - 15) / (1 / sqrt(12)) 1 - pt(ts, df = 11)

ts <- (15.25 - 15) / (1 / sqrt(12))
1 - pt(ts, df = 11)
Problem 8, Part IX

What is the result of the test?

Problem 8, Part X

The result of the test means that:

Submit

If you are part of a course with an instructor who is grading your work on these activities, please copy and submit both of the hashes below using the method your instructor has requested.

Question Hash

The hash below encodes your responses to the multiple choice questions in this activity.

Exercise Hash

Click the button below to generate your exercise submission code. This hash encodes your work on the graded code exercises in this activity.

You must have attempted the graded exercises before clicking — clicking generates a snapshot of your current results. If you have completed the activity over multiple sessions, please go back through and hit the Run Code button on each graded exercise before generating the hash below, to ensure your most recent results are recorded.

Summary

Main Takeaways

Problems 5–8 introduced a few additional scenarios worth remembering:

  • Sample size planning requires rounding up — always. Rounding down means either the confidence level or the margin of error requirement is violated.
  • When no prior estimate of \(p\) is available, use \(p = 0.5\) as a conservative worst-case choice. When a prior estimate exists, use it — it gives a more efficient (smaller) required sample size.
  • Two-proportion tests use the normal distribution for the test statistic since we are working with sample proportions, not means.
  • Single-group tests for a mean use the \(t\)-distribution when \(\sigma\) is unknown — which is almost always.
Looking Ahead

Part C contains the final four problems — Problems 9 through 12. The scaffolding remains but there are no safety nets. You’re nearly there!