# How To Calculate Quantiles

Descriptive statistics will never be complete without using quantiles. A quantile is a bit of data that groups other data in a sequence. Calculating the quantile will be helpful if you want to know how high the score of the upper 25% is of a class or other similar problems. Getting the quantiles is very flexible for statistics and will be very beneficial in concluding what the data means.

Calculating the quantiles can be a little tricky, though. There are many rules that you need to follow. Getting the quantile is not as simple as getting the sum or even the average.

Quantile in Different Names

Before you can calculate for the quantile, you need first to know how many times you want to divide the sequence of data. There is a corresponding name depending on how many times the sequence of data will be divided:

Median - for the 2-quantile

Terciles or Tetiles (T) - for 3-quantiles

Quartiles (Q) - for 4-quartiles

Quintiles (QU) - for 5-quartiles

Sextiles (S) - for 6-quartiles

Deciles (D) - for 10-quantiles

Duo-Deciles (Dd) - for 12-quantiles

Vigintiles (V) - for 20-quantiles

Percentiles (P) - for 100-quantiles

Permilles (Pr) - for 1000-quantiles

Depending on what you need, choose the proper quantile type so you can divide the data evenly.

Computing Quantiles

The simplest formula to get the quantile is:

Quantile = n * (y/x)

where n is the number of data in a sequence, y is the specific quantile, and x is the total quantile. For instance, if you want to get the median of 1, 2, 3, 4, 5, and 6, you will use this formula:

Quantile = 6 * (1/2)

= 3

"6" because there are six data in the sequence, "1" because this is the first quantile in two quantiles, and "2" because the data will be divided in two quantiles.

The answer here is "3," which means that the third number in the sequence is the point that separates the lower half and the upper half. In this sequence, that number is "3. "You can say that the numbers before 3 and including 3 (1, 2, and 3) are the lower 50% of the sequence while the numbers after 3 (4, 5, 6) are the upper 50%.

Try to calculate the quantile in a different number of parts, say in four. Using the same sequence, the quartile will be found using the following figures:

Quartile = 6 * (1/4)

Notice that instead of 2, the formula is already using 4. That is because four is the total number of parts in a quartile. And so, the answer is 1.5. In this case, the answer is not an integer. Round the number off to the nearest integer. Therefore, 2.

This computation means that the first 25% or quarter of the data includes number less than the second data. In the example, the second data (in ascending order) is 2. That means 25% of the data is made up of 1.

Automatic Quantile Computation

Take advantage of today's technology and compute quantiles automatically. There are nine quantile methods available in R Programming Language. These methods are used to estimate the quantiles.

Besides using the R Programming Language methods, you can also enter your own formula in a spreadsheet application like MS Excel. The task may be a bit more tedious but at least, it will not be as hard as manual computation.

### Follow us!

Find more helpful articles: