Two summaries merge into one. With δ the gap between the two means, b's mean minus a's, and n the combined count:
M2=M2,a+M2,b+δ2nnanb
The last term is the spread between the two groups, which neither M2 sees alone.
The new mean is a's mean moved by δ times b's share of the count, δ × nb / n. Merge every server's summary into a running total this way, one server at a time, starting from the empty summary (0, 0.0, 0.0). The variance is the final M2 over n − 1. Here it is on the shop's 10 servers:
total = (0, 0.0, 0.0)
for x in nodes:
total = merge(total, (len(x), x.mean(), ((x - x.mean()) ** 2).sum()))
print(f"merged summaries: {total[2] / (total[0] - 1):.4f}")
print(f"all values at once: {np.concatenate(nodes).var(ddof=1):.4f}")
merged summaries: 4043.0373
all values at once: 4043.0373
In the editor, write merge(a, b). It merges the two servers from the question at the top of this step.