Research proposal writer

The Use of Median in Data Analysis

The median is one of the most important measures of central tendency used in data analysis. It represents the middle value of a dataset when observations are arranged in ascending or descending order.

Together with the mean and mode, the median helps researchers summarize large datasets using a single representative value. However, the median has an important advantage over the mean: it is generally less affected by extremely high or extremely low observations, commonly referred to as outliers.

The median is widely used in academic research, economics, business, public health, agriculture, education, development studies, and social sciences.

What Is the Median?

The median is the value that divides an ordered dataset into two equal parts.

In other words, approximately half of the observations are at or below the median and approximately half are at or above it.

For example, consider the following five observations:

10, 20, 30, 40, 50

The middle value is 30.

Therefore:

Median = 30

There are two observations below 30 and two observations above 30.

How Is the Median Calculated?

The method used to calculate the median depends on whether the dataset contains an odd or even number of observations.

Dataset With an Odd Number of Observations

Consider:

12, 15, 18, 21, 25

There are five observations.

The middle observation is:

18

Therefore:

Median = 18

Dataset With an Even Number of Observations

Consider:

10, 20, 30, 40

There are four observations, so there is no single middle observation.

The two middle values are:

20 and 30

The median is their average:

Median = (20 + 30) / 2 = 25

Therefore:

Median = 25

Why Is the Median Important?

The median is particularly useful when data are skewed or contain extreme observations.

Consider the following monthly incomes:

UGX 500,000; UGX 600,000; UGX 700,000; UGX 800,000; UGX 10,000,000

The very high income of UGX 10 million can substantially increase the mean.

The median, however, is:

UGX 700,000

This may provide a better description of the central position of the observations than the mean in a highly skewed dataset.

Therefore, median income is frequently useful when analysing income, wealth, expenditure, property prices, salaries, and other variables where extreme values may occur.

Median Versus Mean

The mean and median are both measures of central tendency, but they behave differently.

MeasureMeaningEffect of Outliers
MeanArithmetic averageStrongly affected
MedianMiddle valueLess affected
ModeMost frequently occurring valueGenerally unaffected

For relatively symmetric data without extreme observations, the mean can be an appropriate summary.

For highly skewed data, the median may provide a more representative measure of the typical observation.

Median and Skewed Data

The median is particularly valuable when the distribution is not symmetrical.

For example, income data may look like:

UGX 300,000, 350,000, 400,000, 450,000, 500,000, 700,000, 5,000,000

Most observations are relatively low, but one observation is extremely high.

The distribution is therefore positively skewed.

In such circumstances, the mean can be pulled upward by the extreme observation, whereas the median remains relatively stable.

This is one reason why researchers frequently report median income rather than relying exclusively on mean income.

Median and the Interquartile Range

The median is closely associated with the interquartile range (IQR).

The IQR measures the spread of the middle 50% of observations.

It is calculated as:

IQR = Q3 − Q1

Where:

  • Q1 = first quartile, or 25th percentile
  • Q3 = third quartile, or 75th percentile

A useful summary for skewed data is therefore:

Median (IQR)

For example:

The median household expenditure was UGX 850,000 (IQR: UGX 600,000–1,200,000).

This provides information about both the central location and the spread of the middle half of the observations.

Median in Descriptive Statistics

The median is an important component of descriptive analysis.

A researcher studying household income could report:

StatisticValue
Mean incomeUGX 1,850,000
Median incomeUGX 1,000,000
MinimumUGX 300,000
MaximumUGX 15,000,000
Q1UGX 650,000
Q3UGX 1,500,000

The large difference between the mean and median suggests that the income distribution may be positively skewed.

The researcher could therefore examine the distribution further using graphs or other descriptive statistics.

Median in Academic Research

The median is widely used in Master’s and PhD research.

For example, a public-health researcher may investigate patient waiting times.

Suppose the waiting times are:

10, 12, 15, 18, 20, 25, 90 minutes

The median is 18 minutes.

The mean is substantially influenced by the 90-minute observation.

If the researcher wants to describe the typical waiting time in a skewed distribution, the median may therefore be more informative.

Use of Median in Economics

Median is commonly used in economic analysis.

Examples include:

  • Median household income
  • Median wages
  • Median expenditure
  • Median wealth
  • Median property prices
  • Median business revenue

Median income can be particularly useful because income distributions often contain substantial differences between lower- and higher-income households.

Use of Median in Business Analysis

Businesses can use median values to understand customer and operational behaviour.

Examples include:

  • Median customer spending
  • Median delivery time
  • Median transaction value
  • Median employee salary
  • Median monthly sales
  • Median customer waiting time

For example, a company may find that the median customer spends UGX 50,000 per transaction while a small number of customers spend several million shillings. The median can help describe the typical customer without being strongly influenced by those unusually large purchases.

Use of Median in Public Health

The median is frequently used in health and medical research.

Examples include:

  • Median patient age
  • Median hospital stay
  • Median waiting time
  • Median treatment duration
  • Median household distance to a health facility

For variables with skewed distributions, researchers may report the median and IQR rather than the mean and standard deviation.

Use of Median in Agriculture

Agricultural researchers can use median values to describe:

  • Farm size
  • Farm income
  • Production costs
  • Crop yields
  • Distance to markets
  • Distance to agricultural extension services

For example, if a few commercial farms are exceptionally large, the median farm size may better represent the typical farm than the mean.

Median for Ordinal Data

The median can also be useful for ordinal variables, where categories have a meaningful order.

For example:

  1. Very poor
  2. Poor
  3. Fair
  4. Good
  5. Very good

Because these categories have an order, the median can sometimes be used to describe the central position of the responses.

However, researchers should be careful about treating ordinal categories as though the numerical distance between categories is necessarily equal.

Median in SPSS

SPSS can calculate the median through several procedures, including descriptive-statistics and exploratory-analysis functions.

A researcher can obtain statistics such as:

  • Mean
  • Median
  • Mode
  • Standard deviation
  • Minimum
  • Maximum
  • Quartiles

The median can then be presented in a descriptive-statistics table.

For example:

VariableMeanMedianSD
Age36.8358.4
Income1,850,0001,200,0001,450,000
Expenditure950,000800,000520,000

The difference between the mean and median can provide an initial indication that some variables may be skewed.

Median in Stata

Stata provides several commands and procedures for calculating medians and percentiles.

Researchers can use Stata to calculate:

  • Median
  • Quartiles
  • Percentiles
  • Interquartile range
  • Summary statistics

Stata can also be used to examine the distribution of variables using graphs and other statistical techniques.

Median in R

R provides several functions for calculating the median.

The commonly used function is:

median()

R can also calculate quartiles, percentiles, IQR, means, standard deviations, and other descriptive statistics.

This makes R useful for researchers who want to combine descriptive analysis with statistical modelling and visualization.

Median in Python

Python can also be used to calculate median values.

Researchers can use:

  • pandas
  • NumPy
  • SciPy

to calculate median and other descriptive statistics.

Python is especially useful when median calculations form part of a larger data-cleaning, analysis, visualization, or machine-learning workflow.

Median and Boxplots

The median is a central component of a boxplot.

A typical boxplot displays:

  • Minimum or lower whisker
  • First quartile (Q1)
  • Median
  • Third quartile (Q3)
  • Maximum or upper whisker

Potential outliers may also be displayed separately.

Boxplots are therefore useful for visually comparing the median and spread of different groups.

For example, a researcher could compare the distribution of household income between:

  • Rural households
  • Urban households

The median line inside each box provides a quick comparison of the central position of the two groups.

Median and Outliers

One of the major advantages of the median is its relative resistance to extreme observations.

Consider:

5, 6, 7, 8, 9

The median is:

7

Now replace the last value with 900:

5, 6, 7, 8, 900

The median remains:

7

However, the mean changes dramatically.

This property makes the median particularly useful for datasets containing extreme observations.

When Should Researchers Use the Median?

Researchers should consider using the median when:

  • Data are highly skewed.
  • There are substantial outliers.
  • The mean does not adequately represent the typical observation.
  • The variable is ordinal and has a meaningful order.
  • Income or expenditure distributions are being analysed.
  • Waiting times or durations are highly skewed.
  • The research involves survival or time-to-event data.
  • A robust measure of central tendency is required.

Median Versus Mode

The mode is the most frequently occurring value, while the median is the middle value.

For example:

2, 3, 3, 4, 5, 6, 7

Median = 4

Mode = 3

The two statistics provide different information.

The mode is particularly useful for categorical variables, whereas the median is generally more useful for ordered numerical observations.

Common Mistakes When Using the Median

1. Failing to Sort the Data

The median must be identified after arranging observations in ascending or descending order.

2. Confusing Median With Mean

The median is not the arithmetic average. It is the middle position of an ordered dataset.

3. Ignoring the Distribution

Researchers should consider whether the data are symmetric, skewed, or contain extreme observations.

4. Reporting Only the Median for Every Variable

The median is not automatically the best summary for every dataset. The appropriate measure depends on the type and distribution of the variable.

5. Ignoring the Spread of the Data

For skewed data, researchers should often report the median together with the interquartile range.

How to Report Median in a Dissertation

Researchers can report median results in a descriptive-statistics section.

For example:

The median monthly household expenditure was UGX 800,000, with an interquartile range of UGX 550,000–1,200,000.

Another example is:

The median patient waiting time was 35 minutes (IQR: 20–60 minutes), indicating substantial variation in waiting times among patients.

The choice of summary statistics should reflect the characteristics of the data and the research question.

Conclusion

The median is an important measure of central tendency that helps researchers identify the middle position of an ordered dataset. Its relative resistance to extreme values makes it particularly useful for skewed distributions and datasets containing outliers.

The median is widely applicable to economics, business, agriculture, public health, education, social sciences, and development research. It is especially useful for variables such as income, expenditure, waiting time, farm size, property prices, and other measures that may not follow a symmetric distribution.

Researchers should not view the median as a replacement for the mean in every situation. Instead, the choice between mean, median, and other descriptive measures should be based on the type of data, distribution, research objectives, and analytical approach.

Professional Research Data Analysis Services

Research data-analysis services can assist Master’s and PhD students, NGOs, organizations, and community-based organizations with data cleaning, descriptive statistics, median and percentile analysis, interquartile range analysis, correlation, regression, hypothesis testing, statistical modelling, and interpretation of research findings using SPSS, Stata, R, and Python.

Leave a Reply

Your email address will not be published. Required fields are marked *

RSS
Follow by Email
YouTube
Pinterest
LinkedIn
Share
Instagram
WhatsApp
FbMessenger
Tiktok