comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Definition of Median was(Re: Finding the index of the median)
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Definition of Median was(Re: Finding the index of the median) [message #7340] Wed, 30 October 1996 00:00 Go to previous message
Thomas A. McGlynn is currently offline  Thomas A. McGlynn
Messages: 23
Registered: March 1996
Junior Member
In looking at the get the index of the median
value, I noted that the behavior
of the IDL median filter is not what I would have expected.

E.g.,
print, median([1,2,3,10])

prints out 3. This is independent of the order of elements
in the array. Is there an accepted definition of what
the median value is in this case. For example, I might
think 2.5 is a more appropriate choice (but one which would
have made the previous discussion incorrect).

Perhaps more important, if the selection of 3 rather than
2 as the median arises because 3>2, then does the IDL median
function systematically 'overestimate' the median. More precisely
given two values that are reasonably choices for the median
does IDL always choose the later?

I don't like IDL's choice here. In some of my work
I've used a n-dimensional
median definition as the point (or points) at which the
unit to all the array elements sum to zero. This gives
a nice generalization of the concept of median to higher dimensions
but it would require a value (any value) m where 2<m<3 in the
current instance.

Tom McGlynn
tam@silk.gsfc.nasa.gov
[Message index]
 
Read Message
Read Message
Previous Topic: Parameter passing in PV-Wave
Next Topic: CNTRD error bars

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 05:53:18 PDT 2025

Total time taken to generate the page: 1.44010 seconds