This is for grouped data.
Median: where 50% of the data is...which is between 40-45 and 45-50
To find exact value of median use:
Median = BI + [n/2 - F / fQ2] * a
BI: inferior limit of the class that contains Q1
n: Sample size which is 50 here
F: The sum of the absolute frequences of the preceding classes that contains Q2
F
Q1: Absolute frequence of the class that contain Q
2
a: amplitude of the class.
Find the class with the most absolute frequence (in this case its 50-55), the mode is the value of the centre of that class so the answer would be 50+55/2 = 52.5
This is what my book says for median and mode of grouped data.