Finite population total (source code)

= Finite population total
{title2=$T=\sum_{i=1}^Ny_i$}

A \b[<finite population total>] adds a specified numerical value over every labelled unit in a fixed, finite population $U=\{1,\ldots,N\}$:
$$
T=\sum_{i\in U}y_i.
$$
The target must specify both the population and the measured variable. It may be a total inventory mass, the total number of employees across establishments, or the sum of a binary property. If $y_i\in\{0,1\}$, the total counts units having the property; it is not automatically the population size $N$. A <finite population mean> is $\overline Y=T/N$, when $N$ is known and positive.

An original inventory has four containers holding $3,7,10,20\,\mathrm{kg}$ of a material. The total is $40\,\mathrm{kg}$ and the <finite population mean> is $10\,\mathrm{kg}$ per container. Giving every container the same mass fraction of an <analyte> is a separate assumption: the total <analyte> mass instead requires summing each container's mass multiplied by its own <mass fraction>. The target follows the physical quantity being added.

When only a sample $S$ is observed, the unweighted sample sum is generally not an <unbiased estimator> of $T$. Using <inclusion indicators> $I_i$ and <inclusion probabilities> $\pi_i$ gives
$$
\mathbb E_p\!\left(\sum_{i\in S}y_i\right)=\sum_{i\in U}\pi_i y_i.
$$
If every $\pi_i>0$, the <Horvitz-Thompson estimator> instead satisfies
$$
\mathbb E_p\!\left(\sum_{i\in S}\frac{y_i}{\pi_i}\right)
=\sum_{i\in U}\frac{y_i}{\pi_i}\mathbb E_p I_i
=\sum_{i\in U}y_i=T.
$$
This is a consequence of the <sampling design>, without requiring the fixed population values to follow a statistical distribution.<A Generalization of Sampling Without Replacement From a Finite Universe by D. G. Horvitz and D. J. Thompson>[1952, finite-universe estimation framework, pp.663–685]{ref} A full census removes sample-selection variation, but imperfect measurement can still make the recorded sum differ from the intended physical total.