I have the following question about the properties of individual means vs. pooled means. To illustrate my example, I will use the R programming language.
Suppose we have measurements from two different groups :
group_1 = rnorm(100,10,5)
group_2 = rnorm(50, 12, 8)
From here, we can calculate the pooled means two different ways:
Method 1:
#pooled mean method 1:
mean(mean(group_1) + mean(group_2))
23.76851
Method 2:
#pooled mean method 2 (sorry, bad way of doing this):
d1 = data.frame(group_1)
d2 = data.frame(group_2)
colnames(d2)[colnames(d2) == 'group_2'] <- 'group_1'
d3 = rbind(d1,d2)
colnames(d3)[colnames(d3) == 'group_1'] <- 'pooled'
mean(d3$pooled)
11.28023
My Question: Obviously, these two means are largely different - but are there any situations where it might be more favorable to prefer using one of these means compared to the other one?
For example, instead of the means, suppose you wanted to calculate the "pooled" 80th percentiles:
Method 1:
mean(quantile(group_1, 0.8) + quantile(group_2, 0.8))
34.43544
Method 2:
quantile(d3$pooled, 0.8)
80%
15.83668
Would the same statistical properties about the different mean estimators still apply to these pooling methods?
Thanks!