# Nakafa Learning Content

> For AI agents: use [llms.txt](https://nakafa.com/llms.txt) for the site index. Markdown versions are available by appending `.md` to content URLs or sending `Accept: text/markdown`.

URL: https://nakafa.com/en/subjects/mathematics/statistics-foundations/quartile-data-single
Source: https://raw.githubusercontent.com/nakafaai/nakafa.com/refs/heads/main/packages/contents/material/lesson/mathematics/statistics-foundations/quartile-data-single/en.mdx

Calculate Q1, Q2, Q3 quartiles for ungrouped data with simple position formulas. Learn to divide sorted data into four equal parts one step at a time.

---

## What Are Quartiles?

The median is like a ruler that divides data into two equal parts, right in the middle ($$50\%$$). Well, there's another friend of the median, called **quartiles**.

Visible text: The median is like a ruler that divides data into two equal parts, right in the middle (). Well, there's another friend of the median, called **quartiles**.

If the median divides data into two, quartiles are even better; they divide the sorted data into **four** equal parts! Imagine you have a chocolate bar, and you break it into four equal pieces. Quartiles are the breaking points.

There are three quartile breaking points:

1.  **Lower Quartile ($$Q_1$$):** This is the first break. It separates the smallest $$25\%$$ of the data from the rest. Like the first quarter of the chocolate.
2.  **Middle Quartile ($$Q_2$$):** This is the **median**! It's exactly in the middle, dividing the data in half ($$50\%$$ left, $$50\%$$ right). Like the break in the middle of the chocolate.
3.  **Upper Quartile ($$Q_3$$):** This is the last break. It separates the smallest $$75\%$$ of the data from the largest $$25\%$$. Like the boundary after three-quarters of the chocolate.

Visible text: 1. **Lower Quartile ():** This is the first break. It separates the smallest of the data from the rest. Like the first quarter of the chocolate.
2. **Middle Quartile ():** This is the **median**! It's exactly in the middle, dividing the data in half ( left, right). Like the break in the middle of the chocolate.
3. **Upper Quartile ():** This is the last break. It separates the smallest of the data from the largest . Like the boundary after three-quarters of the chocolate.

So, $$Q_1$$, $$Q_2$$, and $$Q_3$$ divide our data into four small groups with the same number of data points ($$25\%$$ each).

Visible text: So, , , and divide our data into four small groups with the same number of data points ( each).

## How to Find the Position of Quartiles

Okay, now how do we know the position (rank) of $$Q_1$$, $$Q_2$$, and $$Q_3$$ in our ordered data?

Visible text: Okay, now how do we know the position (rank) of , , and in our ordered data?

Assume we have $$n$$ data points that we have sorted from smallest to largest.

Visible text: Assume we have data points that we have sorted from smallest to largest.

### Lower Quartile

The formula is simple:

```math
\text{Position of } Q_1 = \text{Data point at }\frac{1}{4}(n+1)
```

- **If the result is a whole number**, for example $$5$$, then $$Q_1$$ is the value of the $$5^{\text{th}}$$ data point.
- **If the result has a decimal**, for example $$5.25$$, then $$Q_1$$ lies between the $$5^{\text{th}}$$ and $$6^{\text{th}}$$ data points. (There's a way to calculate its value later, but for now, we're just finding the position).

Visible text: - **If the result is a whole number**, for example , then is the value of the data point.
- **If the result has a decimal**, for example , then lies between the and data points. (There's a way to calculate its value later, but for now, we're just finding the position).

**Simple Example:**

Suppose we have $$20$$ data points ($$n=20$$).

Visible text: Suppose we have data points ().

The position of $$Q_1$$ is the data point at $$\frac{1}{4}(20+1)$$, which is data point $$\frac{21}{4}$$ or $$5.25$$.

Visible text: The position of is the data point at , which is data point or .

This means $$Q_1$$ is between the $$5^{\text{th}}$$ and $$6^{\text{th}}$$ data points.

Visible text: This means is between the and data points.

### Middle Quartile

This is the median, so the formula is:

```math
\text{Position of } Q_2 = \text{Data point at }\frac{1}{2}(n+1)
```

The rules are the same as for $$Q_1$$:

Visible text: The rules are the same as for :

- **If the result is a whole number**, say $$10$$, $$Q_2$$ is the value of data point $$10$$.
- **If the result has a decimal**, say $$10.5$$, $$Q_2$$ is between data points $$10$$ and $$11$$.

Visible text: - **If the result is a whole number**, say , is the value of data point .
- **If the result has a decimal**, say , is between data points and .

**Simple Example ($$n=20$$):**

Visible text: **Simple Example ():**

The position of $$Q_2$$ is the data point at $$\frac{1}{2}(20+1)$$, which is data point $$\frac{21}{2}$$ or $$10.5$$.

Visible text: The position of is the data point at , which is data point or .

This means $$Q_2$$ (the median) is between data points $$10$$ and $$11$$.

Visible text: This means (the median) is between data points and .

### Upper Quartile

The formula is similar again:

```math
\text{Position of } Q_3 = \text{Data point at }\frac{3}{4}(n+1)
```

The rules are exactly the same:

- **If the result is a whole number**, say $$15$$, $$Q_3$$ is the value of data point $$15$$.
- **If the result has a decimal**, say $$15.75$$, $$Q_3$$ is between data points $$15$$ and $$16$$.

Visible text: - **If the result is a whole number**, say , is the value of data point .
- **If the result has a decimal**, say , is between data points and .

**Simple Example ($$n=20$$):**

Visible text: **Simple Example ():**

The position of $$Q_3$$ is the data point at $$\frac{3}{4}(20+1)$$, which is data point $$\frac{63}{4}$$ or $$15.75$$.

Visible text: The position of is the data point at , which is data point or .

This means $$Q_3$$ is between data points $$15$$ and $$16$$.

Visible text: This means is between data points and .

## Exercise

Try to find the position of $$Q_1$$, $$Q_2$$, and $$Q_3$$ from the math test scores of these $$7$$ children:

Visible text: Try to find the position of , , and from the math test scores of these children:

**Scores:** $$7, 5, 8, 6, 9, 7, 10$$

Visible text: **Scores:**

**Step** $$1$$: Sort the data first!

Visible text: **Step** : Sort the data first!

Sorted data: $$5, 6, 7, 7, 8, 9, 10$$

Visible text: Sorted data:

Number of data points: $$n = 7$$

Visible text: Number of data points:

**Step** $$2$$: Find the quartile positions using the formulas

Visible text: **Step** : Find the quartile positions using the formulas

- **Position of $$Q_1$$:**

  $$\text{Data point at }\frac{1}{4}(n+1) = \text{Data point at }\frac{1}{4}(7+1) = \text{Data point at }\frac{8}{4} = \text{Data point at }2$$

  The result is a whole number ($$2$$), so $$Q_1$$ is the $$2$$nd data point.

- **Position of $$Q_2$$ (Median):**

  $$\text{Data point at }\frac{1}{2}(n+1) = \text{Data point at }\frac{1}{2}(7+1) = \text{Data point at }\frac{8}{2} = \text{Data point at }4$$

  The result is a whole number ($$4$$), so $$Q_2$$ is the $$4$$th data point.

- **Position of $$Q_3$$:**

  $$\text{Data point at }\frac{3}{4}(n+1) = \text{Data point at }\frac{3}{4}(7+1) = \text{Data point at }\frac{24}{4} = \text{Data point at }6$$

  The result is a whole number ($$6$$), so $$Q_3$$ is the $$6$$th data point.

Visible text: - **Position of :**

 

 The result is a whole number (), so is the nd data point.

- **Position of (Median):**

 

 The result is a whole number (), so is the th data point.

- **Position of :**

 

 The result is a whole number (), so is the th data point.

**Step** $$3$$: Determine the quartile values

Visible text: **Step** : Determine the quartile values

Look at the sorted data: $$5, 6, 7, 7, 8, 9, 10$$

Visible text: Look at the sorted data:

- $$Q_1$$ is $$2$$nd data point = $$6$$
- $$Q_2$$ is $$4$$th data point = $$7$$
- $$Q_3$$ is $$6$$th data point = $$9$$

Visible text: - is nd data point = 
- is th data point = 
- is th data point =

## The Fourth Quartile

You might be wondering, "If there's $$Q_1$$, $$Q_2$$, and $$Q_3$$, is there a $$Q_4$$?"

Visible text: You might be wondering, "If there's , , and , is there a ?"

Technically, the concept of quartiles divides the data into four parts. $$Q_1$$ is the boundary for the first $$25\%$$, $$Q_2$$ (the median) is the $$50\%$$ boundary, and $$Q_3$$ is the $$75\%$$ boundary. The final boundary, which encompasses $$100\%$$ of the data, is actually the **maximum value** of the dataset.

Visible text: Technically, the concept of quartiles divides the data into four parts. is the boundary for the first , (the median) is the boundary, and is the boundary. The final boundary, which encompasses of the data, is actually the **maximum value** of the dataset.

So, while we could refer to the maximum value as $$Q_4$$, in statistical analysis, we don't typically use the term $$Q_4$$ explicitly. The main focus is on $$Q_1$$, $$Q_2$$, and $$Q_3$$ because they provide important information about the spread and center of the data in the lower, middle, and upper sections. The minimum value is sometimes called $$Q_0$$, but like $$Q_4$$, it's less commonly used than $$Q_1$$, $$Q_2$$, and $$Q_3$$.

Visible text: So, while we could refer to the maximum value as , in statistical analysis, we don't typically use the term explicitly. The main focus is on , , and because they provide important information about the spread and center of the data in the lower, middle, and upper sections. The minimum value is sometimes called , but like , it's less commonly used than , , and .