Statistics 2

In-Class Exercise 2

Yu-You Liou

Shih Chien University

2026-09-16

Question 1

t Test from Summary Statistics

A company claims that the mean assembly time of a product is 40 minutes. A sample of 16 workers has a mean of 42.3 minutes and a standard deviation of 5.8 minutes. Use \alpha=0.05 and a two-tailed test.

  1. State H_0 and H_1.
  2. Compute t=(\bar{X}-\mu)/(s/\sqrt{n}) in R.
  3. Find the critical values with qt() and d.f.=n-1, then state the decision.

Question 2

t Test from Raw Data

The following are the number of minutes 12 customers waited at a service counter.

wait <- c(7.2, 9.8, 6.5, 11.4, 8.0, 10.2,
          7.9, 12.1, 9.0, 8.6, 10.8, 9.4)

The manager claims that the mean waiting time is 8 minutes. Test the claim at \alpha=0.05 using a two-tailed test.

  1. Compute mean(wait) and sd(wait).
  2. Compute the test statistic and the P-value with pt().
  3. State the decision and write the conclusion in words.

Question 3

z or t?

  1. Explain in one or two sentences when the t test should be used instead of the z test.
  2. Compute qt(0.975, df) for d.f.=5,\ 15,\ 30,\ 100,\ 1000 and compare the values with qnorm(0.975).
  3. What do these values tell you about the t distribution as the sample size grows?