1
$\begingroup$

One way to get quartile points is get median(Q2), then the upper and lower sets and then find their median to get Q1 and Q3.

But, I have found this formula which says Q1 = (1/4)(n+1)th term where n is no. of terms in the set.

Similarly for Q2 = (2/4)(n+1)th term

and Q3 = (3/4)(n+1)th term

Let's say there is a set x = 5,10,15,20,25,30,35,40,45,50

So I know the Median is (25+30)/2 = 27.5 = Q2

and to find Q1 we can take median of lower set, i.e 5,10,15,20,25, which is 15 = Q1.

Similarly to find Q3 we can take median of upper set, i.e 30,35,40,45,50, which is 40 = Q3

But by using the formula, we get Q1 = 1/4(11) = 2.75th term. = 13.75

and Q2 = 2/4(11) = 5.5th term. i.e = 27.5

and Q3 = 3/4(11) = 8.25th term. i.e = 41.5

which gives me different inter quartile range. so which method should I use in the exam?

here is an example of the formula if you haven't heard of it before.

http://facstaff.cbu.edu/wschrein/media/M201%20Notes/M201L23.pdf

$\endgroup$
1

1 Answer 1

1
$\begingroup$

Comment: As you have discovered, various sources have slightly different formulas for finding quantiles (including quartiles). Here are answers from R for your data.

x = c(5,10,15,20,25,30,35,40,45,50)
sort(x)
[1]  5 10 15 20 25  30 35 40 45 50
quantile(x)
   0%   25%   50%   75%  100% 
 5.00 16.25 27.50 38.75 50.00 

According to some definitions any number between 25 and 30 (inclusive) would be a possible median. And 15 and 40 would be values for lower and upper quartiles, respectively.

The difficulty, of course, is that it is impossible to divide ten sorted observations into four groups of equal size. (And if there are any ties, it can get messier.)

R documentation discusses briefly about eight other slightly different methods of finding quantiles. For small samples these methods can show substantial differences. The results shown above are for the default method, called type 7.

Here are results from three other 'types' in R:

quantile(x, type=1)
  0%  25%  50%  75% 100% 
   5   15   25   40   50 
quantile(x, type=2)
  0%  25%  50%  75% 100% 
 5.0 15.0 27.5 40.0 50.0 
quantile(x, type=4)
  0%  25%  50%  75% 100% 
 5.0 12.5 25.0 37.5 50.0 

While you're a student in a particular class, use the method specified there. In practice, quantiles are most often used for large datasets, and differences among definitions are mostly unimportant.

y = rnorm(1000, 100, 15)
quantile(y, type=1)
       0%       25%       50%       75%      100% 
 54.82376  89.56435  99.39657 109.90225 148.54398 
quantile(y, type=2)
       0%       25%       50%       75%      100% 
 54.82376  89.58146  99.44074 109.92691 148.54398 
quantile(y, type=7)  # R default
        0%       25%       50%       75%      100% 
  54.82376  89.59001  99.44074 109.91458 148.54398 
$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .