0

How does one update a confidence interval using Bayes rule?

Say, for example, an experiment shows that the mean lies in [A, B] with 95% confidence. Later, a colleague says they ran a similar experiment and found that the mean lies in [C, D] with 95% confidence (or any other CI).

How does one "merge" the two data under Bayes?

Please help out with any misconceptions, I'm not a trained statistician.

  • Bayes naturally use confidence intervals, rather they use credibility intervals. I am guessing is what you have is some data in the form of confidence intervals and you want to update you estimate of existing knowledge? There are rules for how to combine confidence intervals, but for answerer's to make sure they address your real need perhaps it would help for you to simply explain what data you have and what question you need answered. – ReneBt Apr 24 '19 at 08:20

1 Answers1

0

So first of all, this is dependent on the distribution of your data. This question can be very tricky for certain distributions. However, generally when working with confidence intervals, a normal distribution is assumed, simplifying things.

To calculate the confidence interval, you would need to know the number of observations for both experiments. The 95% confidence interval is namely defined as: mean +- 1.96 * standard_deviation/sqrt(observations).

If you would know this you can calculate the means simply by: $$mean_1 = (A+B)/2$$ $$mean_2 = (C+D)/2$$ $$std_1 = (A-B)/2/1.96*\sqrt(n_1)$$ $$std_2 = (A-B)/2/1.96*\sqrt(n_2)$$

Now the new mean needs to be normalized according to observations $$mean = (mean_1*obs_1 + mean_2*obs_2)/(obs_1 + obs_2)$$ The standard deviation can now be calculated from the number of samples, the $$std = \sqrt{\frac{n_1std_1^2 + n_2std_2^2 + n1(mean_1-mean)^2 + n_2(mean_2-mean)^2} {n_1+n_2}}$$ For quick derivation (for example): Is it possible to find the combined standard deviation? And the interval $$A = mean - 1.96 * std / \sqrt(n1+n2) $$ $$B = mean + 1.96 * std / \sqrt(n1+n2) $$

If you don't know the amount of samples you can always still assume a certain underlaying distribution. Most often experiments can be approximated by a normal distribution. Having made this assumption you can calculate the variance and mean of both from the probability density function. Add the two functions and normalize so that the integral equals one gives the new density function from which you can calculate the 95% confidence interval.

  • 1
    You are implicitly making an assumption in here that we are taking about normally distributed variables. OP didn’t state that’s the case. – Tim Aug 24 '21 at 05:10
  • Fair enough Tim. This can obviously also be calculated for different distributions. – Niels Uitterdijk Aug 24 '21 at 06:58
  • Can, but not so obviously. For example, the confidence interval can be asymmetric, in such a case you cannot easily estimate the mean from it. Also, in many cases, there won't be a straightforward closed-form solution, so you would need to fit a distribution to the intervals and treat them as data, etc. You should make it explicit that this is relevant only to normally distributed variables. – Tim Aug 24 '21 at 07:13
  • 1
    Interval doesn't have to be described with a mean. Even for a Pareto distribution you can calculate the confidence interval. Anyhow, I edited my answer with a disclaimer of my assumption. – Niels Uitterdijk Aug 24 '21 at 07:35