# Do you include the median when finding the upper and lower quartiles?

In statistics, the median is the value separating the higher half from the lower half of a data sample, a population, or a probability distribution. This is an important parameter that is used to extract various kinds of information from a given dataset. These are also used in important predictions of different parameters.

## Answer: Yes, we can include the median when finding the upper and the lower quartiles in a dataset when the number of data items is even.

Let us understand the solution.

**Explanation:**

Let's take the example of a dataset with an even number of data items:

1 4 9 16 25 36

For finding the lower quartile, we take the median of the lower 50% (lower half) of the dataset.

Therefore, lower quartile = median of {1, 4, 9} = 4

For finding the upper quartile, we take the median of the upper 50% (upper half) of the dataset.

Therefore, upper quartile = median of {16 ,25, 36} = 25

Now let's take an example of the dataset with an odd number of items:

1 4 9 16 25 36 64

Case 1: Let's calculate the quartiles without including the median

Hence, the lower quartile = median of {1, 4, 9} = 4

The upper quartile = median of {25, 36, 64} = 36

Case 2: Let's calculate the quartiles including the median on both the quartiles

here median = 16

Hence, the lower quartile = median of {1, 4, 9, 16} = (4 + 9) / 2 = 6.5

The upper quartile = median of {16, 25, 36, 64} = (25 + 36) / 2 = 30.5