David Robinson wrote:
> I have several measurements of the SAME QUANTITY from different tests.
> For each test, I have:
>
> number of subjects, mean value, standard deviation (or standard error
> of the mean.)
>
> I want to combine all the data, to get a global mean, and a global
> standard deviation. The results I want for these two values should be
> the results I would get if I had ALL the original data from all the
> tests, and simply calculated the mean and standard deviation over all
> the data.
Treat this like an analysis of variance. You can easily compute the
between and within group sums of squares. Add them to get the total
sum of squares.
Also, *any* dataset with the same number of groups, means, SDs, and
individual sample sizes will have the same overall SD. You can use
a program like SAS to generate such a phony dataset for you. Then,
run PROC MEANS or PROC UNIVARIATE to get the overall summary.
Here's some code. Just replace the data lines with your own data,
get the answer, then go carve the turkey. (Ooops! UK... Well,
relax and enjoy!)
options linesize=80 pagesize=59;
data;
input group n xbar xsd;
x1 = xbar + sqrt((xsd**2)/n);
x2 = n*xbar - (n-1)*x1;
x = x1;
do i = 1 to n-1;
drop n xbar xsd i x1 x2;
output;
end ;
x = x2;
output;
cards;
1 10 2003 555
2 5 1811 429
3 6 1843 534
4 2 1652 281
5 1 52 81
;
proc means;
by group;
proc means;
run;
.
.
=================================================================
Instructions for joining and leaving this list, remarks about the
problem of INAPPROPRIATE MESSAGES, and archives are available at:
. http://jse.stat.ncsu.edu/ .
=================================================================