# Mean median mode calculator for ungrouped data

## Mean, median and mode

Mean, median, mode are the measures of central tendency. They are also known as averages. Averages are the measures which condense a huge set of numerical data into a single numerical value which is representative of the entire data.

They give us an idea about the concentration of the values in the central part of data. In brief, average of a statistical data is the value of the variable which is representative of the entire population.

Two data sets are not comparable because of the unsystematic variation generally present in the data sets, but constants make it possible to compare the data sets easily.

Averages are very much useful for :

• describing the distribution in concise manner.
• comparative study of different distributions.
• computing various other statistical measures such as dispersion (variation), skewness (lack of symmetry) and so on.

## Mean, Median and Mode for ungrouped data

Let $x_i, i=1,2, \cdots , n$ be $n$ observations.

## Mean for ungrouped data

The mean of $X$ is denoted by $\overline{x}$ and is given by

$\overline{x} =\dfrac{1}{n}\sum_{i=1}^{n}x_i$

## Median for ungrouped data

Arrange the data in ascending order of magnitude.

Median of $X$ is given by

 $$\begin{equation*} Md= \left\{ \begin{array}{ll} \text{value of }\big(\frac{n+1}{2}\big)^{th}\text{ observation}, & \hbox{if n is odd;} \\ \text{average of }\big(\frac{n}{2}\big)^{th}\text{ and }\big(\frac{n}{2}+1\big)^{th} \text{ observation}0, & \hbox{if n is even.} \end{array} \right. \end{equation*}$$

## Mode for ungrouped data

Mode is the value of $X$ that occurs maximum number of times.

## Mean, median and mode Calculator for ungrouped data

Use this calculator to find the mean, median and mode for ungrouped (raw) data.

Mean, median and Mode
Enter the X Values (Separated by comma,)
Results
Number of Obs. (n):
Sum of X values:
Mean of X values:
Ascending order of X values:
Median of X values :
Mode of X values :

## How to find mean,median and mode for ungrouped data?

Step 1 - Enter the (X) values seperated by comma (,)

Step 2 - Click on "Calculate" button to get mean, median and mode for ungrouped data

Step 3 - Gives the output as number of observations $n$

Step 4 - Calculate sample mean ($\overline{x}$)

Step 5 - Calculate sample median

Step 6 - Calculate sample mode

## Mean median and Mode for ungrouped data Example 1

A random sample of 15 patients yielded the following data on the length of stay (in days) in the hospital.

5,6,9,10,15,10,14,12,10,13,13,9,8,10,12.

Find the mean, median and mode.

#### Solution

Mean

The sum of observations is $\sum x_i =156$ days.

The mean of the length of stay in the hospital is

 \begin{aligned} \overline{x} &=\frac{1}{n}\sum_{i=1}^n x_i\\ &=\frac{156}{15}\\ &=10.4 \text{ days}. \end{aligned}

Median

The data in ascending order of magnitude is $5, 6, 8, 9, 9, 10, 10, 10, 10, 12, 12, 13, 13, 14, 15$.

Here $n = 15$ which is odd.

Sample median = value of $(\frac{n+1}{2})^{th}$ observations.

Thus the median of the length of stay in the hospital is

 \begin{aligned} M &= \bigg(\frac{15+1}{2}\bigg)^{th}\text{Obs.} \\ &= \big(8\big)^{th}\text{Obs.} \\ &=10 \text{ days}. \end{aligned}

Mode

The observation $10$ occurs with a highest frequency of 4.

The mode of the length of stay in the hospital is $10$ days.

## Mean median and Mode for ungrouped data Example 2

The age (in years) of 6 randomly selected students from a class are

22,25,24,23,24,20.

Find the mean, median and mode.

#### Solution

Mean

The sum of observations is $\sum x_i =138$ days.

The mean age of students is

 \begin{aligned} \overline{x} &=\frac{1}{n}\sum_{i=1}^n x_i\\ &=\frac{138}{6}\\ &=23 \text{ years}. \end{aligned}

Median

The data in ascending order of magnitude is $20, 22, 23, 24, 24, 25$.

Here $n = 6$ which is even.

Sample median = average of $(\frac{n}{2})^{th}$ and $(\frac{n}{2}+1)^{th}$ observations.

Thus the median age of students is

 \begin{aligned} M &= \frac{\big(\frac{6}{2}\big)^{th}\text{Obs.} +\big(\frac{6}{2}+1\big)^{th}\text{Obs.}}{2}\\ &= \frac{\big(3\big)^{th}\text{Obs.} +\big(4\big)^{th}\text{Obs.}}{2}\\ &=\frac{23 +24}{2} \\ &= 23.5 \text{ years}. \end{aligned}

Mode

The observation $24$ occurs with a highest frequency of 2.

The mode of age of students is $24$ years.

## Mean median and Mode for ungrouped data Example 3

The following data are the heights, correct to the nearest centimetres, for a group of children:

126, 129, 129, 132, 132, 133, 133, 135, 136, 137,
137, 138, 141, 143, 144, 146, 147, 152, 154, 161 

Find the mean, median and mode.

#### Solution

Mean

The sum of observations is $\sum x_i =2785$ days.

The mean height is

 \begin{aligned} \overline{x} &=\frac{1}{n}\sum_{i=1}^n x_i\\ &=\frac{2785}{20}\\ &=139.25 \text{ cm}. \end{aligned}

Median

The data in ascending order of magnitude is $126, 129, 129, 132, 132, 133, 133, 135, 136, 137, 137, 138, 141, 143, 144, 146, 147, 152, 154, 161$.

Here $n = 20$ which is even.

Sample median = average of $(\frac{n}{2})^{th}$ and $(\frac{n}{2}+1)^{th}$ observations.

Thus the median height is

 \begin{aligned} M &= \frac{\big(\frac{20}{2}\big)^{th}\text{Obs.} +\big(\frac{20}{2}+1\big)^{th}\text{Obs.}}{2}\\ &= \frac{\big(10\big)^{th}\text{Obs.} +\big(11\big)^{th}\text{Obs.}}{2}\\ &=\frac{137 +137}{2} \\ &= 137 \text{ cm}. \end{aligned}

Mode

The observation $129$ occurs with a highest frequency of 2.

The mode of height is $129$ cm.

## Mean median and Mode for ungrouped data Example 4

Blood sugar level (in mg/dl) of a sample of 20 patients admitted to the hospitals are as follows:

75,89,72,78,87,85,73,75,97,87,
84,76,73,79,99,86,83,76,78,73.

Find the mean, median and mode of blood sugar level.

#### Solution

Mean

The sum of observations is $\sum x_i =1625$ days.

The mean blood sugar level is

 \begin{aligned} \overline{x} &=\frac{1}{n}\sum_{i=1}^n x_i\\ &=\frac{1625}{20}\\ &=81.25 \text{ mg/dl}. \end{aligned}

Median

The data in ascending order of magnitude is $72, 73, 73, 73, 75, 75, 76, 76, 78, 78, 79, 83, 84, 85, 86, 87, 87, 89, 97, 99$.

Here $n = 20$ which is even.

Sample median = average of $(\frac{n}{2})^{th}$ and $(\frac{n}{2}+1)^{th}$ observations.

Thus the median blood sugar level is

 \begin{aligned} M &= \frac{\big(\frac{20}{2}\big)^{th}\text{Obs.} +\big(\frac{20}{2}+1\big)^{th}\text{Obs.}}{2}\\ &= \frac{\big(10\big)^{th}\text{Obs.} +\big(11\big)^{th}\text{Obs.}}{2}\\ &=\frac{78 +79}{2} \\ &= 78.5 \text{ mg/dl}. \end{aligned}

Mode

The observation $73$ occurs with a highest frequency of 3.

The mode of blood sugar level is $73$ mg/dl.

## Mean median and Mode for ungrouped data Example 5

The following measurement were recorded for the drying time in hours, of a certain brand of latex paint.

3.4 2.5 4.8 2.9 3.6 2.8 3.3 5.6
3.7 2.8 4.4 4.0 5.2 3.0 4.8.

Compute mean, median and mode for the above data.

#### Solution

Mean

The sum of observations is $\sum x_i =56.8$ days.

The mean drying time of latex paint is

 \begin{aligned} \overline{x} &=\frac{1}{n}\sum_{i=1}^n x_i\\ &=\frac{56.8}{15}\\ &=3.7867 \text{ hours}. \end{aligned}

Median

The data in ascending order of magnitude is $2.5, 2.8, 2.8, 2.9, 3, 3.3, 3.4, 3.6, 3.7, 4, 4.4, 4.8, 4.8, 5.2, 5.6$.

Here $n = 15$ which is odd.

Sample median = value of $(\frac{n+1}{2})^{th}$ observations.

Thus the median of drying time of latex paint is

 \begin{aligned} M &= \bigg(\frac{15+1}{2}\bigg)^{th}\text{Obs.} \\ &= \big(8\big)^{th}\text{Obs.} \\ &=3.6 \text{ hours}. \end{aligned}

Mode

The observation $4.8$ occurs with a highest frequency of 2.

The mode of drying time of latex paint is $4.8$ hours.

## Conclusion

In this tutorial, you learned about formula for mean, median and mode for ungrouped data and how to calculate mean, median and mode for ungrouped data. You also learned about how to solve numerical problems based on mean, median and mode for ungrouped data. 