{'fraction_non_alphanumeric': 0.035305048002477545, 'fraction_numerical': 0.0112263858779808, 'mean_word_length': 4.031943903389171, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Calculating the Exact Pooled Variance

An exact method of calculating the variance of a pooled data set is presented. Its major advantages over the many other methods are that it is simple, is easily derived and remembered, and requires no assumptions. The result can be concisely summarized as follows:"The Exact pooled variance is the mean of the variances plus the variance of the means of the component data sets."The proof is so simple that it has certainly been done many times before, but it is absent in the textbooks. Its practical significance is discussed.


I. Introduction
Many introductory statistics textbooks deal with the fundamental principles of measurement, and this paper assumes that the reader is familiar with the different types of experimental errors and how they are handled, and with widely used notations and terminology. This paper will deal with the statistical errors, and will use the dictionary definition of variance and standard deviation: The standard deviation is the square root of the arithmetic average of the squares of the deviations from the mean, and the variance is the square of the standard deviation. The standard error is the estimate of how far the mean value is likely to be in error due to random errors and a finite number of measurements. This paper will use the letters i, j, k, m, & n for integers, x for data values, a for averages or means, v for variances, and S for sums of squares of the data values. Thus for a data set D = {x 1 , x 2 ... x N }, N is the number of data points, the mean is a = (x 1 + x 2 +...+ x N )/N, the variance is v = ((x 1 -a) 2 +(x 2 -a) 2 +...+ (x N -a) 2 )/N, the standard deviation is N = v 1/2 , and the standard error is SE = N /(N-1) 1/2 .
Many texts use N-1 for the denominator in the variance. In this case, the standard deviation is denoted by N-1 and the standard error is SE= N-1 /N 1/2 . Note that SE is the same either way. SE is sometimes called the "standard deviation of the means". (See the References below for a sampling of choice of N or N-1 ) The standard deviation is a measure of the spread of the data about the mean. It is roughly the typical distance of a data point from the mean value of the data points, but varies with the distribution of the data points around the mean. For a large number N of data points, it is nearly independent of N. The standard error is an estimate of the statistical uncertainty in the mean value of the data, and for large N works quite well for symmetric distributions of the data points around the mean. It decreases with increasing N like N -1/2 . This reduction in SE provides a motive for pooling, or merging, data sets. More points yield a smaller statistical uncertainty in the mean. However, different experiments may actually be measuring different things. For example, in measuring the acceleration of gravity in Paris using a pendulum, one experiment may eliminate the buoyancy of the air on the bob, and another may eliminate the thermal expansion of the length of the supporting wire, and a third may hold the amplitude of the swing to be a known constant. In this case the measurements differ, and it may be invalid to pool the data from the different experiments. These are examples of consistent, rather than statistical, errors in an experiment. Sometimes these exist, but are unknown. How variance changes as more data sets are included can yield a criterion for not pooling the data sets. This paper will present a simple, exact, easilyunderstood formula for the variance of a pooled data set when for each subset the number of points, the mean, and the variance are known. This calculation is extremely simple, yet I have not found it in any statistics books. The author requests that this method be referred to as "the exact pooled variance".

II. Theorem:
Let several subsets of measurements of variable be merged to form a pooled data set. For each set only the number of data points, the mean value, and the variance of each subset are given. The variance of the pooled set is the variance of the means plus the mean of the variances of the subsets. In this discussion, a "mean" is a weighted average over the subsets, and the weights are the number of data points in each subset.
In rigorous form, this can be proven for two data sets, and then extended to any number of sets by mathematical induction. In this case I will simply show it for three data sets, since I think it is clearer to do so. Let x i represent measurements of some variable. Let D P = {x 1 , x 2 , ... x n }, be a pooled data set assembled from data sets D 1 = {x 1 , x 2 , ... x j }, D 2 = {x j+1 , x j+2 , ... x j+k }, and D 3 = {x j+k+1 , x i+j+2 , ... x j+k+m }. Note that the number of points in the pooled set is n = j+k+m.
The mean or average of D P is a P = = n i i x n 1 1 . Means a 1 , a 2 , and a 3 for D 1 , D 2 , and D 3 , are found similarly. Then a P = (ja 1 + ka 2 + ma 3 )/n = the mean of the means. (1) The sum of squares of D P is = = n i i P x S 1 2 . Sums S 1 , S 2 , and S 3 are similarly defined for sets D 1, D 2 , and D 3 .
Define the variance of data set D P to be Expanding the argument easily shows that v P = S P /n -a P 2 .
Similarly, v 1 = S 1 /j -a 1 2 , v 2 = S 2 /k -a 2 2 , and v 3 = S 3 /m -a 3 2 . (4) Our goal is to calculate v P from the means and variances of the constituent sets.

III. A Numerical Example
Consider three data sets D1, D2, and D3, which are pooled to create data set Dp. Also note how adding D3 to D1 and D2 hardly changes the mean of the data, but doubles the variance. D3 has a much smaller variance than D1 or D2, so including it using precision-weighted adjustment procedures could drastically change the mean and variance of the combined adjusted data. These will be discussed later.

IV. A Simple Physical Interpretation
A colleague noted that this is the parallel-axis theorem of classical mechanics. Consider a structure such as a tree-branch with apples on it. The mean value of the positions of the masses is the center of mass, and the moment of inertia about the center of mass is just the variance of the distance of the masses from the center of mass. The parallel-axis theorem was proven by Jakob Steiner (1796-1863) in two dimensions. This theorem uses only one dimension. The book Statistics, Probability, and Decisions by Winkler also mentions the connection between variance and moment of inertia, so in a loose sense, this may be the earliest "proof" of the above theorem.

V. Advantages of Using the Exact Pooled Variance instead of Using the Mean Variance as an Estimate
Many introductory statistics texts recommend using the mean of the variances as an estimate of the variances of the pooled set. This practice should be abandoned for the following reasons.
1. This practice will always yield a pooled variance which is smaller than the exact pooled variance. 2. The exact variance is easily calculated, and the data to do so is always available in a pooling process. 3. It is unreasonable to include the caution "if the means of the pooled sets are approximately equal", when no objective criterion is given for "approximately equal" and the easiest objective one is simply calculating the variance of the means--the second term in the exact pooled variance, which removes the need for approximating. 4. In pooling data sets, if the mean, standard deviation, and standard error are to have any reasonably valid meaning, the pooled variance must not ignore the difference of the means of the constituent sets. If two data sets of a time measurement are pooled, and one set has mean a 1 = 10s, and standard deviation 1 =3s, and the other has mean a 2 =20s, and 2 =3s, then to say that the pooled set has mean a P =15s and P =2s, is grossly misleading.
5. If adding more data points to the pool increases the standard error, then this can be a signal that the measurement methods need examination, and that perhaps the new data should not be included.
6. If the input data sets do not use adjusted data, then the Exact pooled variance is well-defined, associative, and commutative. More data sets can be added into a pooled variance, and the result is the same, independent of the order in which the data sets are accumulated.
7. The exact pooled variance is independent of the distribution of the data points and requires no assumptions that any properties of the data distribution be negligible. 8. In contrast to most other methods, the exact pooled variance clearly teaches the principles of statistical analysis of data, and can validly be used to evaluate results.
9. The procedure for calculating the exact pooled variance can be concisely stated, and is easily memorized.

VI. Can a Decrease in Standard Error be a Criterion for the Validity of Pooling?
This brings us to an obvious question: If the goal of pooling is to decrease the standard error, then why pool if pooling increases the standard error? Or suppose you already have a pooled data set, and are considering adding a new data set to the pool (which is easily done for the exact pooled variance). Then suppose that including this new data set increases the variance. Would this be a valid justification for excluding the new set?
It would clearly valid if there are other reasons to suspect a flawed measurement. For example, suppose thirty students in a physics lab each measure e/m, the charge-to-mass ratio of the electron. The lab has, say ten commercially-manufactured instruments, all of the same make and model. The instructor leads the class in pooling the data to show how increasing the number of measurements decreases the standard error. He then discovers that three of the measurements are a factor of two lower than the rest of the measurements, and all three are from instrument #1. The other nine give e/m = 0.36 ± 0.03 TC/kg, and #1 gives e/m = 0.18 ± 0.05 TC/kg. He quickly checks instrument #1 himself and measures 0.179 TC/kg, so he believes that the students using #1 were following the correct procedure. In this case it would be reasonable to assume that #1 is doing something different which halves its results compared to the other instruments and he excludes its results from the pool. The instructor also notes that instrument #1 is consistent with the internationally accepted best value for e/m. He then checks the other instruments and then notifies the manufacturer that nine of the ten instruments are consistently giving a result which is twice the CODATA 14 accepted value. Notice that in this example, the increase in the variance was grounds for rejecting instrument #1 from the pool, allowing a consistency for the other nine instruments which suggested a possible flaw in their design or construction.
A disagreement between two measurements does not indicate which of the measurements is more accurate. However it may indicate that further examination of the instruments is warranted, and in some cases may lead to new, unexpected information. In some cases, both measurements might be published, but not combined into a common pool.

VII. Adjustment of Data and Analysis of Variance.
A method of combining data sets which differs from simple pooling is widely-used in science, and is called "adjustment of data". This procedure is used by the CODATA committee to determine a best value for fundamental constants. 10,14, This method seeks to generate a weighted average of mean values from different sources. Usually the weights are chosen using the variance, standard deviation, or chi-squared functions of the composite data sets, and are chosen to minimize at least one of these functions. Suffice it to say, this procedure is not a pooling of data sets, but rather a combining of data sets which does not incorporate the differences of the mean values of the composite sets. This subject is not further discussed here, so as not to distract from the main point of the paper.
"Analysis of Variance" (ANOVA) comprises a vast literature dating back to at least 1932 12 , and summaries of this method are available in statistics textbooks 13 . In ANOVA, both of the terms a(v) and v(a) in equation (8) above are calculated, but instead of adding them to give the exact pooled variance, the ratio v(a)/a(v) is considered as a correction to the mean of the variances. This ratio is then used with various criteria to try to achieve various goals, such as comparing effects of different medical treatments, maximizing profits, improving quality control in manufacturing, or minimizing catastrophic failures. In any of the numerous discussions of ANOVA it would have been trivial to include the exact pooled variance, but I have not yet found a case of this being done.

VIII. Conclusions
1. The exact variance of a data set formed by pooling subsets is the mean of the variances plus the variance of the means of the subsets. The means are weighted by the number of points in each subset.