Solution:

Here,

Preparing a cumulative frequency table to calculate median from the given data, we get

Class (X) | Frequency (f) | Cumulative frequency (cf) |

40-50 | 7 | 7 |

50-60 | 8 | 7+8=15 |

60-70 | 6 | 15+8=21 |

70-80 | 5 | 21+5=26 |

80-90 | 4 | 26+4=30 |

N=30 |

Using formula,

Median (M_{d}) = The value of (N/2)^{th} item

= (30/2)^{th} item

= 15^{th} item

here,

The corresponding class of cf 15 is 50-60

∴ Median class = 50-60

Again, by formula

Actual median (M_{d}) = \(L+\frac{\left(\frac{N}{2}-cf\right)}{f}\cdot i\)

Where,

L = 50,

N/2 = 15

cf = 7

f = 8

i = 10

So, Actual median (M_{d})

= \(50+\frac{\left(15-7\right)}{8}\cdot10\)

= 60

∴ Median of the given data is 60.