Menu Top
Complete Course of Mathematics
Topic 1: Numbers & Numerical Applications Topic 2: Algebra Topic 3: Quantitative Aptitude
Topic 4: Geometry Topic 5: Construction Topic 6: Coordinate Geometry
Topic 7: Mensuration Topic 8: Trigonometry Topic 9: Sets, Relations & Functions
Topic 10: Calculus Topic 11: Mathematical Reasoning Topic 12: Vectors & Three-Dimensional Geometry
Topic 13: Linear Programming Topic 14: Index Numbers & Time-Based Data Topic 15: Financial Mathematics
Topic 16: Statistics & Probability


Content On This Page
Median: Definition and Calculation for Ungrouped Data Median of Grouped Data (Formula and Calculation) Estimation of Median (Graphically)


Measures of Central Tendency: Median




Median: Definition and Calculation for Ungrouped Data


Definition and Properties

The Median is a measure of central tendency that represents the middle value in a dataset that has been arranged in order, either ascending (from smallest to largest) or descending (from largest to smallest). It is a positional average because its value depends on its position in the ordered dataset rather than on the magnitude of every observation.

Key properties of the median:


Calculation for Ungrouped Data

Ungrouped data refers to raw data where observations are listed individually or are presented in an ungrouped frequency distribution (where individual values and their frequencies are given). The method for finding the median depends on whether the total number of observations is odd or even.

Case 1: When Individual Observations are Given

To find the median of a list of individual observations:

  1. Arrange the Data: The first and most crucial step is to arrange the observations in either ascending (smallest to largest) or descending (largest to smallest) order. The result will be the same.
  2. Count Observations: Determine the total number of observations, denoted by $n$.
  3. Locate the Median Position and Value:
    • If $n$ is Odd: There is a single middle observation. The position of the median is given by the formula $\left(\frac{n+1}{2}\right)^{\text{th}}$. The median is the value of the observation found at this position in the ordered list.
    • If $n$ is Even: There are two middle observations. The positions of these two middle observations are $\left(\frac{n}{2}\right)^{\text{th}}$ and $\left(\frac{n}{2} + 1\right)^{\text{th}}$. The median is calculated as the arithmetic mean (average) of the values of these two middle observations.

      Median $= \frac{\text{Value of } \left(\frac{n}{2}\right)^{\text{th}} \text{ obs} + \text{ Value of } \left(\frac{n}{2} + 1\right)^{\text{th}} \text{ obs}}{2}$

      ... (1)


Example

Example 1 (Odd n). Find the median of the scores: 15, 20, 25, 18, 22.

Answer:

Given: Scores: 15, 20, 25, 18, 22.

To Find: The median.

Solution:

  1. Arrange the data in ascending order:

    15, 18, 20, 22, 25

  2. Count the number of observations:

    $n = 5$

    Since $n=5$ is an odd number, there is a single middle value.

  3. Locate the middle position:

    Median position $= \left(\frac{n+1}{2}\right)^{\text{th}} \text{ position}$

    Median position $= \left(\frac{5+1}{2}\right)^{\text{th}} = \left(\frac{6}{2}\right)^{\text{th}} = 3^{\text{rd}} \text{ position}$

    ... (i)

The value at the 3rd position in the ordered list (15, 18, 20, 22, 25) is 20.

The median of the scores is 20.


Example 2 (Even n). Find the median of the scores: 30, 25, 32, 28, 35, 22.

Answer:

Given: Scores: 30, 25, 32, 28, 35, 22.

To Find: The median.

Solution:

  1. Arrange the data in ascending order:

    22, 25, 28, 30, 32, 35

  2. Count the number of observations:

    $n = 6$

    Since $n=6$ is an even number, there are two middle values.

  3. Locate the middle positions:

    The positions of the two middle observations are $\left(\frac{n}{2}\right)^{\text{th}}$ and $\left(\frac{n}{2} + 1\right)^{\text{th}}$.

    Position 1 $= \left(\frac{6}{2}\right)^{\text{th}} = 3^{\text{rd}}$

    ... (i)

    Position 2 $= \left(\frac{6}{2} + 1\right)^{\text{th}} = (3+1)^{\text{th}} = 4^{\text{th}}$

    ... (ii)

The values at the 3rd and 4th positions in the ordered list (22, 25, 28, 30, 32, 35) are 28 and 30.

Calculate the median as the average of these two values:

Median $= \frac{28 + 30}{2}$

