secondmoment
Second moment is a term used in mathematics, statistics, and related fields to denote the expected value of the square of a random variable. Formally, if X is a real-valued random variable with finite second moment, the second moment about the origin is E[X^2]. The second moment about the mean, or the second central moment, is Var(X) = E[(X − E[X])^2] = E[X^2] − (E[X])^2. These two moments are related by E[X^2] = Var(X) + (E[X])^2.
For discrete random variables, E[X^2] = sum_i x_i^2 p_i, where p_i are the probabilities of values x_i.
The second moment plays a central role in measuring the scale of a random variable in the
In many distributions, explicit formulas exist: for a normal distribution N(μ, σ^2), E[X^2] = σ^2 + μ^2. The