How to calculate pooled variance of two or more groups given known group variances, means, and sample sizes? Say there are $m+n$ elements split into two groups ($m$ and $n$). The variance of the first group is $\sigma_m^2$ and the variance of the second group is $\sigma^2_n$. The elements themselves are assumed to be unknown but I know the means $\mu_m$ and $\mu_n$.
Is there a way to calculate the combined variance $\sigma^2_{(m+n)}$? 
The variance doesn't have to be unbiased so denominator is $(m+n)$ and not $(m+n-1)$.
 A: I'm going to use standard notation for sample means and sample variances in this answer, rather than the notation used in the question.  Using standard notation, another formula for the pooled sample variance of two groups can be found in O'Neill (2014) (Result 1):
$$\begin{equation} \begin{aligned}
s_\text{pooled}^2 &= \frac{1}{n_1+n_2-1} \Bigg[ (n_1-1) s_1^2 + (n_2-1) s_2^2 + \frac{n_1 n_2}{n_1+n_2} (\bar{x}_1 - \bar{x}_2)^2 \Bigg]. \\[10pt]
\end{aligned} \end{equation}$$
This formula works directly with the underlying sample means and sample variances of the two subgroups, and does not require intermediate calculation of the pooled sample mean.  (Proof of result in linked paper.)
A: The idea is to express quantities as sums rather than fractions.
Given any $n$ data values $x_i,$ use the definitions of the mean
$$\mu_{1:n} = \frac{1}{\Omega_{1;n}}\sum_{i=1}^n \omega_{i} x_i$$
and sample variance
$$\sigma_{1:n}^2 = \frac{1}{\Omega_{1;n}}\sum_{i=1}^n \omega_{i}\left(x_i - \mu_{1:n}\right)^2 = \frac{1}{\Omega_{1;n}}\sum_{i=1}^n \omega_{i}x_i^2  - \mu_{1:n}^2$$
to find the (weighted) sum of squares of the data as
$$\Omega_{1;n}\mu_{1:n} = \sum_{i=1}^n \omega_{i} x_i$$
and
$$\Omega_{1;n} \sigma_{1:n}^2 = \sum_{i=1}^n \omega_{i}\left(x_i - \mu_{1:n}\right)^2 = \sum_{i=1}^n \omega_{i}x_i^2  - \Omega_{1;n}\mu_{1:n}^2.$$
For notational convenience I have written $$\Omega_{j;k}=\sum_{i=j}^k \omega_i$$ for sums of weights.  (In applications with equal weights, which are the usual ones, we may take $\omega_i=1$ for all $i,$ whence $\Omega_{1;n}=n.$)
Let's do the (simple) algebra.  Order the indexes $i$ so that $i=1,\ldots,n$ designates elements of the first group and $i=n+1,\ldots,n+m$ designates elements of the second group.  Break the overall combination of squares by group and re-express the two pieces in terms of the variances and means of the subsets of the data:
$$\eqalign{
\Omega_{1;n+m}(\sigma^2_{1:m+n} + \mu_{1:m+n}^2)&= \sum_{i=1}^{1:n+m} \omega_{i}x_i^2   \\
&= \sum_{i=1}^n \omega_{i} x_i^2 + \sum_{i=n+1}^{n+m} \omega_{i} x_i^2 \\
&= \Omega_{1;n}(\sigma^2_{1:n} + \mu_{1:n}^2)  + \Omega_{n+1;n+m}(\sigma^2_{1+n:m+n} + \mu_{1+n:m+n}^2).
}$$
Algebraically solving this for $\sigma^2_{m+n}$ in terms of the other (known) quantities yields
$$\sigma^2_{1:m+n} = \frac{\Omega_{1;n}(\sigma^2_{1:n} + \mu_{1:n}^2) + \Omega_{n+1;n+m}(\sigma^2_{1+n:m+n} + \mu_{1+n:m+n}^2)}{\Omega_{1;n+m}} - \mu^2_{1:m+n}.$$
Of course, using the same approach, $\mu_{1:m+n} = (\Omega_{1;n}\mu_{1:n} + \Omega_{n+1;n+m}\mu_{1+n:m+n})/\Omega_{1;n+m}$ can be expressed in terms of the group means, too.

Edit 1
An anonymous contributor points out that when the sample means are equal (so that $\mu_{1:n}=\mu_{1+n:m+n}=\mu_{1:m+n}$), the solution for $\sigma^2_{m+n}$ is a weighted mean of the group sample variances.
Edit 2
I have generalized the formulas to weighted statistics.  The motivation for this is a recent federal court case in the US involving a dispute over how to pool weighted variances: a government agency contends the proper method is to weight the two group variances equally.  In working on this case I found it difficult to find authoritative references on combining weighted statistics: most textbooks do not deal with this or they assume the generalization is obvious (which it is, but not necessarily to government employees or lawyers!).
BTW, I used entirely different notation in my work on that case.  If in the editing process any error has crept into the formulas in this post I apologize in advance and will fix them--but that would not reflect any error in my testimony, which was very carefully checked.
