Statistics 2

In-Class Exercise 9

Yu-You Liou

Shih Chien University

2026-09-16

Question 1

Goodness-of-Fit Test with Equal Expected Frequencies

A die is rolled 120 times with the following results.

observed <- c(15, 24, 18, 27, 14, 22)

Test the claim that the die is fair at \alpha=0.05.

  1. State H_0 and H_1, and give the expected frequency of each face.
  2. Compute \chi^2=\sum(O-E)^2/E in R.
  3. Find the critical value with qchisq() and d.f.=k-1, then state the decision.
  4. Confirm your answer with chisq.test(observed).

Question 2

Goodness-of-Fit Test with Unequal Expected Frequencies

A company claims that its three product lines account for 40%, 35%, and 25% of sales. Among 300 recent customers, the counts were 100, 125, and 75.

Test the claim at \alpha=0.05.

  1. Compute the expected frequencies from the claimed proportions.
  2. Compute the test statistic and find the critical value.
  3. Confirm your answer with chisq.test(observed, p = c(0.40, 0.35, 0.25)), then state the conclusion.

Question 3

Assumptions and Degrees of Freedom

  1. Explain how the degrees of freedom are determined in a goodness-of-fit test.
  2. State the assumption about the size of the expected frequencies, and check whether both tests above satisfy it.
  3. Explain in one sentence why the chi-square goodness-of-fit test is always right-tailed.