Hypothesis Testing for Mean (Two Sample) (DP IB Maths: AI HL)

Revision Note

Dan

Author

Dan

Expertise

Maths

Did this video help you?

Two-Sample Tests

What is a two-sample test?

  • A two-sample test is used to compare the means (μ1 & μ2) of two normally distributed populations
    • You use a z-test when the population variances (sigma subscript 1 superscript 2 & sigma subscript 2 superscript 2) are known
    • You use a t-test when the population variances are unknown
      • In this course you will assume the variances are equal and use a pooled sample for a t-test
      • In a pooled sample the data from both samples are used to estimate the population variance

What are the steps for performing a two-sample test on my GDC?

  • STEP 1: Write the hypotheses
    • H0 : μ1= μ2
      • Clearly state that μ1 & μ2 represent the population means
      • Make sure you make it clear which mean corresponds to which population
      • In words this means that the two population means are equal
    • For a one-tailed test H1 : μ1 < μ2 or H1 : μ1 > μ2
    • For a two-tailed test: H1 : μ1μ2
      • The alternative hypothesis will depend on what is being tested
  • STEP 2: Decide if it is a z-test or a t-test
    • If the populations variances are known then use a z-test
    • If the populations variances are unknown then use a t-test
      • Assume the variances are equal and use a pooled sample
  • STEP 3: Enter the data into your GDC and choose two-sample z-test or two-sample t-test
    • If you have the raw data
      • Enter the data as a list
      • Enter the values of σ1 & σ2 if a z-test
      • Choose the pooled option if a t-test
    • If you have summary statistics (only for a z-test)
      • Enter the values of x with bar on top subscript 1, x with bar on top subscript 2 , σ1, σ2, n1 & n2
    • Your GDC will give you the p-value
  • STEP 4: Decide whether there is evidence to reject the null hypothesis
    • If the p-value < significance level then reject H0
  • STEP 5: Write your conclusion
    • If you reject H0­ then there is evidence to suggest that...
      • The mean of the 1st population is smaller (for H1 : μ1 < μ2)
      • The mean of the 1st population is bigger (for H1 : μ1 > μ2)
      • The means of the two populations are different (for H1 : μ1 μ2)
    • If you accept H­0 then there is insufficient evidence to reject the null hypothesis which suggests that...
      • The mean of the 1st population is not smaller (for H1 : μ1 < μ2)
      • The mean of the 1st population is not bigger (for H1 : μ1 > μ2)
      • The means of the two populations are not different (for H1 : μ1 μ2)

Worked example

The times (in minutes) for children and adults to complete a puzzle are recorded below.

Children

3.1

2.7

3.5

3.1

2.9

3.2

3.0

2.9

 

Adults

3.1

3.6

3.5

3.6

2.9

3.6

3.4

3.6

3.7

3.0

The creator of the puzzle claims children are generally faster at solving the puzzle than adults. A t-test is to be performed at a 1% significance level.

a)
Write down the null and alternative hypotheses.

4-7-4-ib-ai-sl-t-test-one-tail-a-we-solution

b)
Find the p-value for this test.

4-7-4-ib-ai-sl-t-test-one-tail-b-we-solution

c)
State whether the creator’s claim is supported by the test. Give a reason for your answer.

4-7-4-ib-ai-sl-t-test-one-tail-c-we-solution

Paired t-tests

What is a paired t-test?

  • A paired test is where you take two samples but each data point from one sample can be paired with a data point from the other sample
    • These are used when one group of members are used twice and the two results for each member are paired
      • It could be to compare the sample before and after introducing a new factor
      • It could be to compare the sample under two different conditions
  • For this test you use the differences between the pairs and treat them as one sample
    • As the variance of the differences is unlikely to be known you will use a t-test
    • For a paired test you need to assume the differences are normally distributed
      • You don’t need to assume the populations are normally distributed

What are the steps for performing a paired t-test on my GDC?

  • STEP 1: Write the hypotheses
    • H0 : μD = 0
      • Clearly state that μD represents the population mean of the differences
      • In words this means the population mean has not changed
    • For a one-tailed test H1 : μD < 0 or H1 : μD > 0
    • For a two-tailed test: H1 : μD ≠ 0
      • The alternative hypothesis will depend on what is being tested
  • STEP 2: Enter the data into your GDC and choose the one-sample t-test
    • Enter the differences as a list
      • Be consistent with the order in which you subtract paired values
    • Your GDC will give you the p-value
  • STEP 3: Decide whether there is evidence to reject the null hypothesis
    • If the p-value < significance level then reject H0
  • STEP 4: Write your conclusion
    • If you reject H0­ then there is evidence to suggest that...
      • The mean has decreased (for H1 : μD < 0)
      • The mean has increased (for H1 : μD > 0)
      • The mean has changed (for H1 : μD 0)
    • If you accept H­0 then there is insufficient evidence to reject the null which suggests that...
      • The mean has not decreased (for H1 : μD < 0)
      • The mean has not increased (for H1 : μD > 0)
      • The mean has not changed (for H1 : μD 0)

Exam Tip

  • If an exam question has two samples with the same number of members then consider carefully whether it makes sense to do a paired test or a two sample test
  • The examiner might make it look like it is a paired test to trick you!

Worked example

In a school all students must study French and Spanish. 9 students are selected and complete a test in both subjects, the standardised scores are shown below

 

Student

1

2

3

4

5

6

7

8

9

French score

61

82

77

80

99

69

75

71

81

Spanish score

74

79

83

66

95

79

82

81

85

 

The headteacher wants to investigate whether there is a difference in the students’ scores between the two subjects. A paired t-test is to be performed at a 10% significance level.

a)
Write down the null and alternative hypotheses.

4-12-2-ib-ai-hl-paired-t-test-a-we-solution

b)
Find the p-value for this test.

4-12-2-ib-ai-hl-paired-t-test-b-we-solution

c)
Write down the conclusion to the test. Give a reason for your answer.

4-12-2-ib-ai-hl-paired-t-test-c-we-solution

Did this page help you?

Dan

Author: Dan

Dan graduated from the University of Oxford with a First class degree in mathematics. As well as teaching maths for over 8 years, Dan has marked a range of exams for Edexcel, tutored students and taught A Level Accounting. Dan has a keen interest in statistics and probability and their real-life applications.