1. ## calculating median

Hi;
How do I calculate the median from the table using interpolation?
I know the median is 16.

Can someone tell me why theres a difference between using interpolation and what my
calculator says, I know the calculator uses midpoints of the data?

2. ## Re: calculating median

Hey anthonye.

In your interpolation based approach, are you using the interpolation and then solving for when you get half way (in terms of finding the limits that give this constraint)?

Remember the median is the middle value and so if you setup an interpolation function, you have to find the corresponding value that is closest to the middle of your curve (in terms of intercepting with an x-value) and compare that against your calculated median. We also assume your interpolation function is non-decreasing.

3. ## Re: calculating median

This is how I'm doing it.

4. ## Re: calculating median

Ok a better look at what I'm doing this is for Q3(upper quartile).

My calculator shows it as 21.5 don't know why?
which is right?

5. ## Re: calculating median

I'm confused been looking at this all day and no further on HELPPPP.

6. ## Re: calculating median

Ok calculated it using a formula rather than interpolation and they both match.
so I guess what I'm entering/or the way i'm entering the data into the calculator is wrong?

Thank you.

7. ## Re: calculating median

Just found out that there is a discrepansy between the way I'm calculating the 5 data items and my calculator.
can someone please tell me how a claculator andles this process.

Thank you.

8. ## Re: calculating median

Originally Posted by anthonye
Just found out that there is a discrepansy between the way I'm calculating the 5 data items and my calculator.
can someone please tell me how a claculator andles this process.

Thank you.
I just want to let you know that you're not being ignored. I, and I suspect everyone else, simply don't have an answer for you. I have no idea how your calculator works.

9. ## Re: calculating median

I'm sorry I haven't responded to you earlier.

Do you have a function that corresponds to your interpolation between all data points?

An interpolation function is a function that goes through all of the points and has additional properties that depend on the function template itself. The simplest function with no extra constraints is a polynomial of degree (n-1) given that you have n points.

There are many kinds of interpolation so I guess my next question is what interpolation template you are using.

10. ## Re: calculating median

The interpolation method is the method shown above in the post "this is how I'm doing it"

11. ## Re: calculating median

For the 16 you have the information in the table where cf = 50 gives a value of 16.

Remember that you are finding the intersection between cf for some value (quartiles are 25,50,75) and intersecting that with whatever value you get in the interpolation. From your posts you are using piecewise linear interpolation (which works OK if the intervals are small and/or the slope magnitude is small).

So you have the following lines:

y1 = (21.5-16)/(85-50)*(x-50) + 16 for when x is in [50,85)

Now solve that when x = 75 (for a given y) and you get quartile 3.

This is what interpolation is all about: you take a set of data points and fit curves through them and use the curve to get the answer for a general (x,y) data point.

You should try getting the interpolation function for all values (hint: you will 5 equations defined by the different cf values).

I can give you more help later on but you need to try and demonstrate understanding rather than relying only on formulae.

12. ## Re: calculating median

Median is the middle most value. Your picture is not showing properly. if your observation no is odd then median is n+1/2, if it is even than median is n/2.