## The Problem

The mean is what we usually term the “average,” although there are many different averages, including the median. The mean is also known as the center of gravity of the data. It is used to estimate the center of a population when the population is not highly skewed. To illustrate calculating the mean, assume that you collected the following 6 data values:

96, 18, 19, 81, 95, 2

Calculate the mean value of this sample, \( \bar{x} \).

## Your Answer

You got the correct answer of **51.8333**. Congratulations!

Unfortunately, your answer was not correct. Either try again or click on “Show Solution” below to see how to obtain the correct answer.

## Assistance

Hide Solution

$$ \begin{align}
\bar{x} &= \frac{1}{n} \sum_{i=1}^{n} x_i \\
&= \frac{1}{6} \sum_{i=1}^{6} x_i \\
&= \frac{1}{6} \left( 96 + 18 + 19 + 81 + 95 + 2 \right) \\
&= \frac{1}{6} \left( 311 \right) \\[1ex]
&= 51.833333333333 \\
\end{align} $$

Thus, the mean of these 6 values is 51.8333.

Hide the R Code

Copy and paste the following code into your R script window, then run it from there.

sample = c(96, 18, 19, 81, 95, 2)

mean(sample)

In the R output, the mean is the number output by the script.

Hide the Excel Code

Copy and paste the following code into your Excel spreadsheet window, making sure your cursor is in `A1`

when you paste.

sample

96

18

19

81

95

2

=AVERAGE(A2:A7)

Note that the function in Excel is `AVERAGE`

and *not* `MEAN`

.