Median $= \frac{58}{2}$

Median $= 29$

... (iii)

The median of the scores is 29.


Case 2: When Data is in an Ungrouped Frequency Distribution

If the data is given in an ungrouped frequency distribution table (distinct values with their frequencies), we can find the median by using cumulative frequencies.

  1. Arrange Distinct Values: Ensure the distinct values ($x_i$) are listed in ascending order.
  2. Calculate Cumulative Frequencies: Add a column for cumulative frequency (cf). The cumulative frequency for a value is the sum of its frequency and the frequencies of all preceding values.
  3. Find Total Frequency: Calculate the total number of observations, $N = \sum f_i$.
  4. Locate Median Position: The median position is at $\left(\frac{N+1}{2}\right)^{\text{th}}$ if considering the 'exact' middle observation rank, or more commonly $\frac{N}{2}$ is used to locate the class/value containing the median. Let's use the position $\frac{N}{2}$ for simplicity as it directly corresponds to the cumulative frequency definition.
  5. Identify the Median Value: Find the value in the cumulative frequency column that is just greater than or equal to the median position ($\frac{N}{2}$). The distinct value ($x_i$) corresponding to this cumulative frequency is the median. (Note: If $\frac{N}{2}$ exactly matches a cumulative frequency, the median is the average of the corresponding $x_i$ and the next $x_i$, but for discrete data, the corresponding $x_i$ is often considered the median).

Example

Example 3 (Ungrouped Frequency Distribution). Find the median number of goals scored from the following frequency table:

Goals ($x$)Frequency ($f$)
04
15
26
33
42

Answer:

Given: Ungrouped frequency distribution of goals scored.

To Find: The median.

Solution:

  1. The distinct values (Goals) are already in ascending order (0, 1, 2, 3, 4).
  2. Calculate the cumulative frequencies:
    Goals ($x_i$) Frequency ($f_i$) Cumulative Frequency (cf)
    044
    15$4+5 = 9$
    26$9+6 = 15$
    33$15+3 = 18$
    42$18+2 = 20$
    Total$N=20$
  3. Total frequency $N = 20$.
  4. Locate the median position: $\frac{N}{2} = \frac{20}{2} = 10$.
  5. Identify the median value: We look for the first cumulative frequency that is greater than or equal to 10.
    • cf for $x=0$ is 4 (not $\geq 10$)
    • cf for $x=1$ is 9 (not $\geq 10$)
    • cf for $x=2$ is 15 (which is $\geq 10$)

    The cumulative frequency just greater than or equal to 10 is 15, which corresponds to the value $x=2$.

    Alternatively, using the position $\frac{N+1}{2} = \frac{20+1}{2} = 10.5^{\text{th}}$ observation. The 10th and 11th observations fall into the category where cf becomes 15, which is $x=2$.

The median number of goals scored is 2.



Median of Grouped Data (Formula and Calculation)


Introduction and Median Class

When data is grouped into class intervals, we lose the exact values of individual observations. Therefore, we cannot find the precise median as we do with ungrouped data. Instead, we estimate the median based on the frequency distribution, assuming that observations are evenly distributed within the class interval containing the median. This interval is called the median class.

The median of grouped data is the value that divides the total frequency ($N$) into two equal halves. The median value lies within the median class.


Steps to Calculate the Median of Grouped Data

Follow these steps to calculate the median from a grouped frequency distribution table:

  1. Calculate Cumulative Frequencies:

    Prepare a 'less than' cumulative frequency (cf) column for the frequency distribution. Sum frequencies from the first class downwards. Find the total frequency $N = \sum f_i$.

  2. Identify the Median Class Position:

    Calculate $\frac{N}{2}$. This value represents the position of the median observation in the cumulative frequency distribution.

  3. Locate the Median Class:

    Find the class interval in the frequency distribution whose 'less than' cumulative frequency is just greater than or equal to the value $\frac{N}{2}$. This class interval is the median class. The median of the data lies within this class.

  4. Determine Values for the Formula:

    Once the median class is identified, extract the following values needed for the median formula:

    • $l$: The lower class boundary of the median class. (Use the lower limit if using exclusive intervals; convert inclusive limits to boundaries if necessary).
    • $N$: The total frequency.
    • $cf$: The cumulative frequency of the class immediately preceding the median class.
    • $f$: The frequency of the median class itself.
    • $h$: The class width (size) of the median class. (Assumed to be constant for most problems). $h = \text{Upper Boundary} - \text{Lower Boundary}$.
  5. Apply the Median Formula:

    The median of grouped data is calculated using the formula:

    Median $= l + \left( \frac{\frac{N}{2} - cf}{f} \right) \times h$

    ... (1)

