Results are out! Find what you need...fast. Get quick advice or join the chat
x

Unlock these great extras with your FREE membership

  • One-on-one advice about results day and Clearing
  • Free access to our personal statement wizard
  • Customise TSR to suit how you want to use it

Statistics 1 Histograms! (Estimate median)

Announcements Posted on
Rate your uni — help us build a league table based on real student views 19-08-2015
  1. Offline

    ReputationRep:
    Hey as the title says I was wondering how would I calculate the estimate median for a histogram?
    Can I use the formula (n+1)/2 and then look at the frequency?
    If I can but then what do i put as the median would i put for example 25-30 due to it being continuous data.
    Thanks
  2. Offline

    ReputationRep:
    Find the total number of samples (eg 60).

    Then halve that number (30) and then look for the bar which contains teh 30th highest value.

    For example:
    0<x<5 - 10
    5<x<10 - 15
    10<x<15 - 22
    15<x<20 - 13

    the cumulative total from 0<x<10 is 25. But our value is the 30th value. This lies in 10<x<15, hence the answer is the interpolated value of this.

    At x=10, y=25
    At x=15, y=47

    So we need to find the value of x when y=30.

    This can be done by similar triangles, or by finding the equation of the line [y-y1=m(x-x1)] and substituting the value of y=30.
  3. Offline

    ReputationRep:
    (Original post by TheTallOne)
    Find the total number of samples (eg 60).

    Then halve that number (30) and then look for the bar which contains teh 30th highest value.

    For example:
    0<x<5 - 10
    5<x<10 - 15
    10<x<15 - 22
    15<x<20 - 13

    the cumulative total from 0<x<10 is 25. But our value is the 30th value. This lies in 10<x<15, hence the answer is the interpolated value of this.

    At x=10, y=25
    At x=15, y=47

    So we need to find the value of x when y=30.

    This can be done by similar triangles, or by finding the equation of the line [y-y1=m(x-x1)] and substituting the value of y=30.

    Sorry I don't get the part in bold I dont understand how you worked out y given that the original values are unknown. Could you explain please?
  4. Offline

    ReputationRep:
    (Original post by JBKProductions)
    [/B]
    Sorry I don't get the part in bold I dont understand how you worked out y given that the original values are unknown. Could you explain please?
    Ok, assume we had the data above.
    0<x<5 - 10
    5<x<10 - 15
    10<x<15 - 22
    15<x<20 - 13

    The total number of samples is 60. Thus the median value is at 30.

    If you take the cumulative frequencies:
    0<x<5 = 10
    0<x<10 = 25
    0<x<15=47
    0<x<20 = 60

    Since the median is 30, it must lie between 25 and 47.

    Let x be the measured value (height, etc) and y be the cumulative frequency.

    Look at this diagram of cumulative frequency.



    As you can see, at the value of x=10, the CF is 25. and at the value of x=15, CF is 47.

    Between the value of 25 and 47 is the median, 30. You see the black line drawn from the value of 30 (going horizontal). This meets the diagonal line drawn from the lowest value (x=10 y=25) to the highest value (x=15 y=47). You are interpolating this part of the bar as if it is a straight line between x=10 and x=15.

    So you can find an equation of this diagonal line.

    y-y_1 = m(x-x_1)
    y-25=m(x-10)

    And find m:
    m = \frac{change in y}{change in x} = \frac{47-25}{15-10} = \frac{22}{5}

    So,
    y-25=\frac{22}{5}(x-10)


    Then sub in the value y=30 and find x. (Obviously x is somewhere between 10 and 15)
    Spoiler:
    Show

    x=11.13
  5. Offline

    ReputationRep:
    (Original post by TheTallOne)
    Ok, assume we had the data above.
    0<x<5 - 10
    5<x<10 - 15
    10<x<15 - 22
    15<x<20 - 13

    The total number of samples is 60. Thus the median value is at 30.

    If you take the cumulative frequencies:
    0<x<5 = 10
    0<x<10 = 25
    0<x<15=47
    0<x<20 = 60

    Since the median is 30, it must lie between 25 and 47.

    Let x be the measured value (height, etc) and y be the cumulative frequency.

    Look at this diagram of cumulative frequency.



    As you can see, at the value of x=10, the CF is 25. and at the value of x=15, CF is 47.

    Between the value of 25 and 47 is the median, 30. You see the black line drawn from the value of 30 (going horizontal). This meets the diagonal line drawn from the lowest value (x=10 y=25) to the highest value (x=15 y=47). You are interpolating this part of the bar as if it is a straight line between x=10 and x=15.

    So you can find an equation of this diagonal line.

    y-y_1 = m(x-x_1)
    y-25=m(x-10)

    And find m:
    m = \frac{change in y}{change in x} = \frac{47-25}{15-10} = \frac{22}{5}

    So,
    y-25=\frac{22}{5}(x-10)


    Then sub in the value y=30 and find x. (Obviously x is somewhere between 10 and 15)
    Spoiler:
    Show

    x=11.13
    oh ok thanks
  6. Offline

    ReputationRep:
    (Original post by JBKProductions)
    oh ok thanks
    No problem.
  7. Offline

    ReputationRep:
    Hi, The example quoted on the forum is of a standard distribution shape for the histogrm. How do you go about finding the median for something that is not quite so 'standard distribution' in shape or am I perceiving it wrong?

Reply

Submit reply

Register

Thanks for posting! You just need to create an account in order to submit the post
  1. this can't be left blank
    that username has been taken, please choose another Forgotten your password?
  2. this can't be left blank
    this email is already registered. Forgotten your password?
  3. this can't be left blank

    6 characters or longer with both numbers and letters is safer

  4. this can't be left empty
    your full birthday is required
  1. By joining you agree to our Ts and Cs, privacy policy and site rules

  2. Slide to join now Processing…

Updated: October 29, 2008
TSR Support Team

We have a brilliant team of more than 60 Support Team members looking after discussions on The Student Room, helping to make it a fun, safe and useful place to hang out.

New on TSR

Rate your uni

Help build a new league table

Poll
How soon after finishing your degree did you get a job offer
Study resources
Quick reply
Reputation gems: You get these gems as you gain rep from other members for making good contributions and giving helpful advice.