# Standard error of proportions, with weighting

I have a set of experiments $i=1\dots k$ each of which performs $n_i$ binomial experiments, recording a fraction $p_i$ successes.

Clearly if I trust all of the experiments equally, my estimated proportion of successes is

$$p = \frac{\sum_i n_i p_i}{\sum_i n_i}$$

and the standard error is

$$\textrm{s.e.} = \sqrt{p(1-p)/\sum_in_i}$$

If I trust some of the experiments more than others, I might want to apply a weight $w_i$ to the evidence from each of them, such that $\sum_iw_i=1$. Clearly in that case the estimated proportion of successes is

$$p^{(w)} = \frac{\sum_iw_in_ip_i}{\sum_i w_in_i}$$

but what is the standard error?

$X_i=\text{Number of hits in$n_i$trials}$
and its expectation, $n_i p_i$. The variance is $n_i p_i (1-p_i)$ for each set of trials, and the trials are independent so the variances add, so standard error of
$\sum_i\frac{ w_i }{\sum_i w_i n_i} X_i$ is
$\sqrt{\sum_i (\frac{w_i }{\sum_i w_i n_i})^2 n_i p_i (1-p_i) }$