This formula interpolates within the median class, assuming a linear distribution of observations within that class.


Derivation of the Median Formula for Grouped Data

Let the median class be $C_m = [l, u)$, with frequency $f$. Let $cf$ be the cumulative frequency of the class just before $C_m$. The total frequency is $N$. The median is the value $M$ such that $\frac{N}{2}$ observations are less than $M$.

We know that $cf$ observations are less than $l$ (the lower boundary of the median class).

We need $\frac{N}{2}$ observations to be less than the median $M$. The number of observations needed from the median class to reach the median is $\frac{N}{2} - cf$.

Assuming observations are uniformly distributed within the median class $[l, u)$, the frequency $f$ is spread over the class width $h = u - l$.

This means $f$ observations are spread over a width of $h$.

So, 1 observation is spread over a width of $\frac{h}{f}$.

The number of observations needed from the median class is $\left(\frac{N}{2} - cf\right)$. The width covered by these observations within the median class is $\left(\frac{N}{2} - cf\right) \times \frac{h}{f}$.

The median value $M$ is the lower boundary of the median class ($l$) plus this additional width:

Median $(M) = l + \left(\frac{N}{2} - cf\right) \times \frac{h}{f}$

Median $= l + \left( \frac{\frac{N}{2} - cf}{f} \right) \times h$

(Median Formula for Grouped Data)

This formula provides an estimated median value for grouped data.


Example

Example 1. Find the median weight for the following data:

Weight (kg)Frequency (f)
40 - 452
45 - 505
50 - 555
55 - 607
60 - 655
65 - 704
70 - 752
Total30

Answer:

Given: Grouped frequency distribution of student weights.

To Find: The median weight.

Solution:

We follow the steps to calculate the median for grouped data:

Step 1: Calculate Cumulative Frequencies.

We add a column for 'less than' cumulative frequency (cf).

Weight (kg)
(Class Interval)
Frequency ($f_i$) Less Than Cumulative Frequency (cf)
40 - 4522
45 - 505$2+5 = 7$
50 - 555$7+5 = 12$
55 - 607$12+7 = 19$
60 - 655$19+5 = 24$
65 - 704$24+4 = 28$
70 - 752$28+2 = 30$
Total$N=30$

Total frequency $N = 30$.

Step 2: Identify Median Class Position.

$\frac{N}{2} = \frac{30}{2} = 15$

... (i)

The median position is the 15th observation.

Step 3: Locate Median Class.

We look for the class interval whose cumulative frequency is just greater than or equal to 15 in the 'cf' column.

  • For 50-55, cf = 12 (less than 15)
  • For 55-60, cf = 19 (greater than or equal to 15)

Therefore, the class interval 55 - 60 is the median class.

Step 4: Determine Values for the Formula.

From the median class (55 - 60) and the table:

  • Lower class boundary of the median class, $l = 55$.
  • Total frequency, $N = 30$.
  • Cumulative frequency of the class preceding the median class (class 50-55), $cf = 12$.
  • Frequency of the median class (55-60), $f = 7$.
  • Class width of the median class, $h = 60 - 55 = 5$.

Step 5: Apply the Median Formula.

Median $= l + \left( \frac{\frac{N}{2} - cf}{f} \right) \times h$

... (ii)

Substitute the values:

Median $= 55 + \left( \frac{15 - 12}{7} \right) \times 5$

Median $= 55 + \left( \frac{3}{7} \right) \times 5$

Median $= 55 + \frac{15}{7}$

Median $\approx 55 + 2.142857...$

Median $\approx 57.14$ (rounded to two decimal places)

... (iii)

The median weight is approximately 57.14 kg.



Estimation of Median (Graphically from Ogives)

As discussed in the section on graphical representation of cumulative frequency distributions (Ogives), the median for grouped data can be estimated visually from an ogive (or the intersection of two ogives). This method provides a graphical approximation of the median value.

The median is the value on the horizontal axis corresponding to a cumulative frequency of $\frac{N}{2}$.


Method 1: Using the 'Less Than' Ogive

