###### Mean, Median, and Mode **Pythagorean Mean** There are three main types of means. 1. Arithmetic Mean 2. Geometric Mean 3. Harmonic Mean **Arithmetic Mean (AM)** is best used when the data can be summed up. For instance, If I earn 5, 7, 8, and 10 dollars each day for four days, I will have earned 30 dollars. Because this can be expressed by addition, the arithmetic mean is the right choice for averaging, and we get an average of $7.50 per day. $\Large AM(x_1,\ ...,\ x_n) = \frac{x_1\ ...\ x_n}{n}$ **Geometric Mean (GM)** is best used with ratio scales, such as growth rates of the human population or interest rates of a financial investment over time. It is so called because exponential growth can also be called geometric growth.  It also applies to benchmarking, where it is particularly useful for computing means of speedup ratios: since the mean of 0.5x (half as fast) and 2x (twice as fast) will be 1. $\Large GM(x_1,\ ...,\ x_n) = \sqrt[n]{\prod_{i=1}^{n} x_i} = \sqrt[n]{a_1 a_2 ⋯ a_n}$ What this equation tells us is that the geometric mean is equal to the $n$th root of the product of   numbers.  Suppose for example a person invests 1000 dollars in shares and achieves annual returns of +10%, -12%, +90%, -30% and +25% over 5 consecutive years to give a final investment value of 1,609 dollars. The arithmetic mean of the annual percent changes is 16.6%. However, this value is unrepresentative, i.e. it would be incorrect to do this. If the initial investment grew by 16.6% per annum, it would be worth 2155 dollars after 5 years. To find the true mean, you would use the geometric mean equation as follows: Make sure to convert your percentages to decimal values first: $\Large = \sqrt[5]{1.1 \times 0.88 \times 1.9 \times 0.7 \times 1.25}$ Then you can convert back to a percentage after: $\Large = 1.099 \quad = 110 \%$ total change from initial investment Thus, the average yearly interest is 10%. **Harmonic Mean (HM)** is best used when the data represents things like speeds, densities, or cost-efficiency, and the reciprocal of values is more meaningful. It is so called because the harmonic series, an infinite series of sums, also uses reciprocals. $\Large HM(x_1,\ ...,\ x_n) = \frac{n}{\sum^n_{i=1} \frac{1}{x_i}} = \frac{n}{\frac{1}{x_1} + ⋯ + \frac{1}{x_n}}$ Example problem: A cyclist travels from City A to City B at an average speed of 20 km/h. On the return trip from City B to City A, the cyclist travels at an average speed of 30 km/h. If the distance between City A and City B is the same both ways, what is the cyclist's average speed for the entire trip? First, plug the values into the formula $\Large = \frac{n}{\frac{1}{20} + \frac{1}{30}}$ And then solve to get the average speed: $\Large = 24$ km/h **Quadratic Mean (QM)** is not a Pythagorean Mean, but it is here for comparison. The quadratic mean, also known as the root mean square (RMS), is primarily used when dealing with data that involves both positive and negative values, or when the magnitude of numbers is more important than their sign. It's especially useful in situations where the squares of values are significant, such as in physical measurements. Note that the quadratic mean is similar to Standard Deviation. $\Large QM(x_1,\ ...,\ x_n) = \sqrt{\frac{1}{n} \sum^n_{i=1} x_i^2} = \sqrt{\frac{1}{n} \left( x_1^2 + ⋯ + x_n^2 \right)}$ Example problem: An electrical engineer is measuring the voltage fluctuations in a circuit over time. The voltage at five different times is recorded as: 3V, -5V, 2V, -4V, and 6V. What is the effective voltage of the circuit, which is the RMS (root mean square) value of the voltage readings? First I can plug the values into the formula: $\Large = \sqrt{\frac{1}{5} \left( 3^2 + -5^2 + 2^2 + -4^2 + 6^2\right)}$ Then I can solve to get the average effective voltage of a circuit: $\Large = \frac{2 \sqrt{10}}{5} \quad = 1.26\ V$