# How to combine values based on standard errors?

Let's assume we have two means with corresponding standard errors.

mean_1 = 3.75, se_1 = 0.64
mean_2 = 2.90, se_2 = 0.94


I would like to average the means and account for the standard error. I would like mean_1 to contribute more (since the standard error is lower) to the average than mean_2. A weighted mean if you will.

One way would be to specify weights as the relative magnitude of the standard error like so (I use R's function weighted.mean found in the base stats package):

> weighted.mean(c(3.75, 2.0), w = c((1 -0.64/(0.64+0.94)), (1- 0.94/(0.64+0.94))))
[1] 3.041139