## Introduction

When it comes to analyzing data, one important measure that is commonly used is the median. But what exactly is the median in math and how is it calculated? In this article, we will delve into the concept of the median, its importance, and how it differs from other measures of central tendency.

## Definition of Median

The median is the middle value of a data set when it is ordered from least to greatest. It is the value that separates the higher half of the data from the lower half. Unlike the mean, which is the average of all the values, the median is not affected by outliers or extreme values in the data.

## Calculating the Median

To calculate the median, first, arrange the data in order from least to greatest. If the data set has an odd number of values, the median is simply the middle value. If the data set has an even number of values, the median is the average of the two middle values.

## Importance of the Median

The median is a valuable measure of central tendency because it gives a representative value of the data set that is not influenced by outliers. This makes it a better measure of the center of a skewed data set compared to the mean. For example, in income distribution data, the median income gives a more accurate representation of the typical income of a population.

## Examples

- Example 1: Consider the data set {2, 4, 6, 8, 10}. The median is 6, as it is the middle value.
- Example 2: In the data set {3, 6, 9, 12}, the median is the average of 6 and 9, which is 7.5.

## Case Studies

Researchers studying housing prices in a city found that the median price of homes gives a better indication of the typical cost of housing compared to the mean price. This is because a few luxury homes with extremely high prices can skew the mean price, making it less representative of the overall market.

## Statistics

In a survey of 100 students, the median number of hours spent studying per week was found to be 8 hours. This means that half of the students studied more than 8 hours per week and half studied less.