How to calculate a 95 credible region for a 2D joint distribution?

507 Views Asked by At

Suppose we have a joint distribution p(x_1,x_2), and we know x_1,x_2,p. Both are discrete, (x_1,x_2) is scatter, its contour could be drawn, marginal as well. I would like to show the area of 95% quantile (a scale of 95% data will be contained) of the joint distribution, how can I do that?

2

There are 2 best solutions below

0
Jan K On

If you are interested in finding a pair x_1, x_2 of real numbers such that P(X_1<=x_1, X_2<=x_2) = 0.95 and your distribution is continuous then there will be infinitely many of these pairs. You might be better of just fixing one of them and then finding the other

0
fakufaku On

As the other points out, there are infinitely many solutions to this problem. A practical one is to find the approximate center of the point cloud and extend a circle from there until it contains approximately 95% of the data. Then, find the convex hull of the selected points and compute its area.

Of course, this will only work if the data is sort of concentrated in a single area. This won't work if there are several clusters.