Tutorials › Stochastic Processes › Doob Martingales in Sampling Without Replacement

Martingales: Definitions and Examples · Tutorial 711 of 994

Doob Martingales in Sampling Without Replacement

Learn how revealing a random ordering turns a sample total into a martingale, and compute its conditional expectations and updates exactly.

Advanced 10 min read

What You'll Learn

  • Define the filtration generated by the successive draws from a finite population.
  • Derive the conditional expected total of a fixed-size sample after each reveal.
  • Prove that these conditional expectations form a martingale.
  • Compute the one-step update from the next draw and the remaining population mean.
  • Handle the boundary cases where the sample is empty or is the whole population.
  • Identify and correct a common denominator error in sampling without replacement.

From a Random Sample to a Martingale

Suppose a finite population has known values, but its order is random, and we plan to take a sample of fixed size without replacement. Before any draws, the sample total is uncertain. As values are revealed, its conditional expected total changes. The sequence of these expectations is a Doob martingale: each value is the best prediction of the final sample total given the information revealed so far.

Let the population consist of \(n\) labelled individuals with fixed real values \(a_1,\dots,a_n\), and let \(T=\sum_{i=1}^n a_i\). Labels distinguish individuals even if some have equal values. Take as probability space \((\Omega,\mathcal{F},\mathbb{P})\), where \(\Omega\) is the set of all \(n!\) orderings of the individuals, \(\mathcal{F}\) is the collection of all subsets of \(\Omega\), and \(\mathbb{P}\) assigns probability \(1/n!\) to each ordering. Let \(X_k\) be the value of the individual in position \(k\), and let \(\mathcal{F}_k=\sigma(X_1,\dots,X_k)\), with \(\mathcal{F}_0=\{\varnothing,\Omega\}\). Thus \(\mathcal{F}_k\) records the first \(k\) revealed values. Fix a sample size \(r\) with \(1\le r<n\), and let \(Y=\sum_{j=1}^r X_j\) be the final sample total.

Definition: The Doob martingale of the sample total, for \(0\le k\le r\), is \(M_k=\mathbb{E}[Y\mid\mathcal{F}_k]\). It is the conditional expected final total after \(k\) draws, given the values revealed so far.

The Conditional-Expectation Formula

Write \(S_k=\sum_{j=1}^k X_j\), with \(S_0=0\). After \(k\) draws, there are \(n-k\) individuals left, their total value is \(T-S_k\), and \(r-k\) of them will be included in the sample. By symmetry, each remaining individual has the same conditional probability of being among those \(r-k\) selected. This gives a direct formula for \(M_k\).

Theorem: For \(1\le r<n\) and \(0\le k\le r\), the conditional expected sample total is $$ M_k=S_k+\frac{r-k}{n-k}(T-S_k). $$ For \(0\le k<r\), its one-step update is $$ M_{k+1}-M_k=\frac{n-r}{n-k-1}\left(X_{k+1}-\frac{T-S_k}{n-k}\right). $$ In particular, \((M_k)_{0\le k\le r}\) is a martingale with respect to \((\mathcal{F}_k)_{0\le k\le r}\), and \(M_r=Y\).

Proof. Fix \(k\) and any possible history of the first \(k\) labelled individuals. Conditional on that history, every ordering of the remaining \(n-k\) individuals is equally likely. In particular, the set of the next \(r-k\) individuals is uniformly distributed over all subsets of size \(r-k\) from the remaining population. For any particular remaining individual, the fraction of these subsets that contain it is $$ \frac{\binom{n-k-1}{r-k-1}}{\binom{n-k}{r-k}}=\frac{r-k}{n-k}. $$ Therefore the expected sum of the values in the next \(r-k\) positions is \(\frac{r-k}{n-k}(T-S_k)\). Adding the already observed total \(S_k\) proves the formula for \(M_k\). At \(k=r\), the coefficient is zero, so \(M_r=S_r=Y\).

