## 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 7 data values:

32, 78, 62, 92, 47, 76, 4

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

## Your Answer

You got the correct answer of **55.8571**. 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}{7} \sum_{i=1}^{7} x_i \\
&= \frac{1}{7} \left( 32 + 78 + 62 + 92 + 47 + 76 + 4 \right) \\
&= \frac{1}{7} \left( 391 \right) \\[1ex]
&= 55.857142857143 \\
\end{align} $$

Thus, the mean of these 7 values is 55.8571.

Hide the R Code

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

sample = c(32, 78, 62, 92, 47, 76, 4)

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

32

78

62

92

47

76

4

=AVERAGE(A2:A8)

Note that the function in Excel is `AVERAGE`

and *not* `MEAN`

.