t -test
What is a t-test?
A t-test is a statistical hypothesis test used to determine whether there is a significant difference between the means of two groups.
It is commonly used when:
-
Sample sizes are small
-
Population standard deviation is unknown
-
The data is approximately normally distributed
🧪 Types of t-tests
There are three main types of t-tests:
1. One-Sample t-test
Compares the mean of a single sample to a known value (often a population mean).
Example: Is the average IQ of a group of students different from 100?
2. Two-Sample t-test (Independent)
Compares the means of two independent groups.
Example: Are the exam scores of male and female students significantly different?
3. Paired Sample t-test (Dependent)
Compares means of the same group at two different times (or matched pairs).
Example: Did students improve after a training session?
📐 Assumptions of the t-test
-
Data is continuous
-
Data is normally distributed (or approximately normal)
-
Observations are independent
-
Variances are equal for independent samples (unless using Welch's t-test)
🔢 Formulas
✅ One-Sample t-test:
-
= sample mean
-
= population mean
-
= sample standard deviation
-
= sample size
✅ Two-Sample t-test:
Where = pooled standard deviation:
✅ Paired Sample t-test:
-
= mean of the differences
-
= standard deviation of the differences
-
= number of pairs
Examples
Example 1: One-Sample t-test
Problem: A teacher claims that the average score in her class is 75. A sample of 10 students has a mean score of 72 with a standard deviation of 5. Is her claim valid?
Solution:
Using a t-table with df = 9, at α = 0.05, critical t ≈ ±2.262.
Since -1.90 > -2.262, we fail to reject the null hypothesis.
✅ Conclusion: No significant difference.
Example 2: Independent Two-Sample t-test
Problem: Two sections of a class scored as follows:
-
Section A: mean = 70, sd = 4, n = 10
-
Section B: mean = 75, sd = 5, n = 10
Is there a significant difference in scores?
Solution:
-
Calculate pooled standard deviation:
-
Compute t-statistic:
Degrees of freedom = 18. Critical t ≈ ±2.101 at α = 0.05.
✅ Since -2.48 < -2.101 → Reject null hypothesis
✔️ Conclusion: Significant difference in scores.
Example 3: Paired Sample t-test
Problem: Students took a mock test and then a final test. Scores:
Student | Mock | Final |
---|---|---|
A | 65 | 70 |
B | 68 | 72 |
C | 70 | 75 |
D | 60 | 66 |
E | 62 | 65 |
Mean difference = 4.6
Standard deviation of difference ≈ 1.14
n = 5
df = 4, critical t ≈ 2.776.
Since 9.02 > 2.776 → Reject null hypothesis
✅ Conclusion: Significant improvement.
💡 When to use which t-test?
Scenario | Test Type |
---|---|
Compare one sample with known mean | One-sample t-test |
Compare two unrelated group means | Two-sample (independent) |
Compare two related (paired) samples | Paired sample t-test |
Comments
Post a Comment