St · Statistics & Probability

What Is Wald’s Second Equation?

Updated 13 October 2026

At a glance

  1. 1. Center each increment

    Subtract the common mean from each independent, identically distributed increment.

  2. 2. Check the stopping rule

    The stopping time must depend only on information available so far, and its expected value must be finite.

  3. 3. Apply the identity

    The expected squared centered stopped sum equals the increment variance multiplied by the expected stopping time.

  4. 4. Avoid the common mix-up

    The identity is not generally a formula for the uncentered second moment of the stopped sum.

Wald’s second equation, also called Wald’s second identity, relates the variability of a stopped sum to the expected number of terms. It is useful when a process accumulates independent increments and stops according to what has happened so far.

The key is to center each increment first. The identity applies to the sum after subtracting the mean contribution associated with the stopping time; it does not usually give the uncentered second moment of the sum.

The equation and its assumptions

Let X1,X2,…X_1,X_2,\ldots be independent and identically distributed random variables with mean μ\mu and finite variance σ2\sigma^2. Define the sum of the first nn terms by

Sn=∑i=1nXi.S_n = \sum_{i=1}^{n} X_i.

Let NN be a nonnegative integer-valued stopping time: deciding whether to continue after step nn can use the observations through step nn, but not future observations. Assume E[N]<∞\mathbb{E}[N] < \infty. Then Wald’s second equation is

E[(SN−μN)2]=σ2 E[N].\mathbb{E}\left[(S_N - \mu N)^2\right] = \sigma^2\,\mathbb{E}[N].

Equivalently, if Yi=Xi−μY_i=X_i-\mu are the centered increments, the equation says

E[(∑i=1NYi)2]=σ2 E[N].\mathbb{E}\left[\left(\sum_{i=1}^{N}Y_i\right)^2\right] = \sigma^2\,\mathbb{E}[N].

The stopping-time condition matters. A rule that looks ahead at future increments can select unusually large or small terms, breaking the identity. More generally, the same result holds when each centered increment has conditional mean zero and conditional variance σ2\sigma^2 given the information available before that increment.

Why the identity holds

Write Yi=Xi−μY_i=X_i-\mu. The stopped centered sum can be written as

SN−μN=∑i=1∞1{N≥i}Yi,S_N-\mu N = \sum_{i=1}^{\infty} \mathbf{1}_{\{N\ge i\}}Y_i,

where 1{N≥i}\mathbf{1}_{\{N\ge i\}} is 1 if the process takes at least ii steps and 0 otherwise. The event {N≥i}\{N\ge i\} is determined before observing XiX_i.

When the square of this sum is expanded, distinct-increment terms have expectation zero. For i<ji<j, whether the process reaches step jj is already known before YjY_j is observed, and YjY_j has conditional mean zero. The diagonal terms contribute

E[1{N≥i}Yi2]=σ2 P(N≥i).\mathbb{E}\left[\mathbf{1}_{\{N\ge i\}}Y_i^2\right] = \sigma^2\,\mathbb{P}(N\ge i).

Adding these contributions gives

E[(SN−μN)2]=σ2∑i=1∞P(N≥i)=σ2 E[N].\mathbb{E}[(S_N-\mu N)^2] = \sigma^2\sum_{i=1}^{\infty}\mathbb{P}(N\ge i) = \sigma^2\,\mathbb{E}[N].

The last equality is the tail-sum formula for a nonnegative integer-valued random variable. Finite E[N]\mathbb{E}[N] ensures the sum is finite and the stopped centered sum is well-defined in mean square.

Worked example: stop at the first head

Toss a fair coin repeatedly. Let Xi=1X_i=1 for heads and Xi=−1X_i=-1 for tails, and stop at the first head. Then μ=0\mu=0 and σ2=1\sigma^2=1. The number of tosses NN has a geometric distribution with success probability 1/21/2, so

E[N]=2,Var⁡(N)=2.\mathbb{E}[N]=2, \qquad \operatorname{Var}(N)=2.

If the first head occurs on toss NN, the preceding N−1N-1 tosses are tails. Thus SN=1−(N−1)=2−NS_N=1-(N-1)=2-N. Since μ=0\mu=0, the centered stopped sum is just SNS_N. Therefore

E[(SN−μN)2]=E[(2−N)2]=Var⁡(N)+(2−E[N])2=2.\mathbb{E}[(S_N-\mu N)^2] = \mathbb{E}[(2-N)^2] = \operatorname{Var}(N)+(2-\mathbb{E}[N])^2 =2.

Wald’s second equation gives the same result: σ2E[N]=1⋅2=2\sigma^2\mathbb{E}[N]=1\cdot 2=2.

Why it is not usually a formula for E[SN2]\mathbb{E}[S_N^2]

Since SN=μN+(SN−μN)S_N=\mu N+(S_N-\mu N), expanding the square gives

E[SN2]=μ2E[N2]+2μ E[N(SN−μN)]+σ2E[N],\mathbb{E}[S_N^2] = \mu^2\mathbb{E}[N^2] +2\mu\,\mathbb{E}[N(S_N-\mu N)] +\sigma^2\mathbb{E}[N],

when these moments exist. The middle term need not be zero: the stopping time and the centered stopped sum can be dependent. So replacing E[(SN−μN)2]\mathbb{E}[(S_N-\mu N)^2] with E[SN2]\mathbb{E}[S_N^2] is generally incorrect.

For a fixed number N=nN=n of terms, the identity reduces to the familiar variance formula Var⁡(Sn)=nσ2\operatorname{Var}(S_n)=n\sigma^2. If NN is random but independent of all the increments, additional simplifications may be possible; do not assume them for a data-dependent stopping rule.

Common mistakes

  • Using the uncentered sum: The left side is (SN−μN)2(S_N-\mu N)^2, not generally SN2S_N^2.
  • Allowing a look-ahead rule: NN must be a stopping time; it cannot depend on increments that have not yet been observed.
  • Ignoring finiteness: The standard version assumes finite increment variance and E[N]<∞\mathbb{E}[N]<\infty.
  • Confusing the two Wald equations: Wald’s first equation concerns E[SN]=μE[N]\mathbb{E}[S_N]=\mu\mathbb{E}[N] under suitable conditions. Wald’s second equation concerns the mean square of the centered stopped sum.

References

  1. Abraham Wald, Sequential Analysis
  2. Rick Durrett, Probability: Theory and Examples

Spotted an error? Send a correction. Read how we write and check articles in our editorial policy.