Index

Hypothesis testing

Chi-squared goodness of fit test

Solve the following exercises using the χ2 GOF function on your GDC. Click here for help: Chi-squared GOF using TI-nspire.
  1. ?
    ?
    The null hypothesis is rejected if the p-value is less than the significance level \(\alpha\):

    p-value \(\lt \alpha\)

    Standard significance level is \(\alpha=0.05\).
    Sometimes other values of \(\alpha\) will be given.
    Anastasia wanted to verify if her playing die is fair. She rolled the die 60 times and counted the results. Here's the table of frequencies:
    result actual
    frequency
    1 8
    2 9
    3 5
    4 9
    5 10
    6 19

    (a)   Write down the null hypothesis.

    (b)   Add a column of frequencies expected in an ideal situation.

    (c)   Use the χ2 GOF test on your GDC to calculate the p-value.

    (d)   Using the p-value verify the validity of the null hypothesis.

    Solutions:    (a)  \(H_0\): "The die is fair."    (c)  p-value \(=0.0476\);    (d)  The null hypothesis must be rejected. The alternative hypothesis is valid: \(H_\mathrm{a}\): "The die is not fair."
    result actual
    frequency
    expected
    frequency
    1 8 10
    2 9 10
    3 5 10
    4 9 10
    5 10 10
    6 19 10
  2. Bertrand wanted to verify if his playing die is fair. He rolled the die 60 times and counted the results. Here's the table of frequencies:
    result actual
    frequency
    1 7
    2 9
    3 5
    4 10
    5 11
    6 18

    (a)   Write down the null hypothesis.

    (b)   Add the column of expected frequencies.

    (c)   Calculate the p-value.

    (d)   Using the p-value verify the validity of the null hypothesis.

    Solutions:    (a)  \(H_0\): "The die is fair."    (c)  p-value \(=0.0752\);    (d)  The null hypothesis is valid: the die is fair.
    result actual
    frequency
    expected
    frequency
    1 7 10
    2 9 10
    3 5 10
    4 10 10
    5 11 10
    6 18 10

    Note:    In exercise 2 the p-value is 0.0752 and we didn't reject the null hypothesis. However the fact that p-value is just a little greater than 0.05 doesn't prove the null hypothesis. It simply means that we don't have enough data to reject it. In a situation of this type it's a good idea to continue with verifications and gather more data.
  3. A wheel of fortune is divided in five sectors labeled A, B, C, D and E. Cindy wants to verify if this wheel of fortune is fair. Her null hypothesis is: "This wheel of fortune is fair." She tested it 100 times and counted the results. Here's the table of frequencies:
    result actual
    frequency
    A 13
    B 15
    C 27
    D 24
    E 21

    (a)   Calculate the p-value using the χ2 GOF test.

    (b)   Using the p-value verify the validity of the null hypothesis.

    Solutions:    (a)  p-value \(=0.136\);    (b)  The null hypothesis can not be rejected. This wheel of fortune is fair.
  4. A company was accused of being unfair to women. It was said that this company doesn't want to employ women. The company decided to do a survey on their own. The null hypothesis of this survey was: "We're equally open to male and female employees." They counted male and female employees in all three departments and here are the results:
    Department A:
    female 44
    male 56
    Department B:
    female 15
    male 25
    Department C:
    female 31
    male 39

    (a)   Calculate the p-value and verify the null hypothesis for department A.

    (b)   Calculate the p-value and verify the null hypothesis for department B.

    (c)   Calculate the p-value and verify the null hypothesis for department C.

    (d)   Calculate the p-value and verify the null hypothesis for the entire company.

    Solutions:    (a)  p-value \(=0.230\),    (b)  p-value \(=0.114\),    (c)  p-value \(=0.339\),    (d)  p-value \(=0.0384\).   Null hypothesis cannot be rejected for any department (A, B or C). But: null hypothesis is rejected for the entire company. This company is unfair to women.
  5. Town A has 9 000 inhabitants, town B has 14 000 inhabitants and town C has 17 000 inhabitants. A group of 20 representatives will represent these three towns in the national council. Representatives should have been selected at random. The actual number of representatives for each town is:
    town representatives
    town A 4
    town B 3
    town C 13
    Citizens of town B protested that the process of selection was not fair. Verify it. State the null hypothesis and write the expected number of representatives for each town. Then use the χ2 GOF test.

    (a)   Write down the null hypothesis.

    (b)   Calculate the p-value.

    (c)   Using the p-value verify the validity of the null hypothesis at significance level \(\alpha=10\%\).

    Solutions:    (a)  \(H_0\): "The process of selection was random/fair.";    (b)  p-value \(=0.0942=9.42\%\);    (c)  At given significance level, the null hypothesis must be rejected. The process of selecting the representatives was not random..

Chi-squared test of independence

