Are you wondering what the difference between parametric and nonparametric statistical tests are? Or maybe you are wondering what the nonparametric equivalent of your favorite parametric test is? Well then you are in the right place! In this article we discuss everything you need to know about nonparametric tests.

In the beginning of this article, we discuss what nonparametric tests are and how nonparametric tests work. This is followed up with a discussion of when you should use nonparametric statistical tests in place of standard parametric tests. Finally, we got into more detail on some of the most common parametric statistical tests.

## What are nonparametric tests?

What are nonparametric tests in statistics? Before we talk about what nonparametric tests are, it is useful to first discuss what parametric tests are. Parametric tests are tests that work by making an assumption about the underlying distribution of your data and then estimating the parameters of that distribution. For example, when you are running a parametric test you might assume that your data has a normal distribution then try to estimate the mean and variance of that normal distribution to determine whether the mean is equal to a specified value.

Many of the most common statistical tests and models out there are parametric. Some common examples of parametric tests and models are one sample t-tests, two sample t-tests, ANOVA tests, and linear regression models. All of these parametric tests make the assumption that the underlying data is normally distributed then aim to estimate the mean and variance of that normal distribution. The problem with these parametric tests is that they may be invalid if the underlying data is not actually normally distributed.

Now that we have talked about parametric tests, it will be easy to describe what nonparametric tests are. Nonparametric tests are simply statistical tests that make no assumption about the distribution of the underlying data. Since there are no assumptions made about the distribution of the data, there are also no distribution parameters that need to be estimated to complete the tests. Since nonparametric tests do not require the user to make any assumptions about the underlying distribution of the data, they are also often referred to as distribution free tests.

## How do nonparametric tests work?

So how do nonparametric tests work? Different nonparametric tests work in different ways so it is difficult to make one broad statement about how all nonparametric tests work. That being said, there are a few key themes that appear over and over again as you look at different types of parametric tests. Here are some common themes for nonparametric tests.

**Focus on ranks**. While most parametric statistical tests directly use the values that are observed in the data in order to calculate test statistics, many nonparametric tests do not use the exact values that were observed. Rather, nonparametric tests rank the observations from highest to lowest then compare the distribution of those ranks to the distribution that would be expected under the null hypothesis. As an oversimplified example, imagine you had two samples of data and you wanted to determine whether the average value in one sample was the same as the average sample in another. Say you took all of the data in your two samples and ranked it from highest to lowest. Under the null hypothesis that the average value is the same across the two samples, you would expect the average rank also be approximately the same in the two samples. So if you saw that all of the values with high ranks were in one sample and all the values with low ranks were in the other, you might conclude that the average value is not the same in the two samples. This is the type of thinking that is employed in many nonparametric tests.**Medians and distributions rather than means**. Most parametric tests put a large focus on the means of the distributions of your data. Since nonparametric tests often use ranks rather than exact values, it flows naturally that nonparametric tests rely more heavily on medians than means. This makes intuitive sense because you can still determine what value falls at the median of the sample just by looking at the ranks of all the values. Nonparametric tests that do not focus on the median tend to make broad statements about the distribution of the data as a whole, such as whether the distributions are the same for two samples of data.

## When to use parametric and nonparametric tests

When should you use nonparametric tests in place of parametric tests? In this section we will discuss cases when you should consider using nonparametric tests in place of parametric tests. We will start off by discussing cases were parametric tests perform well then we will move on to discussing cases where nonparametric tests really shine.

### Cases where parametric tests are appropriate

**Normally distributed data**. Most parametric tests for continuous data make the assumption that the underlying data is normally distributed. This means that the distribution of your data looks roughly like a bell curve. If your data appears to be normally distributed then you may want to consider using parametric tests.**Slight non-normality**. Even if your data is slightly skewed or has heavier tails than a normal distribution, it might still make sense to use a standard parametric test. Many common parametric tests such as ANOVA tests and t-tests are considered to be fairly robust to the assumption of normality. This means that these tests still perform relatively well even if the data is slightly non-normal.**Small sample sizes**. Another case where you might want to consider using parametric tests rather than nonparametric tests is if your sample size is very small. Parametric tests generally have more power than nonparametric tests which means that they perform better on samples of data that are relatively small.

### Cases where nonparametric tests are appropriate

**Non-normal data**. What if your data does not look like it is normally distributed? This is one of the main cases where you should consider using nonparametric tests rather than parametric tests. Most nonparametric tests make no assumptions about the exact distribution that the underlying data is generated from so they are great for cases when your data is not normally distributed.**Ordinal data**. Another case where you may want to consider using nonparametric tests is if you are working with ordinal data. Ordinal data is categorical data that has an inherent order or ranking to it. Most parametric tests require your underlying data to be strictly continuous, but many nonparametric tests allow for your data to be ordinal.

## Popular nonparametric tests

Now that we have talked about what parametric tests are and when parametric tests should be used, we will go into a little more detail about some of the most common nonparametric tests.

### Nonparametric one sample t-test equivalent

First we will talk about the nonparametric equivalent to a one sample t-test. As a reminder, a one sample t-test is a test that you might run if you have one sample of data and you want to determine whether the mean of that data is equal to a given value. Rather than estimating the mean of a distribution, the nonparametric equivalent to a one-sample t-test tests whether the median of the distribution is equal to a given value. Here are some details about the nonparametric equivalent of a one sample t-test.

**Name**: One sample Wilcoxon signed rank test**Type of data**: One sample**Purpose**: Test whether the median of the data is equal to a given value.**Assumptions**:- Data is continuous

- Observations are independent
- Distribution of the data is symmetric

### Nonparametric two sample t-test equivalent

Next we will talk about the nonparametric equivalent to a standard two sample t-test. This is the standard parametric test that is used when you have two independent samples of data and you want to determine whether the mean of the data in both samples is the same. The nonparametric equivalent to a two sample t-test more generally tests whether the distribution of the data is the same in both samples.

**Name**: Two sample Wilcoxon rank sum test: Two independent samples of data**Type of data****Purpose**: Determine whether the distributions of the two data samples are the same.**Assumptions**:- Data is continuous or at least ordinal
- Two samples are independent of one another
- Observations within each sample are independent

**Other names or variations**: Mann-Whitney U test

### Nonparametric paired two sample t-test equivalent

Now we will talk about the nonparametric alternative to a paired two sample t-test. As a reminder, a paired two sample t-test is a test that you can use if you have two samples of data that contain matched pairs of observations. This means that for each observation in the first sample, there is a similar observation in the second sample that is paired up with that observation. The parametric version of this test assesses whether the mean is the same in both of the samples. The nonparametric version of the test, on the other hand, assesses whether the distributions are the same.

**Name**: Two sample Wilcoxon signed rank test**Type of data**: Two samples of data with matched pairs**Purpose**: Determine whether the distributions of the two data samples are the same.**Assumptions**:- Data is continuous or at least ordinal
- Each observation in the first sample is paired with a similar observation in the second sample
- The pairs of observations are independent of one another

### Nonparametric one-way ANOVA equivalent

Now we will talk about the nonparametric equivalent to a one-way ANOVA test. As a refresher, a parametric one-way ANOVA is a test you would run if you have three or more samples of data and you wanted to test whether the mean value in each sample of data is the same. The nonparametric version of the test more generally tests whether the distributions of the data in the different samples are the same.

**Name**: Kruskal-Wallis**Types of data**: Three or more independent samples of data.**Purpose**: Determine whether the distributions of the data samples are the same.**Assumptions**:- Data is continuous or at least ordinal
- All samples are independent of one another
- Observations within each sample are independent