# Membership inference based on confidence intervals

We are triing to validate a sample for purity based on 2 chemical parameters. For pure sample chemical parameters, we don't have the raw data any more, only the population mean and the convariance matrix between the two parameters, from which we can construct a 95% confidence ellipse. If the sample measurement lies outside the 95% confidence interval, is it right to conclude that the sample is contaminated? Is the confidence interval's 95% boundary equivalent to the critical value of a t-test somehow?

## 1 Answer

I think you are mixing up confidence intervals and prediction intervals.

When you do an experiment to calculate the value of a parameter then a confidence interval describes the region where you expect to find a sample estimate of that parameter (e.g. confidence interval of the sample mean). If you are validating the purity of samples by taking many samples and comparing their mean to the population mean then you need to use a confidence interval.

On the other hand, prediction intervals aren't concerned with what the mean of a sample is. Prediction intervals give a region where you expect to find any individual sample. With the population mean and the covariance matrix of pure samples you can construct a prediction interval (or ellipse) where 95% of the future individual measurements from pure samples will be in the interval.

Prediction interval seems to be what you're looking for so I'll give more detail on that. If you measure pure samples many times 95% of them will be in the prediction interval. If you use this as a test for purity that means that you will reject 5% of the pure samples and being impure. The proportion of impure samples that you reject as impure will depend on how different the means and variances of the impure samples are compared to pure samples. In theory, if impure samples varied very little then maybe more than 95% of them are in the 95% prediction interval so this method would be ineffective at finding impure samples.

If you could take several measurements from each sample and test their mean against the population mean then you would catch more of the impure samples. This might not be possible in your situation, though.