To find median, we prepare less than cumulative frequency table as given below:
`{:("Height(in cm)","Number of Students","Cumulative Frequency(f)"),(" "162," "6," "6),(" "164," "4," "10),(" "166," "5," "15),(" "167," "12," "27),(" "168," "8," "35),(" "170," "3," "38),(" "173," "7," "45),(" "175," "2," "47),(" "177," "2," "49),(" "180," "1," "50):}`
Here N=50, which is even.
`therefore "Median" (N)/(2) "value" (50)/(2)` or 25th observation.
From the column of cumulative frequency, the value of 25th observation is 167.
`therefore` Median = 167 cm.