RootMeanSquare[list]
gives the root mean square of values in list.
RootMeanSquare[dist]
gives the root mean square of the distribution dist.
RootMeanSquare
RootMeanSquare[list]
gives the root mean square of values in list.
RootMeanSquare[dist]
gives the root mean square of the distribution dist.
Details
- RootMeanSquare measures scale of data or distributions.
- RootMeanSquare[list] gives the square root of the second sample moment.
- For the list {x1,x2,…,xn}, the root mean square is given by
. - RootMeanSquare handles both numerical and symbolic data.
- RootMeanSquare[{{x1,y1,…},{x2,y2,…},…}] gives {RootMeanSquare[{x1,x2,…}],RootMeanSquare[{y1,y2,…}]}.
- RootMeanSquare[dist] is equivalent to Sqrt[Expectation[x2,xdist]].
Examples
open all close allBasic Examples (3)
RootMeanSquare of a list:
RootMeanSquare[ {a, b, c, d}]RootMeanSquare of columns of a matrix:
RootMeanSquare[{{1, 2}, {5, 10}, {5, 2}, {4, 8}}]RootMeanSquare of a parametric distribution:
RootMeanSquare[LogNormalDistribution[0, 1]]Scope (14)
Data (10)
Exact input yields exact output:
RootMeanSquare[{1, 2, 3, 4}]RootMeanSquare[{π, E, 2}]Approximate input yields approximate output:
RootMeanSquare[{1., 2., 3., 4.}]RootMeanSquare[N[{1, 2, 3, 4}, 30]]RootMeanSquare for a matrix gives columnwise means:
RootMeanSquare[(| | |
| --- | --- |
| a11 | a12 |
| a21 | a22 |)]RootMeanSquare[RandomReal[1, 10 ^ 7]]RootMeanSquare[RandomReal[1, {10 ^ 6, 3}]]SparseArray data can be used just like dense arrays:
RootMeanSquare[SparseArray[{{1} -> 1, {2} -> 7}]]RootMeanSquare[SparseArray[{{1, 1} -> 1, {2, 1} -> 2, {2, 2} -> 3}]]Compute results for a SparseArray:
sp = SparseArray[{{i_, i_} :> i, {i_, j_} /; j == i + 1 :> i - 1}, {100, 10}]RootMeanSquare[sp]RootMeanSquare for WeightedData:
RootMeanSquare[WeightedData[{1, 2, 3}, {Subscript[w, 1], Subscript[w, 2], Subscript[w, 3]}]]data = {8, 3, 5, 4, 9, 1, 4, 2, 2, 3};
weights = {0.15, 0.09, 0.12, 0.10, 0.16, 0.3, 0.11, 0.08, 0.08, 0.09};RootMeanSquare[WeightedData[data, weights]]RootMeanSquare for EventData:
e = {1.0, 2.1, 3.2, 4.5, 5.7};
ci = {0, 0, 0, 1, 0};RootMeanSquare[EventData[e, ci]]RootMeanSquare for TimeSeries:
RootMeanSquare[TemporalData[TimeSeries, {{{2.3, 1.2, 6.7, 5.8, 7.1, 4.6}}, {{0, 5, 1}}, 1, {"Discrete", 1},
{"Discrete", 1}, 1, {}}, False, 10.]]The root mean square depends only on the values:
RootMeanSquare[TemporalData[TimeSeries, {{{2.3, 1.2, 6.7, 5.8, 7.1, 4.6}}, {{0, 5, 1}}, 1, {"Discrete", 1},
{"Discrete", 1}, 1, {}}, False, 10.]["Values"]]RootMeanSquare for data involving quantities:
data = Quantity[RandomReal[1, 6], "Meters"]RootMeanSquare[data]Distributions and Processes (4)
Find the RootMeanSquare for univariate distributions:
RootMeanSquare[BinomialDistribution[n, p]]RootMeanSquare[NormalDistribution[μ, σ]]RootMeanSquare[MultinomialDistribution[n, {Subscript[m, 1], Subscript[m, 2]}]]RootMeanSquare[BinormalDistribution[{Subscript[μ, 1], Subscript[μ, 2]}, {σ1, σ2}, ρ]]RootMeanSquare for derived distributions:
RootMeanSquare[TransformedDistribution[x^2, xNormalDistribution[μ, σ]]]RootMeanSquare[ProbabilityDistribution[(Sqrt[2] / π)(1 / (1 + (x - 2)^4)), {x, -∞, ∞}]]data = RandomVariate[NormalDistribution[], 10 ^ 3];RootMeanSquare[HistogramDistribution[data]]RootMeanSquare for distributions with quantities:
RootMeanSquare[QuantityDistribution[MaxwellDistribution[σ], "Meters" / "Seconds"]]RootMeanSquare[EmpiricalDistribution[QuantityArray[RandomChoice[{0, 5}, 1000], "Volts"]]]RootMeanSquare for a random process:
RootMeanSquare[BrownianBridgeProcess[a, b][t]]Plot[Evaluate[% /. {a -> 3, b -> 5}], {t, 3, 5}, PlotRange -> All]Applications (3)
Root mean square error for a linear fit:
data = {{1, 2.9}, {2, 5.0}, {3, 7.1}, {4, 8.9}, {5, 10.9}, {6, 13.1}, {7, 14.9}, {8, 16.8}, {9, 18.5}, {10, 22.2}};f[x_] = Fit[data, {1, x}, x]RootMeanSquare[data[[All, 2]] - Map[f, data[[All, 1]]]]f[t_] := Sin[5 t] + Cos[7t] / 12ts = TimeSeries[Table[f[t], {t, 0, 2Pi, 0.01}]]ListPlot[ts]Compute the root mean square value of the sample:
RootMeanSquare[ts]Sqrt[Integrate[f[t] ^ 2, {t, 0, 2Pi}] / (2Pi)]N[%]Find the root mean square value for the heights of children in a class:
heights = Quantity[{134, 143, 131, 140, 145, 136, 131, 136, 143, 136, 133, 145, 147,
150, 150, 146, 137, 143, 132, 142, 145, 136, 144, 135, 141}, "Centimeters"];ListPlot[heights, Filling -> Axis, AxesLabel -> Automatic](rms = RootMeanSquare[heights])//NListPlot[{heights, {{0, rms}, {Length[heights], rms}}}, Joined -> {False, True}, Filling -> Axis, AxesLabel -> Automatic]Properties & Relations (7)
RootMeanSquare is the square root of the Mean of the data squared:
data = RandomReal[10, 10];Sqrt[Mean[data ^ 2]]RootMeanSquare[data]RootMeanSquare is equivalent to a scaled Norm:
data = RandomReal[10, 10];Norm[data] / Sqrt[Length[data]]RootMeanSquare[data]RootMeanSquare of deviations is equivalent to a scaled StandardDeviation:
data = RandomReal[10, 10];StandardDeviation[data]Sqrt[(Length[data] - 1) / Length[data]]RootMeanSquare[data - Mean[data]]RootMeanSquare of deviations is the square root of a CentralMoment:
data = RandomReal[10, 10];CentralMoment[data, 2]//SqrtRootMeanSquare[data - Mean[data]]RootMeanSquare is a scaled EuclideanDistance from the Mean:
data = RandomReal[10, 10];mean = Mean[data]RootMeanSquare[data - mean]EuclideanDistance[data, mean] / Sqrt[Length[data]]RootMeanSquare of a random variable is the square root of an Expectation:
dist = GammaDistribution[α, β];Sqrt[Expectation[x ^ 2, xdist]]RootMeanSquare[dist]RootMeanSquare is a measure of scale:
𝒟 = NormalDistribution[a, σ];RootMeanSquare[𝒟]Table[Plot[PDF[𝒟 /. {a -> 1}, x], {x, -4, 6}, PlotRange -> {0, 0.4}, Filling -> Axis, Ticks -> {Automatic, None}, PlotLabel -> Row[{"SuperscriptBox[σ, 2] = ", σ^2}]], {σ, {1, 1.5, 2}}]Tech Notes
Related Guides
Text
Wolfram Research (2007), RootMeanSquare, Wolfram Language function, https://reference.wolfram.com/language/ref/RootMeanSquare.html (updated 2017).
CMS
Wolfram Language. 2007. "RootMeanSquare." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2017. https://reference.wolfram.com/language/ref/RootMeanSquare.html.
APA
Wolfram Language. (2007). RootMeanSquare. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/RootMeanSquare.html
BibTeX
@misc{reference.wolfram_2026_rootmeansquare, author="Wolfram Research", title="{RootMeanSquare}", year="2017", howpublished="\url{https://reference.wolfram.com/language/ref/RootMeanSquare.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_rootmeansquare, organization={Wolfram Research}, title={RootMeanSquare}, year={2017}, url={https://reference.wolfram.com/language/ref/RootMeanSquare.html}, note=[Accessed: 13-June-2026]}