DEV Community

Cover image for Statistics: Parametric and Non-Parametric Tests
rosemutai
rosemutai

Posted on

Statistics: Parametric and Non-Parametric Tests

Introduction

One thing for sure is that statistics plays a fundamental role in data analysis. From healthcare, businesses to sciences, statistical methods help us to draw meaningful insights from data and make informed decisions from these insights.
In statistical analysis, we have hypothesis testing which is a statistical method used to determine if there is enough evidence in a sample to prove a specific claim about a population, i.e. you take a sample from a population and test whether the evidence supports or contradicts an assumption about that population.

Hypothesis testing follows a sequence:

  • Define the null hypothesis (H₀), which assumes no effect or relationship and alternative hypothesis (H₁), which assumes there is effect or relationship
  • Choose a significance level(α), threshold, commonly 0.05, for rejecting H₀.
  • Collect sample data and select a suitable statistical test.
  • Calculate a test statistic from the sample.
  • Use the p-value to decide whether to reject H₀.

To calculate a hypothesis test, first we must check the assumptions, i.e. data used must be subject to some distribution, which in most cases, normal distribution.
If the data being used is normally distributed, then parametric tests are used and if not normally distributed, non-parametric tests are used.

Parametric Tests

Parametric Tests are statistical tests that are based on the assumption that the data approximately follows a normal distribution.
These tests rely on parameters such as the mean and standard deviation.

Assumptions of Parametric Tests

  • Data is normally distributed
  • Variances are equal across groups
  • Observations are independent
  • Data is measured on an interval.

Common Parametric Tests

1. t-Test

  • This one measures the difference between the means of two samples.
  • To calculate t-test, you require the difference between the mean values from each data set, the standard deviation of each group and the number of data values.

2. ANOVA (Analysis of Variance)

  • ANOVA compares means across several groups to determine if observed differences are due to random chance or reflect genuine and meaningful differences.

3. Linear Regression

  • Predicts an outcome based on one or more independent variables.

4. Pearson Correlation

  • Measures the linear relationship between two continuous variables.

Advantages of Parametric Tests

  • They have a higher statistical power, i.e., more likely to detect true effects.
  • They provide more precise estimates.
  • They are efficient for large datasets.

Limitations

  • They are sensitive to outliers
  • Results can be misleading if assumptions are violated.

Non-Parametric Tests

Non-Parametric Tests are statistical tests that do not assume anything about the distribution of the data.
They are often referred to as distribution-free tests.

When to use Non-Parametric Tests

  • When data is not normally distributed.
  • When the sample size is small.
  • In ordinal or ranked data.
  • When there is presence of significant outliers.

Common Non-Parametric Tests

1. Mann–Whitney U Test

  • This tests whether there is a difference between two groups or samples.
  • To determine whether there is a difference between two samples, the rank sums of the two samples are used rather than the means.

2. Wilcoxon Signed-Rank Test

  • This is a non-parametric test used to determine whether two dependent samples differ significantly from each other. Instead of comparing means, the Wilcoxon test is based on the ranks of the paired differences.

3. Kruskal–Wallis Test

  • This is a non-parametric statistical test used to compare three or more independent groups when data is not normally distributed.

4. Spearman Rank Correlation

  • Spearman’s Rank Correlation is a statistical measure used to find the strength and direction of association between two ranked variables. It checks how well the relationship between two variables can be described using a monotonic function.

5. Chi-Square Test
This analyzes categorical data to determine if the observed frequency distribution significantly differs from what was theoretically expected.

  • It requires random and independent observations with sufficiently large sample sizes.

Advantages of Non-Parametric Tests

  • They require fewer assumptions.
  • They are robust to outliers
  • They work well with ordinal data

Limitations

  • They have lower statistical power compared to the parametric tests.
  • There may be lose of information when data is converted to ranks.

Conclusion

Parametric and non-parametric tests are essential tools in statistical analysis. While parametric tests offer greater power and precision, they require strict assumptions. Non-parametric tests provide flexibility and robustness when those assumptions are not met.

Top comments (0)