Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to find Median
Message
 
À
03/04/2005 01:22:59
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 8
Divers
Thread ID:
01001069
Message ID:
01001078
Vues:
21
>Thanks Al, I knew someone out there will have an answer. I need a liitle more clarification, the example says :
>
>******************** Example
>2) If n is odd, take the middle value as your median - the (n+1)/2 value.
>
>3) If n is even, it's the same basic formula, except you average the two middle values,
>add the n/2 point + (n+2)/2 point and divide that sum by 2. IOW, the mean of the 2 middle values.
>
>EX: 1,4,8: 4 is the median
>
>EX: 1,4,7,8: 4+7/2 = 11/2 = 5.5 is the median
>*****************************************************
>
>How would an example look if the data was 1,3,5,8,9,13,21,35,45 ???
>Your help will be appreciated.
>Shafid

Based on Example:
You have 9 values (odd),
n = 9
(n+1)/2 = 10/2 = 5 therefore 5th value is the median-> 9

if you have 10 values i.e. 1,3,5,8,9,13,21,35,45,54 (even) ->
n = 10
(n/2) = 5, (n+2)/2 = 6 => you must take 5th and 6th values (9+13)/2 = 22/2 = 11
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform