
Now, taking upper-class limits on x-axis and their respective frequencies on y-axis we can draw its ogive as follows:

Now, we have n = 30
n/2 = 30/2 = 15
The cumulative Frequency just greater than n/2 is 16 then the median class is 15 – 20 such that
the lower limit (l) = 15
cumulative frequency of the class preceding 15 – 20 (cf) = 14
the frequency of the median class 15 – 20 = 2,
class size (h) = 5
Using the formula,

So, the median profit is Rs. 17.5