RE: Useless stats (how to calculate the median)
Posted in 1999
Topics: General Discussion
The median is the middle value of the group: sort the values and take the central one -- if you have an even number of values, the median is the arithmetic mean ((x + y) / 2) of the two middle values > -----Original Message----- > From: Rekaish Bhardwaj [SMTP:RekaishB@compans.com] > Sent: Monday, December 06, 1999 5:27 AM > To: 'steve_roach@ibm.net'; informix-list@iiug.org > Subject: RE: Useless stats (how to calculate the median) > > Isn't median an average value ?? > (I seem to remember something like that from my maths classes). > So I would have thought that it is a simple case of adding up the values > and > then > dividing by the number of items that where added. > > Regards > Rekaish > > -----Original Message----- > From: steve_roach@NOSPAMibm.net [mailto:steve_roach@NOSPAMibm.net] > Sent: 06 December 1999 09:16 > To: informix-list@iiug.org > Subject: Useless stats (how to calculate the median) > > > > Hi folks, > > > Due to some ineptitude upstream, I am required to calculate the median > of a set of values. Anybody know of a straight forward way of doing > this? > > TIA > > Steve > > --------------------------------------------------------- > Steve Roach: Remove NOSPAM from address to reply: > steve_roach@NOSPAMibm.net > steve_roach@NOSPAMhotmail.com
There are several examples of SQL to compute the median in Joe Celko's book "SQL for Smarties". Demus, Alan wrote in message <82gjuk$3ai$1@news.xmission.com>... > >The median is the middle value of the group: sort the values >and take the central one -- if you have an even number of values, >the median is the arithmetic mean ((x + y) / 2) of the two >middle values > >> -----Original Message----- >> From: Rekaish Bhardwaj [SMTP:RekaishB@compans.com] >> Sent: Monday, December 06, 1999 5:27 AM >> To: 'steve_roach@ibm.net'; informix-list@iiug.org >> Subject: RE: Useless stats (how to calculate the median) >> >> Isn't median an average value ?? >> (I seem to remember something like that from my maths classes). >> So I would have thought that it is a simple case of adding up the values >> and >> then >> dividing by the number of items that where added. >> >> Regards >> Rekaish >> >> -----Original Message----- >> From: steve_roach@NOSPAMibm.net [mailto:steve_roach@NOSPAMibm.net] >> Sent: 06 December 1999 09:16 >> To: informix-list@iiug.org >> Subject: Useless stats (how to calculate the median) >> >> >> >> Hi folks, >> >> >> Due to some ineptitude upstream, I am required to calculate the median >> of a set of values. Anybody know of a straight forward way of doing >> this? >> >> TIA >> >> Steve >> >> --------------------------------------------------------- >> Steve Roach: Remove NOSPAM from address to reply: >> steve_roach@NOSPAMibm.net >> steve_roach@NOSPAMhotmail.com