Sign in to jmaths to print this page or save it as a PDF: jmaths-8ce638778fd6.herokuapp.com/maths/ai-hl/hypothesis-testing/13-4-10/problems/

jmaths

IB Mathematics: Applications and Interpretation HL · 13.4: Hypothesis Testing · 13.4.10

Testing a mean: z-test or t-test Problem set A Worked solutions

Skills

  1. For each situation, write down the null and alternative hypotheses, defining \(\mu\), and say whether a z-test or a t-test is needed. The population is normally distributed in each case.

    1. (a) A fruit farm says its oranges have a mean mass of 180 g. Records over many seasons give a population standard deviation of 14 g. A sample of 30 oranges has a mean mass of 175.2 g. Has the mean mass decreased?

      • Let \(\mu\) be the mean mass of an orange, in grams. \(H_0: \mu = 180\), \(H_1: \mu < 180\)
      • The population standard deviation is known (14 g), so use z. 'Decreased' means one-tailed.
      • Use a z-test
    2. (b) A café says a medium coffee has a mean volume of 250 ml. A sample of 12 coffees has a mean of 247 ml and a sample standard deviation of 5 ml. Is the mean volume different from 250 ml?

      • Let \(\mu\) be the mean volume of a medium coffee, in millilitres. \(H_0: \mu = 250\), \(H_1: \mu \neq 250\)
      • 5 ml is a sample standard deviation, so use t. 'Different from' means two-tailed.
      • Use a t-test
    3. (c) A train company says journeys take a mean of 42 minutes. The population variance is known to be 9 min². A sample of 20 journeys has a mean of 43.6 minutes. Is the mean journey time more than 42 minutes?

      • Let \(\mu\) be the mean journey time, in minutes. \(H_0: \mu = 42\), \(H_1: \mu > 42\)
      • The population variance is known, so \(\sigma = 3\) and use z. 'More than' means one-tailed.
      • Use a z-test
  2. A juice plant fills bottles with a mean volume of 330 ml. A manager thinks the machine has drifted and measures a sample. The population standard deviation is 4.2 ml. A random sample of 18 bottles has a mean of 331.9 ml. Assume the population is normally distributed. Test, at the 5% significance level, whether the mean volume has changed. Give the p-value and your conclusion.

    • Let \(\mu\) be the mean volume of a bottle, in millilitres. \(H_0: \mu = 330\), \(H_1: \mu \neq 330\). Two-tailed test, because H1 uses ≠.
    • The population standard deviation is known and the population is normal, so use a z-test.
    • From the calculator: \(\sigma = 4.2\), \(\bar{x} = 331.9\), \(n = 18\): z = 1.92, p = 0.0549
    • 0.0549 > 0.05, so do not reject \(H_0\). There is insufficient evidence, at the 5% significance level, that the mean volume has changed.
  3. A taxi firm says the mean length of a journey to the airport is 25 minutes. A rival thinks it takes longer. The sample standard deviation is 4.6 minutes. A random sample of 16 journeys has a mean of 27.5 minutes. Assume the population is normally distributed. Test, at the 5% significance level, whether the mean journey time is more than 25 minutes. Give the p-value and your conclusion.

    • Let \(\mu\) be the mean journey time, in minutes. \(H_0: \mu = 25\), \(H_1: \mu > 25\). One-tailed test, because H1 uses >.
    • The standard deviation comes from the sample, so it is an estimate. The population is normal, so use a t-test.
    • From the calculator: \(s = 4.6\), \(\bar{x} = 27.5\), \(n = 16\): t = 2.17, df = 15, p = 0.0231
    • 0.0231 < 0.05, so reject \(H_0\). There is sufficient evidence, at the 5% significance level, that the mean journey time is more than 25 minutes.

