Statistics Calculators

##### Related Content

Programmers and Teachers:

Nikkolas

Tutor and Aerospace Engineer

# Mean Calculator

## Lesson on the Mean

#### Lesson Contents

### What is the Mean?

The mean is the average of a set of numbers. It is a useful number in statistical analysis because it can be used to determine the average value of a data set.

The mean of a set of numbers is found in two simple steps:

1.) Add up all the numbers. We now have the sum of the numbers.

2.) Divide the sum by the amount of numbers in the set.

For example, let’s find the mean of the set of numbers (4, 7, 3, 2, 9).

1.) Adding the numbers up, we get 4 + 7 + 3 + 2 + 9 = 25.

2.) Dividing the sum by the amount of numbers, we get ^{25}⁄_{5} = 5. The mean is 5.

## How the Calculator Works

The calculator on this page is written in the programming language *JavaScript*. The calculator’s *mean* function is run by your internet browser’s JavaScript engine when you click the “calculate” button. This allows it to provide nearly instant results.

The first step in the calculator’s routine is to separate the input numbers by the comma separator, which creates a list of numbers (called an *array* in JavaScript). It then sorts through the list of numbers and looks for decimal numbers. Decimal numbers become floating point numbers, and non-decimal numbers become integers.

Next, it sums the list of numbers. That sum is then divided by the amount of numbers, resulting in the mean. The raw mean value is rounded to the 4th decimal place and displayed on this page as the solution.

Result :

Worksheet 1

Download.pdf

Cheat sheet

Download.pdf