|
From: Robert D. <rob...@gm...> - 2014-09-03 17:10:48
|
On 2014-09-03, Henry Baker <hb...@pi...> wrote: > Suppose I take 8 samples from normal distribution A and 8 samples > from normal distribution B, each with its own mean and variance. > > What is the probability that the sum of the 8 A-samples will > exceed the sum of the 8 B-samples ? The problem is equivalent to finding the probability that the difference sum(A) - sum(B) is greater than 0. So the solution hinges on the distribution of that difference. In general the density of a sum or difference is the convolution of the densities of each term (assuming independence). One can find an exact expression for that in special cases. In particular, for Gaussian variables, the sum or difference is again Gaussian, with mean = sum/difference of means and variance = sum of variances. As stated, mean(group A) = 8 * mean(A), mean(group B) = 8 * mean(B), likewise var(group A) = 8 * var(A), var(group B) = 8 * var(B), and mean(group A - group B) = 8 * (mean(A) - mean(B)), var(group A - group B) = 8 * (var(A) + var(B)). Then P(diff > 0) = 1 - P(diff < 0) = 1 - cdf_normal(Z) where Z = - mean(group A - group B) / sqrt(var (group A - group B)). best Robert Dodier |