Solve the following exercises using the χ2 2-way function on your GDC. Click here for help: Chi-squared two-way using TI-nspire.
  1. A statistician conducted a survey on movie genres. He wanted to know if the preferred genre depends on the sex of viewers. He stated the null hypothesis: "Preferred genre is independent from the viewer's sex."
    The following table shows the answers collected in a group of viewers.
      female male
    horror movies 20 25
    action movies 15 45
    romances 50 35
    melodramas 45 15

    (a)   Use the χ2 two-way test of independence to calculate the p-value.

    (b)   Hence, verify the validity of the null hypothesis.

    Solutions:    (a)  p-value \(=0.000000346\);    (b)  The null hypothesis must be rejected. Preferred genre depends on viewer's sex.
  2. Students from two towns attend the same IB DP course. Their grades raised suspicion. Is it possible that students from one of these two towns are privileged? Verify the situation. Here's the table of grades:
      town A town B
    grade 1 5 1
    grade 2 4 3
    grade 3 7 2
    grade 4 10 6
    grade 5 15 8
    grade 6 27 10
    grade 7 12 11

    (a)   Write the null hypothesis.

    (b)   Use the χ2 two-way test of independence to calculate the p-value.

    (c)   Hence, verify the validity of the null hypothesis.

    Solutions:    (a)  \(H_0\): "Grades are independent from the town of student's provenance."    (b)  p-value \(=0.614\);    (c)  The null hypothesis can not be rejected. Grades are independent from the student's provenance.
  3. We're trying to find out whether the level of literacy depends on the writing system used in a specific language. Here is our collection of data:
      English Russian Chinese
    illiterate persons 25 24 21
    low level of literacy 86 53 99
    high level of literacy 89 83 80

    (a)   Write the null hypothesis.

    (b)   Use the χ2 two-way test of independence to calculate the p-value.

    (c)   Hence, verify the validity of the null hypothesis.

    Solutions:    (a)  \(H_0\): "Level of literacy is independent on the writing system."    (b)  p-value \(=0.0427\);    (c)  The null hypothesis is rejected. Level of literacy is dependent on the writing system.
    Important: This does not mean that writing system is the cause of the level of literacy.

Two-sample t test

Solve the following exercises using the 2-Sample t Test function on your GDC. Click here for help: Two-sample t test using TI-nspire.
  1. In ski jumping one of the teams started introducing a new jumping technique. Members of other teams are still using older techniques. A statistician has to find out whether the new technique is better than the old ones. First, he collected the data. Here are the lengths of the jumps (in meters).
    new technique 180, 185, 165, 178, 190, 188
    old technique 173, 180, 178, 160, 169, 173, 181, 163
    Then the statistician stated the null hypothesis and the alternate hypothesis:
    \(H_0\): Both techniques are equally good.
    \(H_\mathrm{a}\): The new technique is better.

    (a)   Use the two-sample t test to calculate the p-value.

    (b)   Hence, verify the validity of the null hypothesis.

    Solutions:    (a)  p-value \(\approx0.0357\);    (b)  The null hypothesis must be rejected. The new technique is better.
  2. National Statistical Society is conducting a survey on IQ (intelligence quotient). They selected 8 random inhabitants of town A and 8 random inhabitants of town B. They'd like to know if the inhabitants of one town have a higher IQ, so they tested them and determined their IQ. Here are the results:
    town A 105, 128, 95, 119, 89, 113, 99, 110
    town B 100, 121, 118, 85, 91, 103, 97, 91

    (a)   Write down the null hypothesis and the alternate hypothesis.

    (b)   Use the two-sample t test to calculate the p-value.

    (c)   Hence, verify the validity of the null hypothesis.

    Solutions:    (a)  \(H_0\!:~ \mu_1=\mu_2\),  \(H_\mathrm{a}\!:~ \mu_1\ne\mu_2\);    (b)  p-value \(\approx0.331\);    (c)  The null hypothesis cannot be rejected. Inhabitants of both towns have equal mean IQ. (More precise answer: We don't have enough data to claim that the IQ is different.)
  3. National Statistical Society continues its survey on IQ. They selected 8 random inhabitants of town C and 8 random inhabitants of town D. They'd like to know if the inhabitants of one town have a higher IQ, so they tested them and determined their IQ. Here are the results:
    town C 105, 106, 101, 117, 97, 113, 114, 105
    town D 100, 107, 104, 95, 97, 99, 103, 101

    (a)   Write down the null hypothesis and the alternate hypothesis.

    (b)   Use the two-sample t test to calculate the p-value.

    (c)   Hence, verify the validity of the null hypothesis.

    Solutions:    (a)  \(H_0\!:~ \mu_1=\mu_2\),  \(H_\mathrm{a}\!:~ \mu_1\ne\mu_2\);    (b)  p-value \(\approx 0.0351\);    (c)  The null hypothesis must be rejected. Sample mean of C is much higher \((\overline{x}_1\gt\overline{x}_2)\), so we can conclude: Inhabitants of town C have a higher mean IQ.
  4. Environmentalists claim that the production of cereals is endangered due to the climate changes. According to their claims the hectare yields for wheat have lowered. We want to verify their claims so we collected the following data (yields in tonnes per hectare for several regions):
    yields now 7.1 8.2 7.6 7.8 8.3 8.1 7.3 7.2
    yields 20 years ago 7.3 7.5 8.0 8.6 7.9 8.3 7.7  

    (a)   Write down the null hypothesis and the alternate hypothesis.

    (b)   Use the two-sample t test.

    (c)   Write down the sample means \(\overline{x}_1\) and \(\overline{x}_2\).

    (d)   Use the p-value to verify the validity of the null hypothesis.

    Solutions:    (a)  \(H_0\!:~ \mu_1=\mu_2\),  \(H_\mathrm{a}\!:~ \mu_1\lt\mu_2\);    (c)  \(\overline{x}_1=7.7\),  \(\overline{x}_2=7.9\);    (d)  p-value \(\approx 0.209\), so the null hypothesis cannot be rejected. (The new sample mean is lower but we don't have enough data to claim that the new population mean is lower too. We cannot claim that the mean yields have lowered significantly.)

Powered by MathJax
Index

 Index