Quartile Formula

Quartiles are the set of values that divide the data points into four identical values using three individual data points. Thus, a quartile is a very important topic in Statistics that helps us to study large amounts of data, they are used to divide the large data values into four equal quarters. These quartiles show the data that is near the middle points of the large data set.

In this article, we will learn about the quartiles as well as the formulas for the first quartile, second quartile, and third quartile and also provide a step-by-step guide to help you easily calculate quartiles. So, let’s start with the definition of quartile first.

Table of Content

  • Quartiles Definition
  • What is the Quartile Formula?
  • Quartiles in Statistics
  • Generalized Formula for Quartile
  • Quartile vs Percentile
  • Solved Problems on Quartile Formula
  • Quartile Formula Practice Probems

Quartiles Definition

Quartiles are the values from the dataset which divide the dataset into four equal parts where each part of the dataset contains an equal number of observations. There are three quartiles such as,

  • First or Lower Quartile
  • Second Quartile or Median
  • Third or Upper Quartile

What is the Quartile Formula?

As mentioned above Quartile divides the data into 4 equal parts. This can be represented visually by the below figure.

  • Quartile 1 lies between the starting term and the middle term.
  • Quartile 2 lies between the starting terms and the last terms i.e., the Middle term.
  • Quartile 3 lies between quartile 2 and the last term.

There is a separate formula for finding each quartile value. And in order to find these quartile values first, sort the given number series data into ascending order.

The steps to obtain the quartile formula are as shown below as follows: 

  • Step 1: Sort the given data in ascending order.
  • Step 2: Find respective quartile values/terms as per need from the below formulae.
  • First Quartile = ({n + 1}/{4})th term
  • Second Quartile = ({n + 1}/{2})th term
  • Third Quartile = ({3(n + 1)}/{4})th term

Where n is the total count of numbers in the given data.

Quartiles in Statistics

We know that the Median divides the data into two equal parts, in the same way, the quartile divides the data into four parts. Similar to the median which divides the data into half so that 50% of the estimation lies below the median and 50% lies above it, the quartile splits the data into i.e.,

  • First Part of Data: From smallest to largest of numbers 25% of the value, comes under this part and also this part lies below the first quartile.
  • Second of Data: Value between 25% and 50% of the data comes under this part and this part lies between the first and second quartile (Median).
  • Third of Data: Value between 50% and 75% of the data comes under this part and this part lies between the second and third quartile.
  • Fourth of Data: Greatest 25% of all values in the data comes under the fourth part and this part lies above the fourth quartile.

Generalized Formula for Quartile

The generalized formula for the quartile is,

[Tex]\bold{\text{Quartile}_r = l_1 + ( i\cdot \frac{n}{4} – c_f) \cdot \frac{(l_2-l_1)}{f}} [/Tex]

Where,

  • Quartiler indicates rth quartile.
  • l1, l2 are lower and upper limit value that contains ith quartile,
  • f is the frequency count. 
  • cf is the cumulative frequency of class preceding the quartile class.

Using this generalized formula, the first and third quartiles can be calculated as:

  • [Tex]\bold{\text{Q}_1 = l_1 + ( \frac{n}{4} – c_f) \cdot \frac{(l_2-l_1)}{f}} [/Tex]
  • [Tex]\bold{\text{Q}_3 = l_1 + ( \frac{3n}{4} – c_f) \cdot \frac{(l_2-l_1)}{f}} [/Tex]

Interquartile Range

Interquartile Range is the distance between the first quartile and the third quartile. It is also known as a mid-spread. It helps us to calculate variation for the data which is divided into quartiles. The formula for calculating the Interquartile range is given by,

Interquartile Range (IQR) = Q3 – Q1

Where, 

  • Q3 is third/upper quartile, and 
  • Q1 is first/lower quartile.

Quartile Deviation 

Quartile Deviation is defined as half of the distance between the first quartile and the third quartile. It is also known as Semi Interquartile Range. The formula for quartile deviation is given by,

Quartile Deviation = (Q3 – Q2)/2

Quartile vs Percentile

The key differences between Quartile and Percentile are given as follows:

Aspect

Quartile

Percentile

Definition

A quartile is a type of quantile that divides a data set into four equal parts

A percentile is a type of quantile that divides a data set into 100 equal parts

Range

Quartiles divide a dataset into four parts: 

Q1 = 25th Percentile

