# Quartile in Statistics: Detailed overview with solved examples

Quartiles are widely used in statistics to divide the given set of values into four equal parts. These four terms of the quartile are used to find the first, second, and third quartile which are widely used in the five-number summary.

The main purpose of the quartile is to calculate the interquartile range of the given set of data. Using the quartile median of the set can also be calculated easily. The interquartile range is used to measure the variability around the median of the given set of data.

In this article, we will go through the definition and formulas of quartile with a lot of examples.

Artificial Intelligence and Data Science » finnstats

## What is a quartile?

A term that divides the given set of numbers into four equal parts or quarters is known as a quartile. These four quartiles are the first quartile, second quartile or median, third quartile, and interquartile. The interquartile range is used to determine the difference between the third and the first quartiles.

To measure the central point of the given set of data second quartile is used which is 50% of the given data. The lower and upper parts or the first and third quartiles are used to get information set before and after the median respectively.

First of all, arrange the given set of data in ascending order then take the middlemost value that is the median. The lower half of the set is the first quartile and the upper half is the third quartile. The difference between the lower and upper half can be identified by using the interquartile range.

### Formulas of quartile

There are four basic formulas of the quartile used to find the first, second, third, and inter quartiles.

- For the first quartile or Q
_{1}.

First quartile = Q_{1} = ((n + 1) / 4)^{ th} term

- For the second quartile or Q
_{2}.

Second quartile = Q_{2} = ((n + 1) / 2)^{ th} term

- For the third quartile or Q
_{3}.

Third quartile = Q_{3} = (3(n + 1) / 4)^{ th} term

- For interquartile.

Interquartile = Q_{3} – Q_{1} = (3(n + 1) / 4)^{ th} term – ((n + 1) / 4)^{ th} term

By using the above three formulas for the first, second, and third quartiles, we can write a general formula to calculate the quartile.

Ogive curve in R » Quick Guide » finnstats

**Q _{k} = k (n + 1) / 4)^{ th} term**

Where k = 1, 2, 3

## How to calculate quartile?

By using formulas, we can easily calculate quartile.

**Example 1**

Evaluate all parts of the quartile of the given set of data, 2, 9, 7, 29, 34, 61, 25, 19, 16?

**Solution**

**Step 1:** Take the given set of numbers.

2, 9, 7, 29, 34, 61, 25, 19, 16

**Step 2:** Arrange the given set of numbers according to ascending order.

2, 7, 9, 16, 19, 25, 29, 34, 61

**Step 3:** Now count the given set of numbers and put it equal to n.

n = 9

**Step 4:** Now take the general formula of the quartile to find the first, second, and third quartiles.

Q_{k} = k (n + 1) / 4)^{ th} term

**Step 5:** Put k = 1, 2, 3 one by one to calculate the first, second, and third quartiles.

**For k = 1**

Q_{1} = 1 (9 + 1) / 4)^{ th} term

Q_{1} = 1 (10) / 4)^{ th} term

Q_{1} = (10) / 4)^{ th} term

Q_{1} = (5) / 2)^{ th} term

Q_{1} = 2.5^{th }term

**For k = 2**

Q_{2} = 2 (9 + 1) / 4)^{ th} term

Q_{2} = 2 (10) / 4)^{ th} term

Q_{2} = (10 / 2)^{ th} term

Q_{2} = 5^{th} term

**For k = 3**

Q_{3} = 3 (9 + 1) / 4)^{ th} term

Q_{3} = 3 (10) / 4)^{ th} term

Q_{3} = (30 / 4)^{ th} term

Q_{3} = (15 / 2)^{ th} term

Q_{3} = 7.5^{ th} term

**Step 6:** Now take the calculated values from the arranged data set.

**For Q _{1}**

Q_{1} = 2.5^{th }term

Q_{1} = 2^{nd} term + 3^{rd} term / 2

Q_{1} = 7 + 9/2

Q_{1} = 16/2

Q_{1} = 8

**For Q _{2}**

Q_{2} = 5^{th} term

Q_{2} = 19

**For Q _{3}**

Q_{3} = 7.5^{ th} term

Q_{3} = 7^{th} + 8^{th} / 2

Q_{3} = 29 + 34 / 2

Q_{3} = 63/2

Q_{3} = 31.5

**Step 7:** Now take the general formula to calculate interquartile and put the values.

Interquartile = Q_{3} – Q_{1}

Interquartile = 31.5 – 8

Interquartile = 23.5

Hence, the quartiles of the given set are Q_{1} = 8. Q_{2} = 19, Q_{3} = 31.5, and interquartile = 23.5

Intro to Tensorflow-Machine Learning with TensorFlow » finnstats

**Example 2**

Find the interquartile of the given set of data, 23, 19, 3, 12, 22, 18, 11?

**Solution**

**Step 1:** Take the given set of numbers.

23, 19, 3, 12, 22, 18, 11

**Step 2:** Arrange the given set of numbers according to ascending order.

3, 11, 12, 18, 19, 22, 23

**Step 3:** Now count the given set of numbers and put it equal to n.

n = 7

**Step 4:** Now take the general formula of the interquartile.

Interquartile = Q_{3} – Q_{1}

**Step 5:** Now calculate the first and third quartile.

**For Q _{1}**

Q_{1} = (n + 1) / 4)^{ th} term

Q_{1} = (7 + 1) / 4)^{ th} term

Q_{1} = (8) / 4)^{ th} term

Q_{1} = 2^{nd} term

**For Q _{3}**

Q_{3} = 3(n + 1) / 4)^{ th} term

Q_{3} = 3(7 + 1) / 4)^{ th} term

Q_{3} = 3(8) / 4)^{ th} term

Q_{3} = (24 / 4)^{ th} term

Q_{3} = 6^{th} term

**Step 6:** Put the result of the third and first quartile in the interquartile formula.

Interquartile = 6^{th} term – 2^{nd} term

Interquartile = 22 – 11

Interquartile = 11

## Summary

Now you can grab all the basic concepts related to quartile just by following this article. All the problems of the quartile can easily be solved by using the above-mentioned formulas. Once you practice the above examples, you will be able to solve any problem related to this topic.

Quartiles in Statistics » finnstats

Your explanation is confusing:

“These four parts are the first quartile, second quartile or median, third quartile, and interquartile.”

Parts are quarters, quartiles are numbers. How can your part “second quartile” be the median, which is definitely a single number? Interquartile in your sentence has no sense …

Be so kind and correct this sentence …