To obtain the update, put \(N=n-k\), \(a=r-k\), \(R=T-S_k\), and \(x=X_{k+1}\). Since \(k<r<n\), both \(N-1\) and \(a-1\) are defined, and \(N-1>0\). The formula at the two successive stages gives $$ M_k=S_k+\frac{a}{N}R,\qquad M_{k+1}=S_k+x+\frac{a-1}{N-1}(R-x). $$ Subtracting, the coefficient of \(x\) is \(1-\frac{a-1}{N-1}=\frac{N-a}{N-1}\), while the coefficient of \(R\) is \(\frac{a-1}{N-1}-\frac{a}{N}=-\frac{N-a}{N(N-1)}\). Since \(N-a=n-r\), this yields the stated update.

It remains to check the martingale condition. Conditional on \(\mathcal{F}_k\), each of the \(n-k\) remaining individuals is equally likely to be drawn next. Hence $$ \mathbb{E}[X_{k+1}\mid\mathcal{F}_k]=\frac{T-S_k}{n-k}. $$ The update formula therefore gives \(\mathbb{E}[M_{k+1}-M_k\mid\mathcal{F}_k]=0\), or equivalently \(\mathbb{E}[M_{k+1}\mid\mathcal{F}_k]=M_k\). Each \(M_k\) is integrable because the population is finite and its values are finite. Thus the sequence is a martingale. \(\square\)

The update has a useful interpretation. It is proportional to the difference between the draw just observed and the mean of the individuals still available just before that draw. A draw above the remaining-population mean raises the prediction; a draw below it lowers the prediction. The factor \((n-r)/(n-k-1)\) accounts for how much of the final sample remains to be selected.

Worked Updates

Worked Example: Four Values and a Sample of Two

Consider a population with values \(2,5,8,11\), and take a sample of size \(r=2\). Suppose the first two revealed values are \(2\) and \(11\). Find the martingale values at stages \(0,1,2\), and verify both updates.

There are \(n=4\) individuals and \(T=2+5+8+11=26\). Before any reveal, $$ M_0=0+\frac{2}{4}(26)=13. $$ After revealing \(X_1=2\), we have \(S_1=2\), so $$ M_1=2+\frac{1}{3}(26-2)=2+8=10. $$ After revealing \(X_2=11\), the sample is complete and \(M_2=2+11=13\).

Check the updates. At \(k=0\), the remaining-population mean is \(26/4=13/2\), and the update factor is \((4-2)/(4-0-1)=2/3\). Thus $$ M_1-M_0=\frac{2}{3}\left(2-\frac{13}{2}\right)=\frac{2}{3}\left(-\frac{9}{2}\right)=-3, $$ which agrees with \(10-13=-3\). At \(k=1\), the remaining values are \(5,8,11\), with mean \(24/3=8\), and the update factor is \(2/(4-1-1)=1\). Thus \(M_2-M_1=1(11-8)=3\), agreeing with \(13-10=3\). As a direct check on \(M_1\), given the first draw \(2\), the possible second values are \(5,8,11\); the final totals \(7,10,13\) have average \((7+10+13)/3=10\).

Worked Example: Repeated Values and Conditional Averaging

Take the labelled population with values \(1,1,4,6\), and sample size \(r=2\). Suppose the first draw is \(4\). Compute \(M_0\), \(M_1\), and the possible values of \(M_2\), then check that their conditional average is \(M_1\).

The population total is \(T=1+1+4+6=12\), so \(M_0=(2/4)(12)=6\). After the first draw, \(S_1=4\), and $$ M_1=4+\frac{1}{3}(12-4)=4+\frac{8}{3}=\frac{20}{3}. $$ The remaining labelled individuals have values \(1,1,6\), each with probability \(1/3\) of being drawn next. If the next value is \(1\), then \(M_2=4+1=5\); this outcome has probability \(2/3\), because two individuals have value \(1\). If the next value is \(6\), then \(M_2=4+6=10\), with probability \(1/3\). Therefore $$ \mathbb{E}[M_2\mid\mathcal{F}_1]=\frac{2}{3}(5)+\frac{1}{3}(10)=\frac{20}{3}=M_1. $$ The update formula gives the same result for either value: the remaining mean before the second draw is \(8/3\), and the factor is \(2/(4-1-1)=1\). A draw of \(1\) changes the prediction by \(1-8/3=-5/3\), giving \(20/3-5/3=5\). A draw of \(6\) changes it by \(6-8/3=10/3\), giving \(20/3+10/3=10\).

Worked Example: A Sample of Three from Five Values

Take the population \(-2,0,3,5,9\) and sample size \(r=3\). Suppose the first three revealed values are \(9,-2,5\). Compute the successive conditional expectations and check each update.

Here \(n=5\) and \(T=-2+0+3+5+9=15\). Initially, $$ M_0=\frac{3}{5}(15)=9. $$ After \(X_1=9\), \(S_1=9\), and the four remaining values sum to \(6\). Two of those four will complete the sample, so $$ M_1=9+\frac{2}{4}(6)=12. $$ After \(X_2=-2\), \(S_2=7\), and the three remaining values sum to \(8\). One more value is needed, giving $$ M_2=7+\frac{1}{3}(8)=\frac{29}{3}. $$ The third revealed value is \(5\), so \(M_3=9-2+5=12\).

Check. At \(k=0\), the remaining mean is \(15/5=3\) and the update factor is \(2/(5-0-1)=1/2\). The update is \(\frac12(9-3)=3\), so \(M_0+3=12=M_1\). At \(k=1\), the remaining mean is \(6/4=3/2\) and the factor is \(2/(5-1-1)=2/3\). The update is $$ \frac{2}{3}\left(-2-\frac{3}{2}\right)=-\frac{7}{3}, $$ so \(12-7/3=29/3=M_2\). At \(k=2\), the remaining mean is \(8/3\) and the factor is \(2/(5-2-1)=1\). The update is \(5-8/3=7/3\), so \(29/3+7/3=12=M_3\), the observed sample total.

Boundary Cases and a Common Error

The formula above assumes \(1\le r<n\), which ensures its denominator \(n-k\) is positive throughout \(0\le k\le r\). If \(r=0\), the sample total is identically zero and all conditional expectations are zero. If \(r=n\), the sample total is the fixed population total \(T\), so every conditional expectation is \(T\); the displayed formula need not be used at \(k=n\), where its denominator would vanish. These cases are deterministic and do not require the update formula.

Common mistake: keeping the original population size in the denominator. In the first example, after observing \(2\), one might incorrectly calculate \(M_1=2+\frac{1}{4}(26-2)=8\), using \(n=4\) rather than the three individuals remaining. This is wrong: one of the remaining three, not one quarter of the original population, supplies the final sample position. The correct conditional expected additional value is \((5+8+11)/3=8\), so the correct prediction is \(M_1=2+8=10\). The denominator must count the individuals still available at the time of the conditional expectation.

This construction is useful whenever a statistic of a random sample is revealed sequentially. The conditional expectation starts at the unconditional mean of the final statistic and ends at the statistic itself. In sampling without replacement, the remaining values are dependent across draws, but the uniform-ordering argument gives the conditional mean directly; independence of the draws is neither assumed nor needed.

Check Your Understanding

Use the formula and, where relevant, the one-step update to answer each question.

  1. A population has values \(1,3,6,10\), and the sample size is \(r=2\). Find \(M_0\), then find \(M_1\) after the first revealed value is \(6\).
  2. For a population of \(n\) labelled individuals, explain why each remaining individual has conditional probability \((r-k)/(n-k)\) of being included in the final sample after \(k\) draws.
  3. In the population \(-2,0,3,5,9\) with sample size \(3\), what is the update factor at \(k=1\), and what is the remaining-population mean after the first draw is \(9\)?
  4. Why does the conditional average of the next martingale value equal the current value, even though the draws are not independent?
  5. What is the martingale if the sample size is \(r=n\), and why is the general formula unnecessary at the final stage?