In context

  1. A runner says her mean time for a 5 km run is 24.5 minutes. After a month of training she records 9 times, in minutes. The data are 24.6, 23.1, 25.4, 22.8, 24.0, 23.5, 22.9, 24.3, 23.7 Assume the population is normally distributed. Test, at the 5% significance level, whether her mean time has fallen below 24.5 minutes. Give the p-value and your conclusion.

    • Let \(\mu\) be her mean 5 km time, in minutes. \(H_0: \mu = 24.5\), \(H_1: \mu < 24.5\). One-tailed test, because H1 uses <.
    • The standard deviation comes from the sample, so it is an estimate. The population is normal, so use a t-test.
    • Enter the data in a list. From the calculator: \(\bar{x} = 23.8\), \(s = 0.858\), t = −2.41, df = 8, p = 0.0213
    • 0.0213 < 0.05, so reject \(H_0\). There is sufficient evidence, at the 5% significance level, that her mean time has fallen below 24.5 minutes.
  2. A packing line fills bags of rice that should have a mean mass of 500 g. A sample of 7 bags is weighed, in grams. The population standard deviation is 6 g. The data are 498, 507, 501, 512, 495, 509, 503 Assume the population is normally distributed. Test, at the 5% significance level, whether the mean mass of a bag is different from 500 g. Give the p-value and your conclusion.

    • Let \(\mu\) be the mean mass of a bag, in grams. \(H_0: \mu = 500\), \(H_1: \mu \neq 500\). Two-tailed test, because H1 uses ≠.
    • The population standard deviation is known and the population is normal, so use a z-test.
    • Enter the data in a list. From the calculator, with \(\sigma = 6\): \(\bar{x} = 504\), z = 1.57, p = 0.115
    • 0.115 > 0.05, so do not reject \(H_0\). There is insufficient evidence, at the 5% significance level, that the mean mass of a bag is different from 500 g.
  3. A teacher says the mean time students spend on homework each week is 8.0 hours. The sample variance is 2.25 hours². A random sample of 20 students has a mean of 8.8 hours. Assume the population is normally distributed. Test, at the 5% significance level, whether the mean weekly homework time is different from 8.0 hours. Give the p-value and your conclusion.

    • Let \(\mu\) be the mean weekly homework time, in hours. \(H_0: \mu = 8.0\), \(H_1: \mu \neq 8.0\). Two-tailed test, because H1 uses ≠.
    • The standard deviation comes from the sample, so it is an estimate. The population is normal, so use a t-test.
    • The sample variance is given, so \(s = \sqrt{2.25} = 1.5\)
    • From the calculator: \(s = 1.5\), \(\bar{x} = 8.8\), \(n = 20\): t = 2.39, df = 19, p = 0.0276
    • 0.0276 < 0.05, so reject \(H_0\). There is sufficient evidence, at the 5% significance level, that the mean weekly homework time is different from 8.0 hours.
  4. A factory makes rods with a mean length of 70 cm. The population variance is 0.81 cm². A random sample of 12 rods has a mean of 70.6 cm. Assume the population is normally distributed. Test, at the 5% significance level, whether the mean length of a rod is more than 70 cm. Give the p-value and your conclusion.

    • Let \(\mu\) be the mean length of a rod, in centimetres. \(H_0: \mu = 70\), \(H_1: \mu > 70\). One-tailed test, because H1 uses >.
    • The population standard deviation is known and the population is normal, so use a z-test.
    • The variance is given, so \(\sigma = \sqrt{0.81} = 0.9\)
    • From the calculator: \(\sigma = 0.9\), \(\bar{x} = 70.6\), \(n = 12\): z = 2.31, p = 0.0105
    • 0.0105 < 0.05, so reject \(H_0\). There is sufficient evidence, at the 5% significance level, that the mean length of a rod is more than 70 cm.

Stretch

  1. A bakery's bread rolls have a mean mass of 240 g. From years of records the population standard deviation is 5.4 g. A sample of 25 rolls has a mean of 242.4 g and a sample standard deviation of 6.1 g. The population is normally distributed. Test, at the 5% significance level, whether the mean mass of a roll has changed.

    1. (a) State the hypotheses and say which test you will use.

      • Let \(\mu\) be the mean mass of a roll, in grams. \(H_0: \mu = 240\), \(H_1: \mu \neq 240\). Two-tailed test, because H1 uses ≠.
      • The population standard deviation is given, so use a z-test with \(\sigma = 5.4\). Ignore the sample standard deviation.
    2. (b) Find the p-value.

      • From the calculator: \(\bar{x} = 242.4\), \(n = 25\): z = 2.22, p = 0.0263
    3. (c) Write your conclusion at the 5% significance level, and at the 1% significance level.

      • 0.0263 < 0.05, so reject \(H_0\). There is sufficient evidence, at the 5% significance level, that the mean mass of a roll has changed.
      • 0.0263 > 0.01, so do not reject \(H_0\) at the 1% level: there is insufficient evidence, at the 1% significance level, that the mean mass of a roll has changed.
  2. A fish farm says the mean length of its trout is 18.5 cm. The farm changes its feed and measures 10 trout, in centimetres: 18.4, 19.2, 17.9, 20.1, 18.8, 19.6, 20.4, 18.1, 19.0, 19.9 Assume the population is normally distributed.

    1. (a) Find the sample mean and the sample standard deviation.

      • Enter the data in a list. From the calculator: \(\bar{x} = 19.1\), \(s = 0.857\)
    2. (b) Test, at the 5% significance level, whether the new feed has increased the mean length.

      • Let \(\mu\) be the mean length of a trout after the feed change, in centimetres. \(H_0: \mu = 18.5\), \(H_1: \mu > 18.5\). One-tailed test, because H1 uses >.
      • From the calculator: t = 2.36, df = 9, p = 0.0212
      • 0.0212 < 0.05, so reject \(H_0\). There is sufficient evidence, at the 5% significance level, that the new feed has increased the mean length.
    3. (c) Say why a t-test and not a z-test is used here.

      • No population standard deviation is given.
      • The standard deviation comes from a small sample, so it is an estimate, and the t-distribution allows for that.

jmaths.xyz · AI HL · 13.4.10 Testing a mean: z-test or t-test