The 'less than' ogive plots upper class boundaries against 'less than' cumulative frequencies. To find the median graphically from this ogive:

  1. Draw the 'Less Than' Ogive: Construct the 'less than' cumulative frequency table and plot the corresponding ogive curve on a graph paper, with upper class boundaries on the x-axis and cumulative frequencies on the y-axis.
  2. Calculate Median Position: Determine the position of the median observation in the cumulative frequency distribution by calculating $\frac{N}{2}$, where $N$ is the total frequency.
  3. Locate Position on Y-axis: Find the value $\frac{N}{2}$ on the vertical axis (the cumulative frequency axis).
  4. Draw Horizontal Line: From the point on the y-axis corresponding to $\frac{N}{2}$, draw a horizontal line segment parallel to the x-axis, extending it towards the right until it intersects the 'Less Than' Ogive curve.
  5. Draw Vertical Line: From the point where the horizontal line intersects the ogive curve, draw a vertical line segment downwards, perpendicular to the horizontal axis.
  6. Read the Median Value: The value on the horizontal axis where this vertical line intersects is the estimated Median of the distribution.
Graphical method to estimate Median from Less Than Ogive

Method 2: Using Both 'Less Than' and 'More Than' Ogives

When both types of ogives are drawn on the same graph, their intersection point provides a direct visual estimate of the median.

  1. Draw Both Ogives: Construct both the 'Less Than' Ogive and the 'More Than' Ogive on the same graph paper, using the same scales for both axes. Ensure the 'less than' ogive starts at the lower boundary of the first class with CF=0 and the 'more than' ogive ends at the upper boundary of the last class with CF=0.
  2. Find Intersection Point: Locate the point where the two ogive curves intersect each other.
  3. Draw Vertical Line: From the point of intersection of the two ogives, draw a vertical line segment downwards, perpendicular to the horizontal axis.
  4. Read the Median Value: The value on the horizontal axis where this vertical line intersects is the estimated Median of the distribution.
Graphical method to estimate Median from intersection of Ogives

When drawn accurately, the y-coordinate of the intersection point of the two ogives will be equal to $\frac{N}{2}$. This method provides a visual cross-check and estimate of the median value.

These graphical methods are useful for quickly estimating the median and visualizing its position within the distribution. However, the formula method for grouped data provides a more precise calculated estimate based on specific assumptions about the data distribution within the median class.


Example

Example 1. Estimate the median weight of the students graphically using the 'Less Than' Ogive, given the total frequency $N=30$. Use the cumulative frequency table from Example 1, Section I2.

Answer:

Given: 'Less Than' cumulative frequency table for student weights, and total frequency $N=30$.

To Estimate: The median weight graphically using the 'Less Than' Ogive.

Solution:

The 'Less Than' cumulative frequency table is:

Weight (kg)
(Less than Upper Boundary)
Cumulative Frequency (cf)
Less than 400
Less than 452
Less than 507
Less than 5512
Less than 6019
Less than 6524
Less than 7028
Less than 7530

The points to plot for the 'Less Than' Ogive are (40, 0), (45, 2), (50, 7), (55, 12), (60, 19), (65, 24), (70, 28), (75, 30).

Steps for Graphical Estimation using 'Less Than' Ogive:

  1. Draw the 'Less Than' Ogive by plotting these points and connecting them with a smooth curve (or line segments).
  2. Calculate the median position:

    $\frac{N}{2} = \frac{30}{2} = 15$

    ... (i)

  3. Locate the value 15 on the vertical axis (Cumulative Frequency).
  4. Draw a horizontal line from the point $15$ on the y-axis to the right, intersecting the 'Less Than' Ogive curve.
  5. From the point of intersection on the ogive, draw a vertical line downwards to the horizontal axis (Weight).
  6. Read the value on the horizontal axis at the intersection point. Based on the graph:

    Finding median weight from Less Than Ogive graph

    Observing the graph, the horizontal line at CF = 15 intersects the ogive within the interval 55-60 kg. The vertical line dropped from this intersection appears to meet the x-axis at approximately 57.1 kg.

The estimated median weight from the graph is approximately 57.1 kg.

Alternative Method (Using Both Ogives - Conceptual):

If we were to also draw the 'More Than' Ogive on the same graph (using points (40, 30), (45, 28), (50, 23), (55, 18), (60, 11), (65, 5), (70, 1), (75, 0) from Example 1, Section I2), the two ogive curves would intersect. The x-coordinate of this intersection point would be the estimated median, and the y-coordinate would be 15 (which is $N/2$). This intersection point visually corresponds to the median weight where half the students are below that weight and half are above it.