Q2 = 50th Percentile or Median

Q3 = 75th Percentile









Percentiles divide a dataset into 100 parts, with each percentile representing 1% of the data.

Calculation

Quartiles are calculated by dividing the data set into four equal parts, with each part containing 25% of the data

Percentiles are calculated by dividing the data set into 100 equal parts, with each part containing 1% of the data

Represented by

Quartiles are often represented as Q, Q2, and Q3.

Percentiles are often represented as P1, P2, P3, and so on up to P99

Usefulness

Quartiles are useful for identifying the spread and distribution of data, particularly in box plots and histograms

Percentiles are useful for comparing an individual the data point to the rest of the data set, and for identifying extreme values or outliers

Solved Problems on Quartile Formula

Problem 1: Find Quartile 1 for the given data 10, 30, 5, 12, 20, 40, 25, 15, 18.

Solution:

Step 1: Sort the given data in ny order ( ascending order / descending order) 

5, 10, 12, 15, 18, 20, 25, 30, 40

Step 2: Find 1st Quartile

FIrst Quartile [Tex]= (\frac{n + 1}{4})^{th}           [/Tex] term

Here n = 9 because there are total 9 numbers in the given data.

β‡’ First Quartile = ((9 + 1)/4)th term

β‡’ First Quartile = (10/4)th term

β‡’ First Quartile = 2.5th term

Now, 2.5th term = 2nd term + (0.5) (3rd term – 2nd term)

β‡’ 2.5th term = (10) + (0.5) (12 – 10)

β‡’ 2.5th term = 10+1 

β‡’ 2.5th term = 11

The First Quartile value is 11.

Problem 2: Find the Second Quartile for the data 10, 30, 5, 12, 20, 40, 25, 15, 18.

Solution:

Step 1: Sort the given data in the ascending order

5, 10, 12, 15, 18, 20, 25, 30, 40

Step 2: Find 2nd Quartile

Second Quartile [Tex]= (\frac{n + 1}{2})^{th}           [/Tex] term

Here n = 9 because there are total 9 numbers in the given data.

β‡’ Second Quartile [Tex]= (\frac{9 + 1}{2})^{th}           [/Tex] term

β‡’ Second Quartile = (10/2)th term

β‡’ Second Quartile = 5th term

5th term is 18

So the Second Quartile value is 18.

Problem 3: Find the third Quartile for the data 10, 30, 5, 12, 20, 40, 25, 15, 18.

Solution:

Step 1: Sort the given data in the ascending order

5, 10, 12, 15, 18, 20, 25, 30, 40

Step 2: Find 3rd Quartile

Third Quartile [Tex]= \frac{3(n + 1)}{4}^{th}    [/Tex] term

Here n = 9 because there are total 9 numbers in the given data.

β‡’ Third Quartile [Tex]= \frac{3(n + 1)}{4}^{th}     [/Tex] term

β‡’ Third Quartile= [Tex]\frac{3 \times (10)}{4}^{th}     [/Tex] term

β‡’ Third Quartile= 7.5th term

7.5th term is average result of 7th and 8th term = (25 + 30)/2 = 27.5

Remember:  7.5th term = 7th term + (0.5) (8th term – 7th term)

The most recommended method to find value is mentioned above

Because the term not always N.5 something  it may vary from N.1 to N.9 

Here, N be any natural number.

So the third Quartile value is 27.5.

Problem 4: Find the first, second, and third Quartile  for the data 8, 5,15,  20, 18, 30,  40, 25

Solution:

Step 1: Sort the given data in the ascending order

5, 8, 15, 18, 20, 25, 30, 40.

Step 2: Find all Quartiles step by step

First Quartile= {(n + 1)/4}th term

Here n = 8 because there are total 8 numbers in the given data.

β‡’ First Quartile = {(8 + 1)/4}th term

β‡’ First Quartile= {9/4})th term

β‡’ First Quartile= 2.25th term

Thus, 2.25th Term  = 2nd term + (0.25)(3rd term – 2nd term )

β‡’ 2.25th Term = 8+(0.25)(15-8) = 9.75

First Quartile value is 9.75

Second Quartile = {(n + 1)/2}th term

β‡’ Second Quartile = (9 + 1)/2}th term

β‡’ Second Quartile = {10/2}th term

β‡’ Second Quartile = 5th term

5th term is 20

So the second Quartile value is 20.

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

