[This article was first published on Data Analysis in R » Quick Guide for Statistics & R » finnstats, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

The post Quartile in Statistics: Detailed overview with solved examples appeared first on finnstats.

If you want to read the original article, click here 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 parts 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 Q1.

First quartile = Q1 = ((n + 1) / 4) th term

• For the second quartile or Q2.

Second quartile = Q2 = ((n + 1) / 2) th term

• For the third quartile or Q3.

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

• For interquartile.

Interquartile = Q3 – Q1 = (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

Qk = 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.

Qk = 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

Q1 = 1 (9 + 1) / 4) th term

Q1 = 1 (10) / 4) th term

Q1 = (10) / 4) th term

Q1 = (5) / 2) th term

Q1 = 2.5th term

For k = 2

Q2 = 2 (9 + 1) / 4) th term

Q2 = 2 (10) / 4) th term

Q2 = (10 / 2) th term

Q2 = 5th term

For k = 3

Q3 = 3 (9 + 1) / 4) th term

Q3 = 3 (10) / 4) th term

Q3 = (30 / 4) th term

Q3 = (15 / 2) th term

Q3 = 7.5 th term

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

For Q1

Q1 = 2.5th term

Q1 = 2nd term + 3rd term / 2

Q1 = 7 + 9/2

Q1 = 16/2

Q1 = 8

For Q2

Q2 = 5th term

Q2 = 19

For Q3

Q3 = 7.5 th term

Q3 = 7th + 8th / 2

Q3 = 29 + 34 / 2

Q3 = 63/2

Q3 = 31.5

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

Interquartile = Q3 – Q1

Interquartile = 31.5 – 8

Interquartile = 23.5

Hence, the quartiles of the given set are Q1 = 8. Q2 = 19, Q3 = 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 = Q3 – Q1

Step 5: Now calculate the first and third quartile.

For Q1

Q1 = (n + 1) / 4) th term

Q1 = (7 + 1) / 4) th term

Q1 = (8) / 4) th term

Q1 = 2nd term

For Q3

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

Q3 = 3(7 + 1) / 4) th term

Q3 = 3(8) / 4) th term

Q3 = (24 / 4) th term

Q3 = 6th term

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

Interquartile = 6th term – 2nd 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

To read more visit Quartile in Statistics: Detailed overview with solved examples.

If you are interested to learn more about data science, you can find more articles here finnstats.

The post Quartile in Statistics: Detailed overview with solved examples appeared first on finnstats.

To leave a comment for the author, please follow the link and comment on their blog: Data Analysis in R » Quick Guide for Statistics & R » finnstats.

R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

# Never miss an update! Subscribe to R-bloggers to receive e-mails with the latest R posts.(You will not see this message again.)

Click here to close (This popup will not appear again)