SPSS tutorials website header logo SPSS TUTORIALS BASICS ANOVA REGRESSION FACTOR CORRELATION

Median – Simple Tutorial & Examples

The median is the middle value after sorting all values for an odd number of values. For an even number of values, it's the average of the 2 middle values after sorting all values. The examples below from this Googlesheet (read only) will make this perfectly clear.

Median - Simple Data Examples

Median Examples Googlesheets

Note that for V2 through V4, the median is the value that separates
the 50% highest values from the 50% lowest values.
This turns out to hold for most (semi)continuous variables that we find in real-world data such as

However, it may not hold at all for heavily tied data (such as V5) or small numbers of observations.

Relation Median and Mean

We'll discuss the pros and cons of medians versus means in a minute. Let's first see how they relate in the first place. This depends mostly on the skewness of the frequency distribution of some variable: the median is equal to the mean
for symmetrically distributed variables
which implies skewness = 0. The histogram shown below illustrates this point.

Median Versus Mean Symmetrical Distribution

Skewness is basically zero for these 1,000 test scores. The sample mean (M) = 50.8 while the median (Me) = 51.0. The red lines indicating them on the x-axis are indistinguishable.
Different patterns occur when skewness is substantial. First off, the median is smaller than the mean
for positively skewed variables
as shown below.

Median Versus Mean Right Skewed Distribution

What basically happens here is that some very high scores affect the mean but not the median. We already saw this in our initial examples: changing {1,2,3,4,5,6} to {1,2,3,4,5,100} greatly affects the mean but the median is 3.5 for both variables. The histogram above shows the exact same phenomenon but it uses more realistic data.
As you can probably guess by now, the opposite also holds: the median is larger than the mean
for negatively skewed variables
as illustrated by the histogram below.

Median Versus Mean Left Skewed Distribution

What basically happens here is that the very low scores “drag down” the mean. The median, however, is unaffected by these.

Median - Strengths & Weaknesses

Thus far, this introduction implicitly pointed out some strengths of the median compared to the mean:

Different Distributions having Similar Medians for Ordinal Variables

Although teacher B is rated much more favorably than teacher A, their median ratings are identical.

Apart from these strengths, medians have some weaknesses too:

Finding Medians in Googlesheets

Finding medians is super easy with Googlesheets. For example, typing =MEDIAN(B2:B7) into any cell results in the median of cells B2 through B7 (assuming all non empty cells contain numbers). Some more examples are shown in this Googlesheet (read only).

Finding Medians in SPSS

In SPSS, the best option to find medians is from Analyze SPSS Menu Arrow Compare Means SPSS Menu Arrow Means Use this dialog to create a table showing a wide variety of descriptive statistics including the mean, standard deviation, skewness, kurtosis and more. Optionally, these are reported for separate groups defined by “Independent List”.

Median In SPSS Via Means Dialog

An even faster option is typing and running the resulting syntax -a simple MEANS command- such as means v1 to v5
/cells count mean median.
An example of the resulting table -after some adjustments- is shown below.

Median SPSS Output Table

Notice the huge positive correlation between skewness and (mean - median): the median is larger than the mean insofar as a variable is more negatively (left) skewed. The opposite pattern -mean larger than median- occurs for positively (right) skewed variables. This was previously illustrated with some histograms based on the same data file as this table.

Statistical Significance for Medians - Sign Tests

Among the most popular statistical techniques are t-tests. These test if the difference between 2 means is statistically significant. But what if we want to test for medians instead of means? In this case we'll end up with one of 3 median tests, sometimes called sign tests:

A sign test for 1 median basically works like this:

Sign Test for 1 Median - How Does it Work?

The other sign tests follow the same basic reasoning. Sign tests are not very popular because ties are problematic for them and they tend to have low statistical power.

Thanks for reading!

Tell us what you think!

*Required field. Your comment will show up after approval from a moderator.

THIS TUTORIAL HAS 14 COMMENTS: