Letgroup 1have a mean , variance and be of size n. Then:

.... (1)

.... (2)

Letgroup 2have a mean , variance and be of size m. Then:

.... (3)

.... (4)

Let thewhole group(group 1 plus group 2) have a mean and variance . The whole group has size n + m. Then:

.

Substitute from (1) and (3): .

.

Substitute from (2) and (4):