# Wald's equation

In probability theory, **Wald's equation**, **Wald's identity**^{[1]} or **Wald's lemma**^{[2]} is an important identity that simplifies the calculation of the expected value of the sum of a random number of random quantities. In its simplest form, it relates the expectation of a sum of randomly many finite-mean, independent and identically distributed random variables to the expected number of terms in the sum and the random variables' common expectation under the condition that the number of terms in the sum is independent of the summands.

The equation is named after the mathematician Abraham Wald. An identity for the second moment is given by the Blackwell–Girshick equation.{{ safesubst:#invoke:Unsubst||date=__DATE__ |$B=
{{#invoke:Category handler|main}}{{#invoke:Category handler|main}}^{[citation needed]}
}}

## Basic version

Let (*X _{n}*)

_{n∈ℕ}be a sequence of real-valued, independent and identically distributed random variables and let

*N*be a nonnegative integer-value random variable that is independent of the sequence (

*X*)

_{n}_{n∈ℕ}. Suppose that

*N*and the

*X*have finite expectations. Then

_{n}### Example

Roll a six-sided die. Take the number on the die (call it *N*) and roll that number of six-sided dice to get the numbers *X*_{1}, . . . , *X _{N}*, and add up their values. By Wald's equation, the resulting value on average is

## General version

Let (*X _{n}*)

_{n∈ℕ}be an infinite sequence of real-valued random variables and let

*N*be a nonnegative integer-valued random variable. Assume that

- 1. (
*X*)_{n}_{n∈ℕ}are all integrable (finite-mean) random variables, - 2. E[
*X*1_{n}_{{N ≥ n}}] = E[*X*] P(_{n}*N*≥*n*) for every natural number*n*, and - 3. the infinite series satisfies

Then the random sums

are integrable and

If, in addition,

- 4. (
*X*)_{n}_{n∈ℕ}all have the same expectation, and - 5.
*N*has finite expectation,

then

**Remark:** Usually, the name *Wald's equation* refers to this last equality.

## Discussion of assumptions

Clearly, assumption (Template:EquationNote) is needed to formulate assumption (Template:EquationNote) and Wald's equation. Assumption (Template:EquationNote) controls the amount of dependence allowed between the sequence (*X _{n}*)

_{n∈ℕ}and the number

*N*of terms, see the counterexample below for the necessity. Assumption (Template:EquationNote) is of more technical nature, implying absolute convergence and therefore allowing arbitrary rearrangement of an infinite series in the proof.

If assumption (Template:EquationNote) is satisfied, then assumption (Template:EquationNote) can be strengthened to the simpler condition

- 6. there exists a real constant
*C*such that E[|*X*| 1_{n}_{{N ≥ n}}] ≤*C*P(*N*≥*n*) for all natural numbers*n*.

Indeed, using assumption (Template:EquationNote),

and the last series equals the expectation of *N* ^{[Proof]}, which is finite by assumption (Template:EquationNote). Therefore, (Template:EquationNote) and (Template:EquationNote) imply assumption (Template:EquationNote).

Assume in addition to (Template:EquationNote) and (Template:EquationNote) that

- 7.
*N*is independent of the sequence (*X*)_{n}_{n∈ℕ}and - 8. there exists a constant
*C*such that E[|*X*|] ≤_{n}*C*for all natural numbers*n*.

Then all the assumptions (Template:EquationNote), (Template:EquationNote), (Template:EquationNote) and (Template:EquationNote), hence also (Template:EquationNote) are satisfied. In particular, the conditions (Template:EquationNote) and (Template:EquationNote) are satisfied if

- 9. the random variables (
*X*)_{n}_{n∈ℕ}all have the same distribution.

Note that the random variables of the sequence (*X _{n}*)

_{n∈ℕ}don't need to be independent.

The interesting point is to admit some dependence between the random number *N* of terms and the sequence (*X _{n}*)

_{n∈ℕ}. A standard version is to assume (Template:EquationNote), (Template:EquationNote), (Template:EquationNote) and the existence of a filtration (Template:Mathcal

_{n})

_{n∈ℕ0}such that

- 10.
*N*is a stopping time with respect to the filtration, and - 11.
*X*and Template:Mathcal_{n}_{n–1}are independent for every*n*∈ ℕ.

Then (Template:EquationNote) implies that the event {*N* ≥ *n*} = {*N* ≤ *n* – 1}^{c} is in Template:Mathcal_{n–1}, hence by (Template:EquationNote) independent of *X _{n}*. This implies (Template:EquationNote), and together with (Template:EquationNote) it implies (Template:EquationNote).

For convenience (see the proof below using the optional stopping theorem) and to specify the relation of the sequence (*X _{n}*)

_{n∈ℕ}and the filtration (Template:Mathcal

_{n})

_{n∈ℕ0}, the following additional assumption is often imposed:

- 12. the sequence (
*X*)_{n}_{n∈ℕ}is adapted to the filtration (Template:Mathcal_{n})_{n∈ℕ}, meaning the*X*is Template:Mathcal_{n}_{n}-measurable for every*n*∈ ℕ.

Note that (Template:EquationNote) and (Template:EquationNote) together imply that the random variables (*X _{n}*)

_{n∈ℕ}are independent.

## Application

An application is in actuarial science when considering the total claim amount follows a compound Poisson process

within a certain time period, say one year, arising from a random number *N* of individual insurance claims, whose sizes are described by the random variables (*X _{n}*)

_{n∈ℕ}. Under the above assumptions, Wald's equation can be used to calculate the expected total claim amount when information about the average claim number per year and the average claim size is available. Under stronger assumptions and with more information about the underlying distributions, Panjer's recursion can be used to calculate the distribution of

*S*.

_{N}## Examples

### Example with dependent terms

Let *N* be an integrable, ℕ_{0}-valued random variable, which is independent of the integrable, real-valued random variable *Z* with E[*Z*] = 0. Define *X _{n}* = (–1)

^{n}

*Z*for all

*n*∈ ℕ. Then assumptions (Template:EquationNote), (Template:EquationNote), (Template:EquationNote), and (Template:EquationNote) with

*C*:= E[|

*Z*|] are satisfied, hence also (Template:EquationNote) and (Template:EquationNote), and Wald's equation applies. If the distribution of

*Z*is not symmetric, then (Template:EquationNote) does not hold. Note that, when

*Z*is not almost surely equal to the zero random variable, then (Template:EquationNote) and (Template:EquationNote) cannot hold simultaneously for any filtration (Template:Mathcal

_{n})

_{n∈ℕ}, because

*Z*cannot be independent of itself as E[

*Z*

^{2}] = (E[

*Z*])

^{2}= 0 is impossible.

### Example where the number of terms depends on the sequence

Let (*X _{n}*)

_{n∈ℕ}be a sequence of independent, symmetric, and {–1, +1}-valued random variables. For every

*n*∈ ℕ let Template:Mathcal

_{n}be the σ-algebra generated by

*X*

_{1}, . . . ,

*X*and define

_{n}*N*=

*n*when

*X*is the first random variable taking the value +1. Note that P(

_{n}*N*=

*n*) = 1/2

^{n}, hence E[

*N*] < ∞ by the ratio test. The assumptions (Template:EquationNote), (Template:EquationNote) and (Template:EquationNote), hence (Template:EquationNote) and (Template:EquationNote) with

*C*= 1, (Template:EquationNote), (Template:EquationNote), and (Template:EquationNote) hold, hence also (Template:EquationNote), and (Template:EquationNote) and Wald's equation applies. However, (Template:EquationNote) does not hold, because

*N*is defined in terms of the sequence (

*X*)

_{n}_{n∈ℕ}. Intuitively, one might expect to have E[

*S*] > 0 in this example, because the summation stops right after a one, thereby apparently creating a positive bias. However, Wald's equation shows that this intuition is misleading.

_{N}## Counterexamples

### A counterexample illustrating the necessity of assumption (Template:EquationNote)

Consider a sequence (*X _{n}*)

_{n∈ℕ}of i.i.d. random variables, taking each of the two values 0 and 1 with probability ½ (actually, only

*X*

_{1}is needed in the following). Define

*N*= 1 –

*X*

_{1}. Then

*S*is identically equal to zero, hence E[

_{N}*S*] = 0, but E[

_{N}*X*

_{1}] = ½ and E[

*N*] = ½ and therefore Wald's equation does not hold. Indeed, the assumptions (Template:EquationNote), (Template:EquationNote), (Template:EquationNote) and (Template:EquationNote) are satisfied, however, the equation in assumption (Template:EquationNote) holds for all

*n*∈ ℕ except for

*n*= 1.

### A counterexample illustrating the necessity of assumption (Template:EquationNote)

Very similar to the second example above, let (*X _{n}*)

_{n∈ℕ}be a sequence of independent, symmetric random variables, where

*X*takes each of the values 2

_{n}^{n}and –2

^{n}with probability ½. Let

*N*be the first

*n*∈ ℕ such that

*X*= 2

_{n}^{n}. Then, as above,

*N*has finite expectation, hence assumption (Template:EquationNote) holds. Since E[

*X*] = 0 for all

_{n}*n*∈ ℕ, assumptions (Template:EquationNote) and (Template:EquationNote) hold. However, since

*S*= 1 almost surely, Wald's equation cannot hold.

_{N}Since *N* is a stopping time with respect to the filtration generated by (*X _{n}*)

_{n∈ℕ}, assumption (Template:EquationNote) holds, see above. Therefore, only assumption (Template:EquationNote) can fail, and indeed, since

and therefore P(*N* ≥ *n*) = 1/2^{n–1} for every *n* ∈ ℕ, it follows that

## A proof using the optional stopping theorem

Assume (Template:EquationNote), (Template:EquationNote), (Template:EquationNote), (Template:EquationNote), (Template:EquationNote) and (Template:EquationNote). Using assumption (Template:EquationNote), define the sequence of random variables

Assumption (Template:EquationNote) implies that the conditional expectation of *X _{n}* given Template:Mathcal

_{n–1}equals E[

*X*] almost surely for every

_{n}*n*∈ ℕ, hence (

*M*)

_{n}_{n∈ℕ0}is a martingale with respect to the filtration (Template:Mathcal

_{n})

_{n∈ℕ0}by assumption (Template:EquationNote). Assumptions (Template:EquationNote), (Template:EquationNote) and (Template:EquationNote) make sure that we can apply the optional stopping theorem, hence

*M*=

_{N}*S*–

_{N}*T*is integrable and Template:NumBlk

_{N}Due to assumption (Template:EquationNote),

and due to assumption (Template:EquationNote) this upper bound is integrable. Hence we can add the expectation of *T _{N}* to both sides of Equation (Template:EquationNote) and obtain by linearity

**Remark:** Note that this proof does not cover the above example with dependent terms.

## General proof

This proof uses only Lebesgue's monotone and dominated convergence theorems. We prove the statement as given above in three steps.

### Step 1: Integrability of the random sum *S*_{N}

_{N}

We first show that the random sum *S _{N}* is integrable. Define the partial sums

Since *N* takes its values in ℕ_{0} and since *S*_{0} = 0, it follows that

The Lebesgue monotone convergence theorem implies that

By the triangle inequality,

Using this upper estimate and changing the order of summation (which is permitted because all terms are non-negative), we obtain

where the second inequality follows using the monotone convergence theorem. By assumption (Template:EquationNote), the infinite sequence on the right-hand side of (Template:EquationNote) converges, hence *S _{N}* is integrable.

### Step 2: Integrability of the random sum *T*_{N}

_{N}

We now show that the random sum *T _{N}* is integrable. Define the partial sums

of real numbers. Since *N* takes its values in ℕ_{0} and since *T*_{0} = 0, it follows that

The Lebesgue monotone convergence theorem implies that

By the triangle inequality,

Using this upper estimate and changing the order of summation (which is permitted because all terms are non-negative), we obtain

By assumption (Template:EquationNote),

Substituting this into (Template:EquationNote) yields

which is finite by assumption (Template:EquationNote), hence *T _{N}* is integrable.

### Step 3: Proof of the identity

To prove Wald's equation, we essentially go through the same steps again without the absolute value, making use of the integrability of the random sums *S _{N}* and

*T*in order to show that they have the same expectation. Using the dominated convergence theorem with dominating random variable |

_{N}*S*| and the definition of the partial sum

_{N}*S*given in (Template:EquationNote), it follows that

_{i}Due to the absolute convergence proved in (Template:EquationNote) above using assumption (Template:EquationNote), we may rearrange the summation and obtain that

where we used assumption (Template:EquationNote) and the dominated convergence theorem with dominating random variable |*X _{n}*| for the second equality. Due to assumption (Template:EquationNote) and the σ-additivity of the probability measure,

Substituting this result into the previous equation, rearranging the summation (which is permitted due to absolute convergence, see (Template:EquationNote) above), using linearity of expectation and the definition of the partial sum *T _{i}* of expectations given in (Template:EquationNote),

By using dominated convergence again with dominating random variable |*T _{N}*|,

If assumptions (Template:EquationNote) and (Template:EquationNote) are satisfied, then by linearity of expectation,

This completes the proof.

## Further generalizations

- Wald's equation can be transferred to
**R**^{d}-valued random variables (*X*)_{n}_{n∈ℕ}by applying the one-dimensional version to every component. - If (
*X*)_{n}_{n∈ℕ}are Bochner-integrable random variables taking values in a Banach space, then the general proof above can be adjusted accordingly.

## See also

## Notes

## References

- {{#invoke:Citation/CS1|citation

|CitationClass=journal }}

- {{#invoke:Citation/CS1|citation

|CitationClass=journal }}

- {{#invoke:Citation/CS1|citation

|CitationClass=journal }}