我有两条曲线,用下面的Mathematica代码说明:
Show[Plot[PDF[NormalDistribution[0.044, 0.040], x], {x, 0, 0.5}, PlotStyle -> Red],
Plot[PDF[NormalDistribution[0.138, 0.097], x], {x, 0, 0.5}]]

我需要做两件事:
以前我还没有在Mathematica中做过这样的问题,也没有在文档中找到这样的方法。不知道该找什么。
发布于 2011-02-03 18:00:56
可以找到他们与解决方案交叉的地方(或者可以使用FindRoot)。
intersect =
x /. First[
Solve[PDF[NormalDistribution[0.044, 0.040], x] ==
PDF[NormalDistribution[0.138, 0.097], x] && 0 <= x <= 2, x]]Out4= 0.0995521
现在,拿民防部队到这一点。
CDF[NormalDistribution[0.044, 0.040], intersect]Out5= 0.917554
不确定您是想从x=0还是-infinity开始;我的版本是后者。如果前者只是减去在x=0上评估的If。
FindRoot的使用将是
intersect =
x /. FindRoot[
PDF[NormalDistribution[0.044, 0.040], x] ==
PDF[NormalDistribution[0.138, 0.097], x], {x, 0, 2}]Out6= 0.0995521
如果您使用的不是概率分布,则可以将其集成到交集值。使用CDF是一个有用的捷径,因为我们有一个PDF集成。
Daniel Lichtblau研究
https://stackoverflow.com/questions/4889634
复制相似问题