# How To Compute the Mean

 Example Data 244 238 1
Webform
Category
Help

## Usage

Click "Submit" after selecting one column to see how to compute the arithmetic mean (average) of data (vectors).

## Description

If all the values of a sample were plotted on a number line, the average would be the point in the middle that would balance the two sides.

The average is greatly influenced by outliers, meaning extreme points can pull the average to the left or right.

If we are referring to the average of population (all observations), the symbol for the average (arithmetic mean) is $\mu$.

If we are referring to the average of a sample (a subset of the population), the symbol for the average (arithmetic mean) is $\bar{x}$.

## Computing the average

Suppose we have a sample consisting of $x_1, x_2, x_3,...,x_n$. This means we have $n$ observations. Then,

$$\bar{x}=\frac{x_1, x_2, x_3,...,x_n}{n}.$$

The formula tells us that we need to add all the observations and then divide by the number of observations to compute the mean.

## Example 1

Compute the mean of $A = \{1,2,3\}$.

$$\bar{x} = \frac{1+2+3}{3} = 2.$$
Title Authored on Content type
R Dataset / Package car / WeightLoss March 9, 2018 - 1:06 PM Dataset
R Dataset / Package Ecdat / Produc March 9, 2018 - 1:06 PM Dataset
R Dataset / Package gap / hr1420 March 9, 2018 - 1:06 PM Dataset
R Dataset / Package pscl / absentee March 9, 2018 - 1:06 PM Dataset
R Dataset / Package MASS / gilgais March 9, 2018 - 1:06 PM Dataset