median_age

After you order the n individual ages from youngest to oldest you can find the location of the median with the formula M=(n+1)/2.

For example, if you have an odd number of ages such as 7, 23, 35, 53, 99 then the median will be the (n+1)/2=(5+1)/2=3rd observation of the ordered set. Hence the median age is 35 years. Exactly half the ages are less than 35 and exactly half the ages are more than 35.

If, on the other hand, you have an even number of ages such as 7, 23, 35, 53, 75, 99 then the location of the median will be at position (n+1)/2=(6+1)/2=3.5 of the ordered set. Since there is no “three and halfth” observation you need to take the average of the 3rd and 4th observation. Hence the median age is (35+53)/2=44 years.

  • median_age.txt
  • Last modified: 2014/09/16 10:10
  • (external edit)