I am doing an experiment in which I measure success or failure of a series of $k$ trials, yielding a proportion $P$. I repeat the experiment several times, yielding a set of $N$ proportions: $P_1, \ldots, Pn$, and would like to compute a mean and confidence interval for these proportions. There are a few things that make this tricky:
The experiments are independent, but there might be systematic errors that affect all of the trials within any one experiment (in other words, the trials are pseudo-replicates).
The number of trials can vary by as much as a factor of $10$ from experiment to experiment.
For reasons related to the design of this specific experiment, I have more confidence in experiments where more trials were conducted.
So far, rather than computing a simple average:
$$P_{est} = \frac1N \sum_{i=1}^N P_i$$
I compute a weighted average proportion:
$$P_{est} = \frac{ \sum_{i=1}^N k_i \cdot P_i}{\sum_{i=1}^N k_i}$$
Which is equivalent to the total number of successes divided by the total number of trials across all experiments.
Now, how do I calculate a confidence interval for this? It is not a simple binomial proportion because of the pseudo-replication issue. Nor is it the simple confidence interval for the mean of experiments, because that doesn't take into account the weighting.
Thanks for any suggestions.