# Root mean square

The root mean square is a type of mean.

Given real numbers $a_1$, $a_2$, …, $a_n$, the root mean square (often abbreviated to RMS) is obtained by calculating the arithmetic mean of the squares of $a_1$, …, $a_n$, and then taking the square root of this: $\sqrt{\frac{a_1^2+a_2^2+\cdots+a_n^2}{n}}$

It is useful when trying to measure the average “size” of numbers, where their sign is unimportant, as the squaring makes all of the numbers non-negative.

The most common case of using the root mean square is when calculating the standard deviation of a set of numbers $x_1$, …, $x_n$. The standard deviation is the root mean square of the deviations of these numbers from the mean, that is, the root mean square of $(x_1-\bar x)$, …, $(x_n-\bar x)$, where $\bar x$ is the mean of $x_1$, …, $x_n$, so $\text{standard deviation}=\sqrt{\frac{(x_1-\bar x)^2+(x_2-\bar x)^2+\cdots+(x_n-\bar x)^2}{n}}.$

The root mean square can also be used for continuous functions, with integration replacing summation. If the function $f(x)$ is defined for $a\le x\le b$, then the root mean square value of $f(x)$ over this interval is $\sqrt{\frac{1}{b-a}\int_a^b (f(x))^2\,dx}.$

The root mean square is an example of a power mean.