# Primary mathematics/Average, median, and mode
## Introduction

There are three primary basic measures of central tendency, and a couple less often used measures, which each, in their own way, tell us what a typical value is for a set of data. After these, some more advanced measures and notation will be introduced.

## Basic Measures
### Mode

The mode is simply the number which occurs most often in a set of numbers. For example, if there are ten 12-year-olds in a class, seven 13-year-olds, and four 14-year-olds, the mode is 12, since there are more 12-year-olds than any other age.

### Average

The straight average, or arithmetic mean, is the sum of all values divided by the number of values. For example, if Natasha scored 91%, 85%, 99% and 77% on a test, the average is (91%+85+99+77)=352 Then divide to arrive at the average for the 4 test. 352/4=88. 88 is the average of the 4 test Natasha took.

### Weighted average

The weighted average or weighted mean, is similar to the straight average, with one exception. When totaling the individual values, each is multiplied by a weighting factor, and the total is then divided by the sum of all the weighting factors. These weighting factors allow us to count some values as "more important" in finding the final value than others.

#### Example

Let's say we had two school classes, one with 20 students, and one with 30 students. The grades in each class on a particular test were:
    Morning class = 62, 67, 71, 74, 76, 77, 78, 79, 79, 80, 80, 81, 81, 82, 83, 84, 86, 89, 93, 98
    Afternoon class = 81, 82, 83, 84, 85, 86, 87, 87, 88, 88, 89, 89, 89, 90, 90, 90, 90, 91, 91, 91, 92, 92, 93, 93, 94, 95, 96, 97, 98, 99
The straight average for the morning class is 80% and the straight average of the afternoon class is 90%. If we were to find a straight average of 80% and 90%, we would get 85% for the mean of the two class averages. However, this is not the average of all the students' grades. To find that, you would need to total all the grades and divide by the total number of students:
    ${\frac {4300\%}{50}}=86\%$
Or, you could find the weighted average of the two class means already calculated, using the number of students in each class as the weighting factor:
    ${\frac {(20)80\%+(30)90\%}{20+30}}=86\%$
Note that if we no longer had the individual students' grades, but only had the class averages and the number of students in each class, we could still find the mean of all the students grades, in this way, by finding the weighted mean of the two class averages.

### Geometric mean

The geometric mean of two numbers is a number midway between two values by multiplication, rather than by addition. For example, the geometric mean of 3 and 12 is 6, because you multiply 3 by the same value (2, in this case) to get 6 as you must multiply by 6 to get 12. The mathematical formula for finding the geometric mean of two values is:
${\sqrt {AB}}$
Where:
* A = one value
* B = the other value
So, in our case:
${\sqrt {3(12)}}={\sqrt {36}}=6$
Note the new notation used to show multiplication. We now can omit the multiplication sign and show simply AB to mean A×B. However, when using numbers, 312 would be confusing, so we put parenthesis around at least one of the numbers to make it clear.
Also, notice that the geometric mean can only be found between two values, not using three or more.

### Applications
#### Mode

In elections, the mode is often called the plurality, and the candidate who gets the most votes wins, even if they don't get the majority (over half) of the votes.

#### Median

Medians tend to be used with unevenly distributed data, such as incomes. Let's say we had ten people, with the following incomes:
The arithmetic mean (straight average) would be $1,045,000/10 or $104,500, giving the impression that, on average, they have high incomes, when only one does. The median would be ($5000+$6000)/2, or $5500, and that more accurately reflects the typical income.

#### Average

The straight average, or arithmetic mean, is perhaps the most often used way to find a "typical value" of a set of data.

#### Weighted average

