Finding Median

M

Mark

I have a query that has 3 fields. The first is [Job Description], the second
is [Min] which calculates the minimum salary of each Job Description, and the
second is [Max] which calculates the maximum salary of each Job Description.

How can I get a calcuated field in this query to calculate the Median of
[Min] and [Max] ?

If [Min] is 60 and [Max] is 70, I need the result for the median which
should be 65.

Help !!!!!
 
L

Lars Brownie

Mark,
The median is the middle of a distribution: half the scores are above the
median and half are below the median.
So in a ditribution of 1 1 7 8 8, the median is 7. When it's an even number
of scores you take the average of the 2 scores in the middle.
In this example the calculation you describe (average of lowest and highest
value) would result in 4,5 ((1+8)/2) in stead of 7.

To put your calculation in a calculated field would be something like:
=[max]+[min]/2

To calculate the real median would require a different approach. See:
http://www.fabalou.com/Access/Modules/recordset_median.asp

Lars
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top