Skip to main content
1-Visitor
October 14, 2010
Question

Determine Median of a skewed population

  • October 14, 2010
  • 2 replies
  • 7556 views

How do I calculate a median in MathCad for a large skewed distribution of numbers such as particle sizes.

2 replies

19-Tanzanite
October 14, 2010

Sort the values. If the number of values is odd, pick the middle one. If it's even, take the average of the two middle values.

1-Visitor
October 15, 2010

Have a look at the attached worksheet.

Mike

The attached program works, but I have just learnt that Mathcad has a built "Median" function, therefore as Richard says sort the data and apply the median function.

Message was edited by: Mike Armstrong

12-Amethyst
October 15, 2010

You don't need to sort all the values to find the median, just the half or half + 1 of the data ...

Well, that's if you want to play, probably the compiled mathcad sort is faster than any for loop, isn't?

Cheers. Alvaro.

1-Visitor
October 15, 2010

You don't need to sort all the values to find the median, just the half or half + 1 of the data ...

Of course.

Well, that's if you want to play, probably the compiled mathcad sort is faster than any for loop, isn't?

Yes. After all these years of using Mathcad I never knew it had a "Median" function. What a waste of time producing that program.

Mike