Hypothesis Testing 3 and Two Sample Comparisons

Example 1 – Large Samples

Context: A total of 100 students enrolled in the ST3001 course are divided into two distinct tutorial groups, each containing 50 students. This study intends to compare the performance of these groups through their exam scores.

Exam Scores:
  • Group 1: 77, 64, 84, 71, 70, 70, 51, 56, 74, 54, 60, 68, 55, 49, 55, 61, 61, 43, 66, 80, 62, 81, 56, 68, 66, 90, 48, 73, 68, 41, 83, 65, 60, 52, 64, 57, 53, 57, 69, 58, 59, 44, 64, 55, 75, 59, 52, 52, 65, 83

  • Group 2: 72, 44, 61, 57, 51, 56, 63, 64, 61, 60, 68, 55, 72, 64, 80, 65, 55, 75, 87, 85, 67, 70, 68, 69, 63, 62, 92, 53, 63, 65, 59, 56, 75, 60, 64, 76, 75, 52, 55, 40, 62, 69, 63, 80, 65, 57, 69, 63, 56, 62

Testing Claim
  • Hypothesis: The lecturer claims that the mean exam scores are statistically equal for both tutorial groups.

  • Null Hypothesis (H0): H<em>0:μ</em>1=μ2H<em>0: \mu</em>1 = \mu_2

  • Alternative Hypothesis (H1): H<em>1:μ</em>1<br>eqμ2H<em>1: \mu</em>1 <br>eq \mu_2

  • Evidence Against H0: A difference observed in the sample means that deviates from zero suggests that the null hypothesis might be rejected:
    Xˉ<em>1Xˉ</em>2<br>eq0\bar{X}<em>1 - \bar{X}</em>2 <br>eq 0

Sample Scores Taken:
  • Group 1 (n=30): 49, 55, 52, 70, … (with a total of 30 scores)

  • Group 2 (n=30): 65, 62, 63, 60, … (with a total of 30 scores)

Calculated Means and Standard Deviations:
  • Mean of Group 1: Xˉ1=61.533\bar{X}_1 = 61.533

  • Mean of Group 2: Xˉ2=63.733\bar{X}_2 = 63.733

  • Standard Deviation of Group 1: s1=12.43946s_1 = 12.43946

  • Standard Deviation of Group 2: s2=8.944015s_2 = 8.944015

Distribution Assumptions
  • Assuming Normal Distribution:
    Given that both sample sizes (n1 and n2) are 30, it supports the assumption of a normal sampling distribution of the difference; this allows for the application of the Central Limit Theorem.
    The distribution of the difference in sample means can be modeled as follows:
    Xˉ<em>1Xˉ</em>2N(μ<em>1μ</em>2,σ<em>12/n</em>1+σ<em>22/n</em>2)\bar{X}<em>1 - \bar{X}</em>2 \,\sim \, N(\mu<em>1 - \mu</em>2, \sigma<em>1^2/n</em>1 + \sigma<em>2^2/n</em>2)
    By substituting the sample standard deviations, we have:
    Xˉ<em>1Xˉ</em>2N(μ<em>1μ</em>2,s<em>12/n</em>1+s<em>22/n</em>2)\bar{X}<em>1 - \bar{X}</em>2 \,\sim \, N(\mu<em>1 - \mu</em>2, s<em>1^2/n</em>1 + s<em>2^2/n</em>2)

Calculating the Difference
  • Filling in values:
    From prior calculations, we input the sample standard deviations into the normal distribution representation:
    Xˉ<em>1Xˉ</em>2 N(μ<em>1μ</em>2,12.439462/30+8.9440152/30)\bar{X}<em>1 - \bar{X}</em>2 \,\sim \ N(\mu<em>1 - \mu</em>2, 12.439462/30 + 8.9440152/30)

  • Resulting Distribution:
    Xˉ<em>1Xˉ</em>2 N(μ<em>1μ</em>2,2.7972)\bar{X}<em>1 - \bar{X}</em>2 \,\sim \ N(\mu<em>1 - \mu</em>2, 2.7972)

Observed Differences
  • Observed Difference Between Sample Means:
    Xˉ<em>1Xˉ</em>2=61.53363.733=2.2\bar{X}<em>1 - \bar{X}</em>2 = 61.533 - 63.733 = -2.2

  • Probability of Observing Such a Difference:
    P(|\bar{X}1 - \bar{X}2| > 2.2)
    To calculate this probability, we utilize the standardization of the sample means:
    = 2P(Z > (\bar{X}1 - \bar{X}2 - (\mu1 - \mu2))/\sqrt{s1^2/n1 + s2^2/n2)
    Substituting:
    = 2P(Z > 0.7865)

Final Calculation
  • By consulting the Z-table:
    2P(Z > 0.7865) = 2(0.2148) = 0.4296

  • Conclusion of Example 1:
    At a significance level of α=0.05\alpha = 0.05:
    Since 0.4296 > 0.05, we fail to reject the null hypothesis H0H_0. The evidence does not substantiate the claim that the mean scores between the two groups are statistically different.

Example 2 – Small Samples
Context:

In this scenario, we conduct a t-test, appropriate when sample sizes are less than 30.

Assumptions for t-test:
  • Samples must be normally distributed.

  • Samples must be independent from one another.

  • Cases within the samples must also be independent.

  • Variances of the two samples must be roughly equal.

Example 2 – Application

When new samples are analyzed, mean scores are calculated as follows:
Xˉ<em>1=59.13\bar{X}<em>1 = 59.13, Xˉ</em>2=62.6\bar{X}</em>2 = 62.6, s<em>1=10.76945s<em>1 = 10.76945, s</em>2=6.674044s</em>2 = 6.674044
The same protocol as in the previous example is followed to calculate the p-value and this is compared against the predetermined significance level.

Example 3 – Matched Pairs

This procedure examines two measurements taken from the same individuals in order to assess whether the mean difference is statistically equivalent to zero.

  • Null Hypothesis: H<em>0:μ</em>d=0H<em>0: \mu</em>d = 0

  • Alternative Hypothesis: H<em>1:μ</em>d<br>eq0H<em>1: \mu</em>d <br>eq 0

  • The analysis involves calculating individual differences and subsequently averaging these differences for evaluation.

Conclusion

Across all examples, the fundamental structure of hypothesis testing remains consistent. The results derived from these statistical analyses guide the determination of whether to reject or accept the null hypothesis based on the accumulated statistical evidence and the significance thresholds established beforehand.