As previously noted, the weighted average is used to weigh some data points more heavily than others. For instance, if quizzes make up 20%, tests 35%, and a term paper 45% of a final grade, we cannot simply take the arithmetic mean. Also note that since the quizzes make up 20% of the grade, in contrast to the other subjects, it is of least importance when considering all three of them. So, each grade is weighted differently: firstly, take the arithmetic mean of each constituent for both semesters. Suppose the following table makes up our grades in terms of each constituent:
| | Quizzes (grade; g) | Tests (g) | Term Paper (g) |
| S1 | 82 | 90 | 76 |
| S2 | 88 | 91 | 80 |
To take the arithmetic mean of each constituent, add each subject's grade in both semesters and divide by 2. The arithmetic mean of the quizzes would be:
${\frac {82+88}{2}}$
82 + 88 = 170, 170/2 = 85 (arithmetic mean of the quizzes' grades)
Repeating this process for each category, we would get 85, 90.5, and 78 for quizzes, tests, and term papers respectively. Now, we multiply each arithmetic mean by each percentage that makes up each subject. For instance, since quizzes make up 20% of the final grade, we would multiply 85 x 0.2 to get a final percentage of 100%. The percentage we multiply by is the weight value (w). Different weight values imply different importance and consideration. Note that we multiply by 0.2 since 0.2 is equivalent to 20%.
After applying this process three times for each subject, we would get 17%, 31.675%, and 35.1%. Summing these up, we arrive at a terminal weighted average grade of 83.775%. In contrast, the arithmetic mean would yield 84.5%. Note that the difference between the straight average (also known as the arithmetic mean) and the weighted average is minimal; weighted averages have a weight value to offset data points while straight averages lack this feature.
Geometric mean
The geometric mean is used to find a value "midway between two values" where our perception of the change between them isn't linear. Light, sound, and vibrations (as from an earthquake) work this way. For example, a 900 watt light bulb doesn't seem 9 times as bright as a 100 watt bulb. Thus, if you had a 500 watt bulb (the arithmetic average), it wouldn't seem halfway between the two, while a 300 watt light bulb (the geometric mean), would.

## Advanced Measures

In the Advanced Measures unit, all measures will be referred to as: $x_{i}\,\!$,and the mean will be referred to as: ${\bar {x}}\,\!$.
In $x_{i}\,\!$, the $_{i}\,\!$ just differentiates the different values of $x\,\!$, which there could be 10, 20, 30, as many as you want or are given by the problem. Also used in Advanced measures is the sum symbol, which looks like this: $\sum \,\!$. Always, there will be a number on top of it, below it, to the right of it, and sometimes to the left of it, like so: $\sum _{i=1}^{n}x_{i}\,\!$. All that that complicated symbol means is: "The sum ($\sum \,\!$) of $x_{i}\,\!$ ($\sum x_{i}\,\!$) with $i\,\!$ from 1 ($\sum _{i=1}x_{i}\,\!$) to n, which total, makes $\sum _{i=1}^{n}x_{i}\,\!$.
Sounds complicated, right? Wrong. All that long jumble means is that you add up all the values you have. Now, to get the mean, all you have to do is divide that total by however many numbers you have. So you get:
${\bar {x}}={\frac {\sum _{i=1}^{n}x_{i}}{n}}\,\!$
If there is a frequency, then:
${\bar {x}}={\frac {\sum _{i=1}^{n}f_{i}x_{i}}{n}}\,\!$
Now, you can start making a table of all known statistics:
| (not necessary) Index $i\,\!$ | Measure $x_{i}\,\!$ | Frequency $f_{i}\,\!$ | $f_{i}x_{i}\,\!$ |
| | | $n\,\!$= | $\sum _{i=1}^{n}f_{i}x_{i}\,\!$= |
Using $\sum _{i=1}^{n}f_{i}x_{i}\,\!$ and $n\,\!$, you can find ${\bar {x}}\,\!$ with the above formula, and add that to the chart:
| Measure $x_{i}\,\!$ | Frequency $f_{i}\,\!$ | $f_{i}x_{i}\,\!$ | ${\bar {x}}\,\!$ |
| | $n\,\!$= | $\sum _{i=1}^{n}f_{i}x_{i}\,\!$= | |
So, lets put some measures in and see if you can figure it out: Exercise 1 Exercise 2 Exercise 3

### Mean Deviation

The mean deviation is a measure that increases as the scores are farther away from the mean. It is mainly used to tell how dispersed the grades are: whether the mean value is every single value, or whether they jump around a lot and it somehow came to the mean. The formula for the mean variation is:
Mean Variation = ${\frac {\sum _{i=1}^{n}\left\vert x_{i}-{\bar {x}}\right\vert }{n}}\,\!$
(with frequency) ${\frac {\sum _{i=1}^{n}f_{i}\left\vert x_{i}-{\bar {x}}\right\vert }{n}}\,\!$
So, now we need to add new columns to our chart:
| $x_{i}-{\bar {x}}\,\!$ | $\left\vert x_{i}-{\bar {x}}\right\vert \,\!$ | Only with frequencies $f_{i}\left\vert x_{i}-{\bar {x}}\right\vert \,\!$ |
| | Only without frequencies $\sum _{i=1}^{n}\left\vert x_{i}-{\bar {x}}\right\vert \,\!$= | Only with frequencies $\sum _{i=1}^{n}f_{i}\left\vert x_{i}-{\bar {x}}\right\vert \,\!$= |
To Be Continued