A Comprehensive Guide to Parametric Tests for Hypothesis Testing
Hypothesis testing is a key concept in inferential statistics that allows you to make probability statements about population parameters based on sample data. The goal is to determine whether a hypothesis about a population parameter is likely to be true. Hypothesis tests can be classified into two main categories: parametric and non-parametric tests.
In this article, we‘ll take an in-depth look at parametric tests, which are the most commonly used statistical procedures for hypothesis testing. We‘ll cover the purpose of each test, their assumptions and formulas, walk through some examples, and discuss how to interpret the results. By the end, you‘ll have a solid understanding of the most important parametric tests and when to use them in your own data analyses.
Parametric vs Non-Parametric Tests
The main difference between parametric and non-parametric tests has to do with the assumptions they make about the underlying population from which the sample data was drawn.
Parametric tests assume that:
- The data is approximately normally distributed
- The variance across groups being compared is approximately equal (homogeneity of variance)
- The data is measured at an interval or ratio level
If these assumptions are met, parametric tests are generally more powerful and able to detect an effect if one exists. They are the preferred choice when the right conditions are satisfied.
Non-parametric tests, on the other hand, do not make strict assumptions about the distribution or the variance. They can be used with skewed distributions or when the data is ordinal. However, they are usually less powerful than their parametric counterparts when the assumptions of the parametric tests are met.
Some common parametric tests include z-tests, t-tests, ANOVA, Pearson correlation and linear regression. Now let‘s examine each of these in more detail.
Z-Test
A z-test is used to test a hypothesis about the mean of a population when the population standard deviation is known. The z-statistic measures how many standard deviations the sample mean is from the hypothesized population mean.
The formula for a z-test is:
z = (x̄ – μ) / (σ / √n)
where:
x̄ = sample mean
μ = hypothesized population mean
σ = population standard deviation
n = sample size
For example, let‘s say a manufacturing company claims that the mean weight of their cereal boxes is 500 grams. Quality control selects a random sample of 50 boxes and finds the sample mean weight to be 508 grams with a known population standard deviation of 10 grams. Is there evidence that the true mean weight is greater than the claimed 500 grams at a 0.05 significance level?
Hypotheses:
H0: μ = 500 grams
H1: μ > 500 grams
z = (508 – 500) / (10/√50) = 5.66
Using a z-table or calculator, the p-value for this one-tailed test is < 0.0001.
Since p < 0.05, we reject the null hypothesis. There is sufficient evidence at α=0.05 to conclude the true mean weight is greater than the claimed 500 grams.
One Sample t-Test
A one sample t-test is used to test a hypothesis about the mean of a population when the population standard deviation is unknown. It is very similar to a z-test, except it uses the sample standard deviation s to estimate the population standard deviation, and the t-distribution instead of the z-distribution.
The formula for a one sample t-test is:
t = (x̄ – μ) / (s / √n)
where:
s = sample standard deviation
The degrees of freedom is df = n-1.
Assumptions:
- Random sample from population
- Normal distribution or n > 30
- Data is continuous
For example, an engineer is designing a new battery and wants to test if the mean battery life is greater than 100 hours. She takes a random sample of 20 batteries and finds a sample mean life of 103 hours with a sample standard deviation of 5 hours.
Hypotheses:
H0: μ = 100 hours
H1: μ > 100 hours
t = (103-100)/(5/√20) = 2.683
The p-value for this one-tailed test with df=19 is 0.0073.
Since p < 0.05, the engineer rejects the null hypothesis and concludes the mean battery life is significantly greater than 100 hours at the α=0.05 level.
Independent Samples t-Test
An independent samples t-test compares the means of two independent groups. It tests the null hypothesis that the population means are equal.
The formula is:
t = (x̄1 – x̄2) / √((s1^2/n1) + (s2^2/n2))
where:
x̄1, x̄2 = sample means of group 1 and 2
s1, s2 = sample standard deviations
n1, n2 = sample sizes
Assumptions:
- Random samples
- Normal distributions or n1, n2 > 30
- Homogeneity of variance
- Data is continuous
For example, a researcher wants to compare the effectiveness of a new sleep aid to a placebo. The sleep aid group (n=30) slept an average of 7.8 hours with an SD of 1.2 hours. The placebo group (n=32) slept an average of 6.5 hours with an SD of 1.4 hours. Is the sleep aid significantly better at α=0.05?
Hypotheses:
H0: μ1 = μ2
H1: μ1 > μ2
t = (7.8-6.5) / √((1.2^2/30) + (1.4^2/32)) = 3.93
The p-value is 0.00013.
With p < 0.05, the null hypothesis is rejected. The mean sleep time is significantly higher in the sleep aid group compared to placebo.
Paired t-Test
A paired t-test is used when there are two measurements on the same sampling unit, such as a pretest/posttest or with matched pairs. It tests the null hypothesis that the mean difference between the paired values is zero.
The formula is:
t = d̄ / (sd / √n)
where:
d̄ = mean of differences between paired values
sd = standard deviation of differences
n = number of pairs
For example, 10 patients had their blood pressure measured before and after taking a new medication. The mean decrease was 10 mmHg with an SD of 8 mmHg. Is there a significant decrease in blood pressure at α=0.05?
Hypotheses:
H0: μd = 0
H1: μd < 0
t = -10/(8/√10) = -3.95
p-value = 0.0016
With p < 0.05, the null hypothesis is rejected. The medication causes a significant decrease in blood pressure.
One-Way ANOVA
Analysis of variance (ANOVA) tests the null hypothesis that the means of three or more populations are equal. It does this by comparing the variance between groups to the variance within groups.
The F-statistic is:
F = MSbetween / MSwithin
where:
MSbetween = variance between group means
MSwithin = average variance within groups
Assumptions:
- Random samples
- Normal distributions
- Homogeneity of variances
- Data is continuous
For example, a botanist wants to test three different fertilizers to see if they result in different mean plant heights. She plants 10 seedlings using each fertilizer and measures the heights after 8 weeks.
Fertilizer A: mean=20cm, SD=2.5
Fertilizer B: mean=22cm, SD=1.8
Fertilizer C: mean=25cm, SD=2.2
Hypotheses:
H0: μ1 = μ2 = μ3
H1: At least one mean is different
The ANOVA results show:
F(2,27) = 11.7, p = 0.0002
With p < 0.05, the null hypothesis is rejected. At least one fertilizer produces a different mean height. Post hoc tests can determine which specific means differ.
Pearson Correlation
The Pearson correlation measures the strength and direction of a linear relationship between two continuous variables. The correlation coefficient r ranges from -1 to +1.
The formula is:
r = Σ[(X- x̄)(Y- ȳ)] / √[Σ(X- x̄)^2 Σ(Y-ȳ)^2]
Assumptions:
- Linearity
- Bivariate normality
- Homoscedasticity
For example, consider the heights and weights of a sample of 100 adults. The correlation coefficient is calculated to be r = 0.65.
To test if the correlation is significantly different from zero:
Hypotheses:
H0: ρ = 0
H1: ρ ≠ 0
With n=100, the test statistic is:
t = r√(n-2) / √(1-r^2) = 8.43
The two-tailed p-value is < 0.0001, so we reject H0 and conclude there is a significant positive linear relationship between height and weight.
Simple Linear Regression
Simple linear regression models the relationship between an explanatory variable X and a continuous response variable Y as a straight line:
Y = β0 + β1X + ε
The test for the significance of regression tests the null hypothesis H0: β1=0 (X is not a significant predictor of Y) vs the alternative H1: β1≠0.
This is equivalent to testing the correlation coefficient:
H0: ρ=0
H1: ρ≠0
The test statistic is:
t = b1 / sb1
where b1 is the sample slope and sb1 is the standard error of the slope.
For example, SAT scores and college GPAs of 500 students are used to fit a regression line:
GPA = 1.2 + 0.002*SAT
The standard error of the slope is 0.0001. To test if SAT is a significant predictor of GPA:
t = 0.002/0.0001 = 20
The p-value is < 0.0001
With p < 0.05, SAT scores are a significant predictor of college GPA.
Conclusion
Parametric tests are powerful tools for hypothesis testing when their assumptions are met. This article covered the most common parametric procedures: z-tests and t-tests for means, ANOVA for comparing multiple means, Pearson correlation for measuring linear relationships, and simple linear regression for quantifying those relationships.
It‘s important to always verify the assumptions before applying these tests. If the assumptions are severely violated, it may be better to use a non-parametric alternative like the Mann-Whitney U, Wilcoxon signed-rank, Kruskal-Wallis, or Spearman correlation test instead.
No matter which test you use, understanding hypothesis tests is a fundamental skill for drawing conclusions from data. Mastering parametric tests will take your data analysis skills to the next level and help you make sound inferences to guide decision-making. Keep practicing with real datasets and soon hypothesis testing will become second nature!