β‡’ Third Quartile = (3(8 + 1)/4)th term

β‡’ Third Quartile = (27/4)th term

β‡’ Third Quartile = 6.75th term

Thus, 6.75th  = 6th term +(0.75)(7th -6th)

β‡’ 6.75th = 25+ (0.75)(5)= 28.75

So the third Quartile value is 28.75

Problem 5: What is the Interquartile Range for the data if the first quartile is 10 and the third quartile is 30cm?

Solution:

Given,

  • Q1 = 10
  • Q3 = 30

Interquartile range = Q3 – Q1

β‡’ Interquartile range = 30 – 10

Thus, Interquartile range is 20.

Problem 6: What is the Quartile Deviation for the data if the first quartile is 15 and the third quartile is 30cm?

Solution:

Given,

  • Q1 = 15
  • Q3 = 30

Quartile Deviation = (Q3 – Q1)/2

β‡’ Quartile Deviation = (30 – 15)/2

β‡’ Quartile Deviation = 15/2

Thus, Quartile Deviation is 7.5

Quartile Formula Practice Probems

1. Given the dataset: 10, 30, 5, 12, 20, 40, 25, 15, 18, calculate Q1, Q2, and Q3.

2. Annual salaries (in thousands) of 20 employees: 22, 25, 28, 29, 32, 34, 36, 37, 39, 41, 43, 45, 47, 50, 52, 54, 56, 59, 61, 63. Determine Q1, Q2, and Q3.

3. Given the dataset: 3, 8, 12, 17, 20, 24, 27, 31, compute Q1, Q2, and Q3.

4. Data points: 1, 2, 2, 3, 4, 4, 5, 5, 6, 7, 100. Identify Q1, Q2, and Q3 and discuss how the outlier affects the quartile values.

5. Test scores of 15 students: 55, 60, 61, 63, 67, 69, 72, 75, 78, 81, 83, 85, 88, 90, 92. Calculate Q1, Q2, and Q3 and interpret the results to understand the spread and distribution of the students’ test scores.

Summary – Quartile Formula

Quartiles are statistical values that divide a dataset into four equal parts, each representing 25% of the data. They are essential in understanding the spread and distribution of data, particularly in large datasets. Quartiles help in identifying the central tendency, dispersion, and outliers within a dataset. The three quartiles are the first quartile (Q1), which marks the 25th percentile, the second quartile (Q2) or median, which marks the 50th percentile, and the third quartile (Q3), which marks the 75th percentile.

FAQs on Quartile Formula

What is a Quartile?

A quartile is a value in the dataset which divides the observations in four equal parts in terms of frequency. There are three quartiles in any data named as first, second and third quartile. 

What is the Formula for Finding the First Quartile?

The formula for first quartile (Q1) is given as follows:

Q1 = L + (N/4 – cf) Γ— (U – L)/F

Where,

  • L is the Lower limit of the first quartile class,
  • U is the Upper limit of the first quartile class,
  • N is the Total number of observations, and 
  • cf is the Cumulative Frequency of the first quartile class (the class containing Q1)

What is the Formula for Finding the Second Quartile?

Second quartile (Q2), also known as the median as it divides the data in two equal halves each containing equal number of observations as the other.

For n observation if n is odd, then median is

M = (n + 1)/2th Observation

For n observation if n is even, then median is

M = [(n/2)th Observation + ((n/2) + 1)th Observation]/2

What is the Formula for Finding the Third Quartile?

The formula for finding the third quartile (Q3) is:

Q3 = L + (3N/4 – F) Γ— (U – L)/F

Where,

  • L is the Lower limit of the first quartile class,
  • U is the Upper limit of the first quartile class,
  • N is the Total number of observations, and 
  • cf is the Cumulative Frequency of the third quartile class (the class containing Q3)

What is the Interquartile Range?

The interquartile range (IQR) is the difference between the third and first quartiles. It represents the middle 50% of the dataset and is given as follows:

IQR = Q3 – Q1

What is Quartile Deviation?

Quartile deviation is a measure of dispersion that is half the difference between the third and first quartiles of a dataset which mathematically can be represented as:

Quartile Deviation = (Q3 – Q2)/2

What is the Difference between Quartiles and Percentiles?

Quartiles divide data into four equal parts, while percentiles divide data into 100 equal parts.

Can Quartiles be Calculated for Non-Numerical Data?

No, quartiles are only applicable for numerical data.