How to calculate median of grouped data is clearly explained in this video.