Compute Probability of a Multivariate Normal Distribution over Polytope
Show older comments
I have a Multivariate Normal Distribution with the mean vector
and the covariance matrix
given as
and the covariance matrix
given as
Now, I want to compute the probability that a realization of
lies in a given polytopic set of the form
lies in a given polytopic set of the formwhere the matrix
and the vector
describes m half-spaces and therefore a convex set.
and the vector The probability which I want to compute is given as
How can I compute/approximate this integration numerically in MATLAB for a given mean μ, a given covariance Σ, and a given set 𝒫. In my problem, the variable x has around 10 to 100 dimensions.
Edit:
-> 
-> 
4 Comments
Michael Fink
on 29 Jun 2022
It could be quite time-consuming, but maybe Monte-Carlo integration is an option:
Michael Fink
on 30 Jun 2022
Answers (1)
Paul
on 30 Jun 2022
Hi Michael,
If A is nonsingular, perhaps a change of coordinates will work
% z = A*x
muz = A*mux;
Sigmaz = A*Sigmax*A.';
ProbAxLTb = mvncdf(-inf+b,b,muz,Sigmaz);
See the doc page for mvncdf for examples, info, options, etc.
6 Comments
Michael Fink
on 30 Jun 2022
Paul
on 30 Jun 2022
My mistake. I didn't squint hard enough to see A isn't square. But shouldn't A be m x n, not n x m as in the Question?
Michael Fink
on 1 Jul 2022
Edited: Michael Fink
on 1 Jul 2022
Just want to make sure I'm clear on the question. For s simple case we have:
rng(100);
Sigma = rand(2);Sigma = Sigma*Sigma.';
mu = [1 1];
A = rand(4,2); b = (1:4).';
N = 1e5;
x = mvnrnd(mu,Sigma,N);
z = A*x.';
P = sum(all(z < b,1))/N
Is that the probabilty that you're trying to get through integration or other means?
Torsten
on 4 Jul 2022
It was only an example.
Of course, you can directly use your values for sigma, mu, A and b in Paul's code instead of the randomly created.
Categories
Find more on Univariate Discrete Distributions in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!