Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Re: Finding the median

Re: Finding the median

From: Jonathan Lewis <jonathan_at_jlcomp.demon.co.uk>
Date: Sat, 2 Dec 2000 09:11:40 -0000
Message-ID: <975748133.25155.0.nnrp-07.9e984b29@news.demon.co.uk>

In fact, I suggested percentiles because of the spurious impression of accuracy - it is easier and more efficient to consider 'bi-'tiling the data using ntile(2).

--
Jonathan Lewis
Yet another Oracle-related web site:  http://www.jlcomp.demon.co.uk

Practical Oracle 8i:  Building Efficient Databases

Publishers:  Addison-Wesley
Book bound date: 8th Dec 2000
See a first review at:
http://www.ixora.com.au/resources/index.htm#practical_8i
More reviews at: http://www.jlcomp.demon.co.uk/book_rev.html



Jonathan Lewis wrote in message
<975744165.27815.0.nnrp-04.9e984b29_at_news.demon.co.uk>...

>
>I know what the median is - perhaps we
>differ on our interpretation of percentiles.
>
>Sort the data in order, then split it into
>100 buckets so that each buck contains
>exactly the same number of items.
>
>Bucket 1 contains the 1% of the population
>with the lowest score etc. By the time you
>get to bucket 50 you have half the population
>behind you - so the top value of bucket 50,
>the bottom value in bucket 51, or the average
>of the two MUST be the median value.
>
>
>--
>Jonathan Lewis
>Yet another Oracle-related web site: http://www.jlcomp.demon.co.uk
>
>Practical Oracle 8i: Building Efficient Databases
>
>Publishers: Addison-Wesley
>Book bound date: 8th Dec 2000
>See a first review at:
>http://www.ixora.com.au/resources/index.htm#practical_8i
>More reviews at: http://www.jlcomp.demon.co.uk/book_rev.html
>
>
>
>Paul Q wrote in message ...
>>No, May not even be that close.
>>The median is defined as that which is "situated in the middle", and it is
>>calculated quite differently from the mean. For example, the six friends
in
>>our example go shopping, and they spend the following amounts of money:
>>$15.00, $24.50, $3.75, $43.99, $28.10, and $17.68. First, the values in
>>question are all arranged in numerical order. In this case the order is:
>>$3.75, $15.00, $17.68, $24.50, $28.10, $43.99. If there were an odd
number
>>of values, the middle value would be considered the median. Since there
are
>>an even number in this example, the median is the mean of the two middle
>>values. Those values are 17.68 and 24.50, and the mean of those two is
>>21.09. Therefore, the median amount is $21.09. The median is most often
>>used when there are values which are very high or very low.
>>
>>
>>"Jonathan Lewis" <jonathan_at_jlcomp.demon.co.uk> wrote in message
>>news:975707338.5062.0.nnrp-01.9e984b29_at_news.demon.co.uk...
>>>
>>> There is no built-in.
>>> But if you have 8.1.6 you might be able to
>>> use the Analytic functions to good effect.
>>> e.g. Would the highest value in the 50th
>>> percentile be a reasonable approximation ?
>>>
>>>
>>> --
>>> Jonathan Lewis
>>> Yet another Oracle-related web site: http://www.jlcomp.demon.co.uk
>>>
>>> Practical Oracle 8i: Building Efficient Databases
>>>
>>> Publishers: Addison-Wesley
>>> Book bound date: 8th Dec 2000
>>> See a first review at:
>>> http://www.ixora.com.au/resources/index.htm#practical_8i
>>> More reviews at: http://www.jlcomp.demon.co.uk/book_rev.html
>>>
>>>
>>>
>>> sw_at_weinerfamily.org wrote in message
<3A27F23C.3A111F35_at_weinerfamily.org>...
>>> >Given a column of numbers, how do I calculate the median? I don't see a
>>> >function to do it. Do I need to write a procedure?
>>> >
>>>
>>>
>>>
>>>
>>
>>
>
>
Received on Sat Dec 02 2000 - 03:11:40 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US