DEV Community

Benard Otieno
Benard Otieno

Posted on

Parametric vs Non-parametric tests

Introduction
Statistical test is one of the first road maps when decieding whether to use parametric or non-parametric tests. The choice affects how valid your results are, that is the power of your test and the confidence you place in your conclusions. Choosing whether to use a parametric or a no-parametric test has a great impact on your prediction either negatively or positively.

Parametric Test
Parametric test assumes that a polpulation data follows a specific probability distribution, commonly known as normal distribution. This distribution can be described by a set of parameters namely; mean and variance. Since the distribution of parametric tests is assumed to be known, the test tends to be be statistically powerful and can extract more information from the data.

Core Assumptions of Parametric Tests

  1. Normality: The data is normally distributed or approximately normally distributed.
  2. Homogeneity of variance: Groups that are bieng compared have similar or approximately similar variance.
  3. Interval or ratio scale data: Meanignful spacing of data.
  4. Independence of observations: One data point does not have an influence on the others.

Types of Parametric tests

  1. One sample t-test
    Used to compare one sample mean to a known value. For instance, the standard weight of bred is 400grams, if we have 10 loaves of bread, we add their weights and get the mean of the 10 loaves of bread and compare it with the standard 400grams.

  2. Independant t-test
    Compares the mean of two independant groups. The independant variable is always a categorical variable while the dependant variable is a continous variable. For instance a drug test on two sets of five people, the first five people are given 300mg of panadol while the second group is given 500mg of panadol at the same time to see the of both groups after the test.

3.Paired t-test
Compares the mean of two related samples. For instance a drug test on five people, for the first they are given 300mg of panadol while for the second test they are given 500mg of panadol at a different time to see the results before and after. The independant variable is always a categorical variable while the dependant variable is a continous variable.

4.One-way ANOVA
Compare means of more than two groups, Compare average satisfaction scores across three product tiers. Similarly, the independant variable is always a categorical variable while the dependant variable is a continous variable.

5.Pearson correlation
Measure linear relationship between two continuous variables. Used for numerical variables.

6.Linear regression
Model a continuous outcome using predictors

Non-parametric test
Non-parametric test has little to no assumption about the distribution. Many non-parametric tests convert data into ranks instead of directly working with raw data. This makes them resistant to skewed distribution, non-normal distributions and outliers. Non-parametric tests are suitable when:

  • You have an ordinal data instead of continous.
  • Your data has extreme outliers or heavily skewed.
  • You have a categorical data and you're testing for association instead of means.
  • The sample size of your data is small, making it difficult to validate normality.

Types Non-Parametric Tests

  1. Mann-Whitney U test This is the alternative for Independant t-test that does not qualify the parametric tests assumptions.

  1. Wilcoxon signed-rank test This is the alternative for paired t-test that does not meet the parametric tests assumptions.

  1. Kruskal-Wallis test This is the alternative for One-way ANOVA that does not meet the parametric tests assumptions.

  1. Spearman's rank correlation This is the alternative for Pearson correlation that does not meet the parametric tests assumptions.

  1. Chi-square test of independence This is a non-parametric test used to check for relationship between categorical variables.

The Table below shows side by side comparison of parametric and non-parametric tests.

Conclusion
Choosing between parametric and non-parametric tests does not really matter whether you chose the correct on or not, It solely relies on the nature of data. When assumption are held, parametric tests offer more power in terms of statistical analysis. However, they can produce results that are misleading when applied to data that is ordinal, small and has a skewed distribution. Therefore non-parametric tests offer alternatives when data does not meet the assumptions. In conclusion, before running any tests, ensure to check the assumptions in-order to produce correct results.

Top comments (0)