![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/177765/image.jpeg)
2つの正規分布の重なりI calculate the heap of two normal distribution
조회 수: 21 (최근 30일)
이전 댓글 표시
2つの正規分布(各分布の合計は1)の重なる面積(割合)を計算する方法(若しくはコマンド)を知りたい。
2つの正規分布のμとσが分かっているので、μとσから算出する方法をお願いいたします。
I want to know a method (or, command) to calculate the area (a ratio) to occur at the same time of two normal distribution (as for total 1 of each distribution).
Because I understand μ and σ of two normal distribution, I ask for a method to calculate from μ and σ.
댓글 수: 0
답변 (1개)
Nick Hobbs
2015년 7월 21일
If you only need to find the area shared by two normal distributions, this can be done using an anonymous function, normpdf, and integral.
myNormalDistribution = @(x) min(normpdf(x, 0, 1), normpdf(x, 1, 1))
integralValue = integral(myNormalDistribution, -inf, inf)
integralValue will now contain the total area of the intersection of the two normal distributions (0.6171). This can be visualized with the following code:
x = -3:0.01:3;
plot(x, normpdf(x, 0, 1), x, normpdf(x, 1, 1))
hold on
area(x, myNormalDistribution(x))
The plot from the above code is shown below.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/177765/image.jpeg)
댓글 수: 0
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!