Confidence Interval – How to Calculate the Confidence Interval of an Average

confidence intervalmeanpooling

Consider I have 20 samples from each of 10 batches resulting in 200 samples total. If I take a parameter I'm trying to estimate and calculate the confidence interval using all 200 samples pooled together I get a wider range than if I calculate the parameter average from each batch and then form a confidence interval on each parameter average.

I understand that these are two different things. One is a confidence interval on the parameter and one is a confidence interval on the parameter average, but I'm having trouble knowing when to use each or the differences in application of each method.

My intuition is if the parameter average is actually the parameter I'm looking to describe then I'd use the means batching approach and if the parameter is truly the variable I'm looking to describe then I'd use the pooled samples approach.

My grasp of this is very weak; so if there are other implications between these two methods that I am failing to ask, I'd like some explanation on this as well.

Best Answer

Let $X_{j,1},X_{j,2},...,X_{j,20}\sim F(\theta_j,k_j)$ be the 20 observations in batch $j=1,...,10$ that follow a particular distribution with shape or location parameter $\theta_j$ and scale parameter $k_j$. Pooling all 200 observations when performing inference on these parameters or a function of these parameters assumes the parameters are all the same, i.e. $\theta_j=\theta$ or $g(\theta_j,k_j)=g(\theta,k)$ $\forall j$. There is no batch effect. In contrast, performing inference on these parameters or a function of these parameters by batch assumes the parameters are all different. That you get wider confidence limits for the pooled analysis suggests to me the parameters are not all the same. There is a batch effect.

Treating all of the parameters as fixed quantities, each batch can be viewed as a sample from a subpopulation. Since you have equal sample sizes in each batch I suppose you could assume the parameters are all different and think of the pooled analysis as investigating something like $\theta\equiv\frac{1}{10}\sum \theta_j$. If, say, we were sampling people at random from a broader target population then the fixed $\theta$ could be viewed as a weighted average of fixed subpopulation $\theta_j$'s. Then $\theta$ would be the overall population parameter and might certainly be a meaningful quantity to consider.

I'm not usually a fan of treating parameters as random variables, but here it might make sense. If there is truly a different batch effect each time you produce outputs you could view each batch parameter as the sampling unit with the 20 observations as repeated measurements. This would be akin to repeated measurements on subjects participating in a clinical trial. If we were to repeat the trial many times we would use different subjects so subject is our sampling unit with repeated measures. If you were to repeat your experiment many times you would have different batch parameters so $\theta_j$ and $k_j$ would be your sampling unit. You could accomplish this using a mixed model or a covariance pattern model. The mixed model would allow you to perform inference on individual batch parameters as well as the marginal parameters that govern the sampling of batch effect. The covariance pattern model would allow you to perform inference only on the marginal parameters that govern the sampling of batch effect. Going back to the clinical trial experiment, a mixed model would allow you to perform inference on individual subject parameters as well as the target patient population parameters. A covariance pattern model would be useful only for inference on the target patient population parameters.

Let me know if there is anything I have misunderstood.

Related Question