The root mean square (RMS) is a measure of magnitude obtained by squaring values, taking their average, and then taking the square root. Unlike an ordinary arithmetic average, it does not allow positive and negative values to cancel. It has the same physical units as the original quantity and is widely used in statistics, electrical engineering, signal analysis, and the measurement of prediction errors.
Definitions
Finite sets of values
For real numbers , with , the root mean square is
For example, the values and have arithmetic mean zero but RMS value
RMS therefore measures magnitude relative to zero, rather than the signed balance of the values.
For nonnegative weights , not all zero, the weighted RMS is
Equal weights recover the ordinary definition. Weights can represent probabilities, frequencies, or durations associated with individual observations.
Functions and time-dependent signals
For a real-valued function whose square is integrable over a finite interval , where ,
The integral replaces the sum, while division by converts the accumulated squared magnitude into an average.
For a periodic signal with period , RMS is normally evaluated over one complete period:
This value is independent of the starting time , provided the signal is periodic and its square is integrable over a period.
For a nonperiodic signal, a long-time RMS may be defined by
when the limit exists. Not every signal has a finite or well-defined long-time RMS, and the averaging interval matters for changing or transient signals.
Random variables
For a real random variable , the probabilistic definition is
where denotes expected value. A finite RMS requires a finite second moment.
For a variable with probability density function ,
A time average from a measured signal and an expectation under a probability model are distinct constructions. Equating them requires additional assumptions about the process; stationarity alone does not generally suffice.
Complex values
For complex numbers, the standard magnitude-based extension uses squared absolute values:
Using instead would generally produce a complex quantity and would not measure magnitude in the same way.
Mathematical properties
Bounds and scaling
For real data,
The middle inequality follows from the Cauchy–Schwarz inequality. The mean absolute value equals RMS precisely when all absolute values are equal. The absolute arithmetic mean equals RMS precisely when all values themselves are equal.
Multiplication by a scalar gives
RMS is always nonnegative and is zero exactly when every value is zero. For functions, zero RMS means the function vanishes almost everywhere on the averaging interval.
RMS is the power mean of order two. For nonnegative data, it is at least as large as the arithmetic mean, with equality only for constant data.
Geometric interpretation
For the vector , RMS is a scaled norm:
Thus it is the Euclidean distance from the vector to the origin, normalized by the square root of the number of coordinates.
For functions, RMS is similarly a normalized norm, connecting it with spaces and inner products. On a fixed data set or averaging interval it satisfies the triangle inequality:
Relationship to mean, variance, and standard deviation
If has mean and variance , then
so
RMS measures magnitude about zero; standard deviation measures spread about the mean. They coincide when the mean is zero.
For finite observations, let the sample mean be
Then
If the sample variance uses Bessel’s correction,
the identity becomes, for ,
The denominator therefore matters when comparing RMS with a reported sample standard deviation.
Electrical and signal applications
Effective voltage and current
RMS has a direct physical interpretation for a fixed ideal resistor of resistance . If the current is , instantaneous power is
and average power over the same interval is
An alternating current therefore has the same RMS value as the constant direct current that would produce the same average heating in that resistor. Likewise,
For a sinusoidal voltage
averaging over a full period gives
This conversion from peak to RMS is waveform-specific. A symmetric square wave taking values has RMS , while a symmetric triangular wave with the same peak magnitude has RMS .
For a general electrical load, average power is
where angle brackets denote averaging. It is not generally equal to : the relationship also depends on phase and waveform.
Constant and fluctuating components
Write a signal as
where is its mean over the averaging interval. Then
The constant component and zero-mean fluctuating component therefore combine through their squared RMS values. Instruments that remove the constant component report a different quantity from instruments that measure total RMS.
More generally,
RMS components add in quadrature only when the cross term vanishes.
Frequency-domain interpretation
For a sufficiently regular periodic signal represented by a Fourier series,
orthogonality of the harmonics gives
This is a form of Parseval’s identity. It explains how the constant component, fundamental frequency, and higher harmonics contribute to total mean square.
Error measurement and model fitting
For predictions and observations , the root mean square error is the RMS of their differences:
It is the square root of mean squared error and has the same units as the measured outcome. It is used in model evaluation, forecasting, and numerical approximation.
For a fixed set of observations, minimizing RMSE is equivalent to minimizing mean squared error or the sum of squared errors, because the square-root function is increasing. This connects RMS error to least-squares fitting.
RMSE is not automatically a residual standard deviation or a standard error. In fitted models, variance estimates may divide residual sums of squares by residual degrees of freedom rather than by the number of observations.
Interpretation and numerical computation
Squaring gives large magnitudes disproportionate influence. Consequently, RMS is sensitive to extreme observations and is not a robust measure of typical magnitude. It also discards sign and does not identify the distribution or waveform: very different data can have identical RMS values.
An RMS measurement depends on the averaging interval, sampling procedure, and frequency range included. Equally averaging irregularly spaced observations does not necessarily approximate a time average; appropriate duration weights or integration may be needed.
Direct computation can encounter overflow or underflow in floating-point arithmetic when values are squared. A scaled expression improves numerical stability. Let
For ,
If , the RMS is zero. The normalized squares are bounded by one, avoiding the overflow that can occur when large original values are squared directly.