mvncdf seems to be violating the additive property of integrals
5 次查看(过去 30 天)
显示 更早的评论
I need to determine the probability of an event ocurring in a subset of an experiment sample space comprised of two random continuous variables. When I use mvncdf to evaluate the whole sample space, I get the expected result of 1. However, when I partition the sample space into two pieces and use mvndcf to evaluate probabilities like before, the sum of the respective probabilities is significantly smaller than 1.
%% CODE:
% Define Integration Limits
Low_Lim = -inf(1,2);
Med_Lim = [-0.1836 4.1085];
High_Lim = inf(1,2);
% Define bivariate curve properties
mu = [-0.2020 4.5194];
covar = [0.2940 0.2027
0.2027 0.1434];
Fraction_1 = mvncdf(Low_Lim,Med_Lim,mu,covar) % yields 0.1390
Fraction_2 = mvncdf(Med_Lim,High_Lim,mu,covar) % yields 0.4865
Fraction_1 + Fraction_2 % yields 0.6255, uh oh, this should be 1
% Check that mvncdf works over the whole sample space
Fraction_whole = mvncdf(Low_Lim,High_Lim,mu,covar) % yields 1, as expected
%% END OF CODE
What am I doing incorrectly that results in Fraction_1 + Fraction_2 < 1?
0 个评论
采纳的回答
Torsten
2025-7-18
编辑:Torsten
2025-7-18
The complete IR^2 is made up of four quarter zones, not two. Sketch the quarter zones over which you integrate to understand what's going on.
%% CODE:
% Define Integration Limits
Low_Lim = -inf(1,2);
Med_Lim = [-0.1836 4.1085];
High_Lim = inf(1,2);
% Define bivariate curve properties
mu = [-0.2020 4.5194];
covar = [0.2940 0.2027
0.2027 0.1434];
Fraction_1 = mvncdf(Low_Lim,Med_Lim,mu,covar)
Fraction_2 = mvncdf(Med_Lim,High_Lim,mu,covar)
Fraction_3 = mvncdf([Low_Lim(1),Med_Lim(2)],[Med_Lim(1),High_Lim(1)],mu,covar)
Fraction_4 = mvncdf([Med_Lim(1),Low_Lim(1)],[High_Lim(1),Med_Lim(2)],mu,covar)
Fraction_1 + Fraction_2 + Fraction_3 + Fraction_4
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!