Mean, Median, Mode, Quartile, Midrange, and Range Calculator

Input a dataset to quickly calculate its median, quartiles, mode, midrange, mean, and range.

Mean, Median, Mode, Quartile, Midrange, and Range Calculate

Median

Quartile

Mode

Midrange

Mean

Range

Given a dataset \( D = \{d_1, d_2, d_3, \dots, d_n\} \), you can calculate its key statistical values using the following methods:

Median

The median is the middle value of a dataset when arranged in ascending order. If the dataset size \( n \) is odd, the median is the middle value. If \( n \) is even, the median is the average of the two middle values.

Formula:

  • If \( n \) is odd: \(\text{Median} = d_{\frac{n+1}{2}}\).
  • If \( n \) is even: \(\text{Median} = \frac{d_{\frac{n}{2}} + d_{\frac{n}{2} + 1}}{2}\).

Quartiles

Quartiles divide the dataset into four equal parts:

  • \( Q1 \) (First Quartile): Median of the lower half of the dataset.
  • \( Q2 \) (Second Quartile): The overall median of the dataset.
  • \( Q3 \) (Third Quartile): Median of the upper half of the dataset.

Mode

The mode is the value(s) that appear most frequently in the dataset. A dataset may have no mode, one mode, or multiple modes.

Midrange

The midrange is the average of the dataset's maximum and minimum values. The formula is: \( \text{Midrange} = \frac{\text{Maximum Value} + \text{Minimum Value}}{2} \)

Mean

The mean (or average) is the sum of all data values divided by the number of values. The formula is: \( \text{Mean} = \frac{\sum_{i=1}^{n} d_i}{n} \)

Range

The range is the difference between the maximum and minimum values in the dataset. The formula is: \( \text{Range} = \text{Maximum Value} - \text{Minimum Value} \)

Examples

Example 1: Dataset \( D = \{1, 3, 5, 7, 9, 11, 13, 15\} \), Calculate its median, quartiles, mode, midrange, mean, and range.

Solution:

1. Median:

Dataset size = 8 (even).

Median = \(\frac{7 + 9}{2} = 8\).

2. Quartiles:

\( Q1 \): Median of \(\{1, 3, 5, 7\}\) = \(4\).

\( Q3 \): Median of \(\{9, 11, 13, 15\}\) = \(12\).

3. Mode:

No repeated values, so no mode.

4. Midrange:

\( \text{Midrange} = \frac{15 + 1}{2} = 8 \)

5. Mean:

\( \text{Mean} = \frac{1 + 3 + 5 + 7 + 9 + 11 + 13 + 15}{8} = \frac{64}{8} = 8 \)

6. Range:

\( \text{Range} = 15 - 1 = 14 \)

Example 2: Dataset \( D = \{2, 4, 4, 6, 8, 8, 10\} \), Calculate its median, quartiles, mode, midrange, mean, and range.

Solution:

1. Median:

Dataset size = 7 (odd). Median = \(6\).

2. Quartiles:

\( Q1 \): Median of \(\{2, 4, 4\}\) = \(4\).

\( Q3 \): Median of \(\{8, 8, 10\}\) = \(8\).

3. Mode:

Both \(4\) and \(8\) appear twice. Modes = \(4, 8\).

4. Midrange:

\( \text{Midrange} = \frac{10 + 2}{2} = 6 \)

5. Mean:

\( \text{Mean} = \frac{2 + 4 + 4 + 6 + 8 + 8 + 10}{7} = \frac{42}{7} = 6 \)

6. Range:

\( \text{Range} = 10 - 2 = 8 \)