Worked Example 1

The number of days that students were missing from school due to sickness in one year

was recorded.

Number of days off sick | 1 – 5 | 6 – 10 | 11 – 15 | 16 – 20 | 21 – 25 |
---|---|---|---|---|---|

Frequency | 12 | 11 | 10 | 4 | 3 |

(b) Find the median class. (c) Find the modal class.

Solution

(b) Transpose the table and insert the class boundary column into the middle.

Class Interval | Class boundary | Frequency |
---|---|---|

1–5 6–10 11–15 16–20 21–25 |
0.5–5.5 5.5–10.5 10.5–15.5 15.5–20.5 20.5–25.5 |
12 11 10 4 3 |

Total | 40 |

As there are 40 students, we need to consider the mean of the 20th and 21st values.

These both lie in the 6–10 class interval, which is really the 5.5–10.5 class interval, so this interval contains the median.

[You could also estimate the median as follows.

As there are 12 values in the first class interval, the median is found by considering the 8th and 9th values of the second interval.

As there are 11 values in the second interval, the median is estimated as being 8.5/11 of the way along the second interval.

But the length of the second interval is 10.5-5.5=5, so the median is estimated by

from the start of this interval. Therefore the median is estimated as

(c) The modal class is 1–5, as this class contains the most entries.

Also note that when we speak of someone by age, say 8, then the person could be any age from 8 years 0 days up to 8 years 364 days (365 in a leap year!). You will see how this is tackled in the following example.

Worked Example 2

The age of students in a small primary school were recorded in the table below.

Age | 5 – 6 | 7 – 8 | 9 – 10 |
---|---|---|---|

Frequency | 29 | 40 | 38 |

Estimate the median.

Solution:

Transpose the table and insert the class boundary column into the middle.

Class Interval | Class boundary | Frequency |
---|---|---|

5 – 6 7 – 8 9 – 10 |
4.5 – 6.5 6.5 – 8.5 8.5 – 10.5 |
29 40 38 |

Total | 107 |

The median is given by the 54th value, which we have to estimate. There are 29 values in the first interval, so we need to estimate the 25th value in the second interval. As there are 40 values in the second interval, the median is estimated as being

of the way along the second interval. This has width 8.5-6.5=2 years, so the

median is estimated by

from the start of the interval. Therefore the median is estimated as 6.5+1.25=7.75 years

Worked Example 3

The table below gives data on the heights, in cm, of 51 children.

Class Interval | 140≤h<150 |
150≤h<160 |
160≤h<170 |
170≤h<180 |
---|---|---|---|---|

Frequency | 6 | 16 | 21 | 8 |

Find the median class.

Solution:

Transpose the table and insert the class boundary column into the middle.

Class Interval | Class boundary | Frequency |
---|---|---|

140≤h<150
150≤h<160
160≤h<170
170≤h<180 |
140-150 150-160 160-170 170-180 |
6 16 21 8 |

Total | 51 |

The median is the 26th value. In this case it lies in the 160≤*h*<170 class interval. Note that you can estimate the median height.
The 4th value in the interval is needed. It is estimated as

Median

The median is that value of the variable which divides the group in to two equal parts. One part comprises all the values greater than and the other part comprises all the values less than the median.

Calculation of Median

For individual observations

Step 1: Arrange the observations *x*_{1}, *x*_{2}, …, *x _{n}* in ascending or descending order of magnitude.

Step 2: Determine the total number of observations, say,

*n*

Step 3: If

*n*is odd, then median is the value of

½(

*n*+1)th observation. If

*n*is even, then median is the AM of the values of ½

*n*th and (½

*n*+1)th observations.

For discrete frequency distribution.

Step 1: Find the cumulative frequencies (

*‹C*)

Step 2: Find ½

*N*where

*N*=∑

^{n}

_{i=1}

*f*

_{i}Step 3: See the cumulative frequency (

*‹C*) just greater than ½

*N*and determine the corresponding value of the variable, which is the median.

For grouped or continuous frequency distribution.

Step 1: Obtain the frequency distribution.

Step 2: Prepare the cumulative frequency column and obtain *N*=Σ*f _{i}* Find ½

*N*.

Step 3: See the cumulative frequency just greater than ½

*N*and determine the corresponding class.

This class is known as the median class.

Step 4: Use the formula: Median

where,

*ℓ*= lower boundary of the median class,

*f*is frequency of the median class,

*w*= width (size) of the median class,

*‹C*= cumulative frequency of the class preceding the median class,

*N*=Σ

*f*.

_{i}Ex4. Based on the grouped data below, find the median:

Time to travel to work | Frequency |
---|---|

1-10 11-20 21-30 31-40 41-50 |
8 14 12 9 7 |

Solution:

1st Step: Construct the cumulative frequency distribution

Time to travel to work | Frequency | Cumulative Frequency |
---|---|---|

1-10 11-20 21-30 31-40 41-50 |
8 14 12 9 7 |
8 22 34 43 50 |

½*N*=½⋅50=25→ median class is the 3rd class.

So, *‹C*=22, *f*=12, *ℓ*=20.5 and *w*=10

Therefore,

Thus, 25 persons take less than 24 minutes to travel to work and another 25 persons

take more than 24 minutes to travel to work.

Median – Grouped Data

Step 1: Construct the cumulative frequency distribution.

Step 2: Decide the class that contain the median.

Median class is the first class with the value of cumulative

frequency equal at least ½*n*.

Step 3: Find the median by using the following formula:

Where:

*N*= the total frequency

*‹C*= the cumulative frequency before median class

*f*= the frequency of the median class

*w*= the class width

*ℓ*= the lower boundary of the median class

Ex5. Calculate the median for the following distribution:

Class:

5-9 10-14 15-19 20-24 25-29 30-34 35-39 40-44

Frequency:

5 6 15 10 5 4 2 2

Solution:

Class | Freqency | Cumulative frequency |
---|---|---|

5-9 10-14 15-19 20-24 25-29 30-34 35-39 40-44 |
5 6 15 10 5 4 2 2 |
5 11 26 36 41 45 47 49 |

N=49 |

Here *N*=49⇒½*N*=½⋅49=24.5. The cumulative frequency just greater than ½*N* is 26 and the corresponding class is 15-19.

Thus 15-19 is the median class such that *f*=15, *‹C*=11, *w*=5.

Lower boundary of the median class is *ℓ*. *ℓ*=(14+15)÷2=14.5.

∴ Median

Let us read post The Quartile Common Formulae of Continuous or Discrete Distribution (Grouped Data).