The mean is a type of average value, which describes where center of the data is located.
The mean is usually referred to as 'the average'.
The mean is the sum of all the values in the data divided by the total number of values in the data.
The mean is calculated for numerical variables. A variable is something in the data that can vary, like:
Note: There are are multiple types of mean values. The most common type of mean is the arithmetic mean.
In this tutorial 'mean' refers to the arithmetic mean.
You can calculate the mean for both the population and the sample. The formulas are the same and uses different symbols to refer to the population mean ( µ) and sample mean (x).
Calculating the population mean (µ) is done with this formula:
The mean can easily be calculated with many programming languages.
Using software and programming to calculate statistics is more common for bigger sets of data, as calculating by hand becomes difficult.
With Python use the NumPy library mean()
method to find the mean of the values 4,11,7,14:
import numpy
values = [4,11,7,14]
x = numpy.mean(values)
print(x)
Use the R mean()
function to find the mean of the values 4,11,7,14:
values <- c(4,7,11,14)
mean(values)