Calvin Hess

2022-01-29

If I know the mean, standard deviation, and size of sample A and sample B, how do I compute the standard deviation of the union of samples A and B? What if samples A and B are of different sizes?

utgyrnr0

Expert

Explanation:
Let us start with samples with unequal sizes.
Let the mean, standard deviation and size of sample A be ${\stackrel{―}{X}}_{A},{S}_{A}$ and ${n}_{A}$
and mean, standard deviation and size of sample B be ${\stackrel{―}{X}}_{B},{S}_{B}$ and ${n}_{B}$ respectively.
Then mean of comibined sample $\stackrel{―}{X}$ is given by
$\stackrel{―}{X}=\frac{{n}_{A}{\stackrel{―}{X}}_{A}+{n}_{B}{\stackrel{―}{X}}_{B}}{{n}_{A}+{n}_{B}}$
and Standard Deviation of combined sample S is
$S=\frac{{n}_{A}\left({S}_{A}^{2}+{\left({\stackrel{―}{X}}_{A}-\stackrel{―}{X}\right)}^{2}\right)+{n}_{B}\left({S}_{B}^{2}+{\left({\stackrel{―}{X}}_{B}-\stackrel{―}{X}\right)}^{2}\right)}{{n}_{A}+{n}_{B}}$
Note that it is important to work out mean of combined sample first, as to is used to calculate Standard Deviation of combined sample.
If the sample sizes are equal then the above reduces to
$\stackrel{―}{X}=\frac{{X}_{A}+{X}_{B}}{2}$ and
$S=\frac{\left({S}_{A}^{2}+{\left({\stackrel{―}{X}}_{A}-\stackrel{―}{X}\right)}^{2}\right)+\left({S}_{B}^{2}+{\left({\stackrel{―}{X}}_{B}-\stackrel{―}{X}\right)}^{2}\right)}{2}$

Do you have a similar question?

Recalculate according to your conditions!