Discussion:
Semi-interquartile range question
(too old to reply)
d***@yahoo.com
2006-10-16 11:04:09 UTC
Permalink
according to the bbc website:
http://www.bbc.co.uk/scotland/education/bitesize/standard/mathsII/statistics/semi-interquartile_range_rev2.shtml

the formula for calculating the lower quartile is (n+1)/4 and
the formula for calculating the upper quartile is 3(n+1)/4

now this is ok if there are an odd number of terms (n) and (n-1)/2 is
and an odd number

ie using the following list of terms: 3, 6, 9, 11, 15, 17, 21

the lower quartile is 2nd term (6) and the upper quartile is 6th term
(17)

but in this example where the number of terms is an even number then
the (n+1)/2 and the 3(n+1)/4 formula produces a number with a fraction

ie using the following list of terms: 3, 6, 9, 11, 15, 17, 21, 27
where there are an even number of terms (8) and n/2 is an even number

the lower quartile is the (8+1)/4 = 2.25th term and
the upper quartile is the 3(8+1)/4 = 6.75th term

is there a better explanantion to calculate the lower and upper
quartile for these different combinations of number of terms or is it
safe to say that if the nth term of the upper and lower quartile values
is a fraction then its just :

int(nth term) + (int(nth term)+1) / 2

ie the lower quartile of 3, 6, 9, 11, 15, 17, 21, 27 would be:

(2nd+3rd) / 2 th term = (6 + 9) / 2 = 7.5

Apologies if the above sounds a bit waffly!
d***@yahoo.com
2006-10-16 11:53:21 UTC
Permalink
just to add, in this example where there are 50 terms

7,9,10,10,10,11,11,11,11,12,12,13,14,14,14,15,15,15,15,15,16,16,17,18,18,20,21,21,21,23,24,25,25,26,26,27,27,28,30,31,31,31,32,33,34,35,37,38,40,44

The median would 19, (18+20)/2

7,9,10,10,10,11,11,11,11,12,12,13,14,14,14,15,15,15,15,15,16,16,17,18,18

20,21,21,21,23,24,25,25,26,26,27,27,28,30,31,31,31,32,33,34,35,37,38,40,44

the lower quartile would be the 13th term (14) and the upper quartile
would be the 38th term (28)

7,9,10,10,10,11,11,11,11,12,12,13, 14
,14,14,15,15,15,15,15,16,16,17,18,18

20,21,21,21,23,24,25,25,26,26,27,27 28
,30,31,31,31,32,33,34,35,37,38,40,44


but using the formulas (n+1)/4 and 3(n+1)/4

you get LQ = (50+1)/2 = 12.74 and UQ = 3(50+1)/4 = 38.25


so what exactly is the rule for dealing with fractions?
Frank F. Matthews
2006-10-16 15:14:10 UTC
Permalink
The usual definitions can give multiple values for both quartiles and
medians. The usual definition of median is a number such that the
number of values greater than or equal to that number and the number of
values equal to or less than that number both represent at least half of
the sample. A comparable statement <= is 1/4 & >= is 3/4 will define
the lower quartile. If you want to count items take each fractional
value UP to the next integer.

This definition of quartile does result in 6 for your sample one 3, 6,
9, 11, 15, 17, 21 since there are 2 at or below 6 and 6 at or above 6.

In other samples there may be multiple values such as the median for
1, 2, 5, 6 which will have the following integers for medians {2,3,4,5}.
Some authors will give a rule for picking a particular value or even
will give a fractional median for a set of integers.
Post by d***@yahoo.com
http://www.bbc.co.uk/scotland/education/bitesize/standard/mathsII/statistics/semi-interquartile_range_rev2.shtml
the formula for calculating the lower quartile is (n+1)/4 and
the formula for calculating the upper quartile is 3(n+1)/4
now this is ok if there are an odd number of terms (n) and (n-1)/2 is
and an odd number
ie using the following list of terms: 3, 6, 9, 11, 15, 17, 21
the lower quartile is 2nd term (6) and the upper quartile is 6th term
(17)
but in this example where the number of terms is an even number then
the (n+1)/2 and the 3(n+1)/4 formula produces a number with a fraction
ie using the following list of terms: 3, 6, 9, 11, 15, 17, 21, 27
where there are an even number of terms (8) and n/2 is an even number
the lower quartile is the (8+1)/4 = 2.25th term and
the upper quartile is the 3(8+1)/4 = 6.75th term
is there a better explanantion to calculate the lower and upper
quartile for these different combinations of number of terms or is it
safe to say that if the nth term of the upper and lower quartile values
int(nth term) + (int(nth term)+1) / 2
(2nd+3rd) / 2 th term = (6 + 9) / 2 = 7.5
Apologies if the above sounds a bit waffly!
Continue reading on narkive:
Loading...