1
$\begingroup$

If i have this sorted data:

$1, 2, 2, 2, 3, 3, 4, 4, 5, 5, 5, 6, 6, 6, 6, 6, 7, 7, 8, 8, 8, 9, 9, 10, 10$

They are 25 numbers.

How should I calculate the quartiles and percentiles?

I try this:

$Q_2 = 2 * \frac{25}{4} = 12.5$

$Q_1 = 1 * \frac{25}{4} = 6.25$

$P_{50} = 50 * 25/100 = 12.5$

Well, but what should I do when it is decimal, for non-clustered data? In some part I have seen,

approach the nearest larger whole.

So, $12.5 \rightarrow 13$

So, $6.25 \rightarrow 7$

In other places I read:

the value will be the average between the data that is at the left of the position with the data on the right.

So, What should I really do?

$\endgroup$
0
$\begingroup$

You are mixing the percentages with your actual numbers.

Note that for $Q_1$ you want to pick a number from your set such that 25% of your data is less than or equal to that number.

With your data {1, 2, 2, 2, 3, 3, 4, 4, 5, 5, 5, 6, 6, 6, 6, 6, 7, 7, 8, 8, 8, 9, 9, 10, 10}

The $ Q_2 = 2 * \frac{25}{4} = 12.5 $% has no problem because it is $6$ with no confusion.

The$ Q_1 = 1 * \frac{25}{4} = 6.25$% should be $4$ because you want $ 6.25$% of your data less than or equal to $ Q_1$

$\endgroup$
  • $\begingroup$ So, you are approaching to major integer. Because $6$ is the 13th, and $4$ is the 7th $\endgroup$ – Eduardo S. Mar 18 '18 at 17:22
  • $\begingroup$ You are correct. $\endgroup$ – Mohammad Riazi-Kermani Mar 18 '18 at 17:25
1
$\begingroup$

There is no rule for what you should "really do". If this is for a class, do what the instructor wants you to do. If it's for yourself in some context, do what makes the most sense. In general, these percentile statistics make the most sense and are the most useful when the data set is large.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.