Median from histograms - using proportinality method

Hi guys, there's a question in my practice papers

Time (m) minutes Frequency F.D.

0<20 20 1

20<30 30 3

30<40 45 4.5

40<60 60 3

60<100 48 1.2

I did the sum of f/2 +0.5 to get the median value and worked out that 0 to 40 is 95 ;)

The answer book then says 40-60:6.5/60*20=2.16 - can someone please tell me where all three values came from?

it then says Median is 40+216 = 42.16<--- (final answer, please explain as well)

I'd prefer if it can be explained in the proportionality method as mentioned in the answer book

Also if someone can give me a run down of the area method additionally then I wouldnt mind either :)

Re: Median from histograms - using proportinality method

Hey curiousone.

With regards to the median, you just find the observation that corresponds to half the observations on one side and half on the other (when they are ranked in ascending order).

You have 20+30+45+60+48 or 203 observations which means you want 101 to the left and 101 to th right which means you want the 102nd observation and this in the 40-60 range somewhere. If you have the raw data, you get the actual value but other-wise you leave it at that.

Re: Median from histograms - using proportinality method

Hi chiro, thanks for your help, thats what I did, but out of the two marks I only get one from the mark scheme.

It wants me to do 6.5 / 60 *20 = 2.16

And then add it onto the lower bound of the range it is in (its in the 40-60) range, so I add

40+2.16 = 42.16

How does that work?

Re: Median from histograms - using proportinality method

Hint: Think about the 6.5th observation in the bin.

Re: Median from histograms - using proportinality method

Right I understand where the observation comes from now, 101.5-95 = 6.5

But then why is it 6.5/60x20

Re: Median from histograms - using proportinality method

We have a frequency count of 60 in that bin with the bin-range as 20. So we are trying to in a sense "interpolate" between the starting and ending point of the bin by going 1/3 of the way "into" the bin.

This is just a cheap trick of using a kind of gradient to get an approximation and it works well if the real values in that bin are roughly uniformly distributed.

Re: Median from histograms - using proportinality method

Thanks, its continuously etching into my head :)

How will I remember this interpolate for the exam.

Why do we do 20+30+45 = 95 ? even though the median value is in the next bin

I will understand the next part 101.5-95=6.5 if I understand the reason for subtracting by 95?

I think I understand the 6.5/60*20, is it because the 6.5th frequency is the median class bin? So by dividing by 60 (the frequency of the class) and multiplying by 20 (class width) we get 2.16, so what does the 2.16 mean?

Then Why do I add 40+2.16? What does the 40 represent?

Sorry, I have all of these long questions, must be getting on your nerves but I just can't understand questions till I get

the concept.

Re: Median from histograms - using proportinality method

The reason I added them all up was to find out where the middle value was, and in 203 observations the 102nd one is the middle one. So if you find which bin has the 102nd observation, then you see what bin that's in and this bin starts at observation after 20+30+45 (1st observation of the new bin) and we start our interpolation from here on in.

Re: Median from histograms - using proportinality method

Right I understand that now.

So what do you mean by interpolation? Now the only part I dont understand is what interpolation is, and what does 6.5/60*20 mean in english.

Re: Median from histograms - using proportinality method

Interpolation is just a way of getting a value that is in between two points.

Imagine you have say two points at x = 1 and x = 2 and you want to find a function that goes through those points in some way so that you can get something at say 1.1 or 1.5 that gives an answer that is a "natural extension" of the function where it is only defined at x = 1 and x = 2: you use interpolation to do this.

The most basic kind of interpolation is linear interpolation and basically what this does is that to get the value at say x = 1.2, you have a line connecting the value when x = 1 and x = 2 and you move along that line to get the value at say 1.1 or 1.2.

For example if you have say y = 1 at x = 1 and y = 5 at x = 2 then the line is going to be y - 5 = 4(x - 2) or y = 4x - 3 and if you plug in x = 1.2 you'll get an approximation as if you had a function for x's between 1 and 2.

Linear interpolation is the easiest but you can do other things like fit polynomials and complex curves as well.

Re: Median from histograms - using proportinality method

Right so how do I apply this idea in context to the median of a histogram?

And what does 6.5/60*20 mean?

Re: Median from histograms - using proportinality method

You are going 20/60 or 1/3 of the way into the bin. In the above example interpolating between x = 1 and x = 2, 1.2 means you are going 20% in and similarly 20/60 means you are going 0.33333 or 33.33% in from where that cell starts.

Re: Median from histograms - using proportinality method

Thank you, I understand now