在Mathematica交叉路口右侧的曲线下找到2条曲线和面积的交点

Jag*_*gra 3 wolfram-mathematica calculus

我有2条曲线用以下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}]]
Run Code Online (Sandbox Code Playgroud)

Mathematica图形

我需要做两件事:

  1. 找到两条曲线相交的x和y坐标
  2. 找到上面交点中x坐标右侧红色曲线下方的区域.

我之前没有在Mathematica中做过这种问题,也没有找到在文档中做到这一点的方法.不确定要搜索什么.

Dan*_*lau 10

可以找到它们与Solve相交的位置(或者可以使用FindRoot).

intersect = 
 x /. First[
   Solve[PDF[NormalDistribution[0.044, 0.040], x] == 
     PDF[NormalDistribution[0.138, 0.097], x] && 0 <= x <= 2, x]]
Run Code Online (Sandbox Code Playgroud)

出[4] = 0.0995521

现在把CDF带到那一点.

CDF[NormalDistribution[0.044, 0.040], intersect]
Run Code Online (Sandbox Code Playgroud)

出[5] = 0.917554

不确定你是否想要从x = 0或-infinity开始; 我的版本是后者.如果前者然后只减去在x = 0处评估的CDF.

FindRoot用法将是

intersect = 
 x /. FindRoot[
   PDF[NormalDistribution[0.044, 0.040], x] == 
    PDF[NormalDistribution[0.138, 0.097], x], {x, 0, 2}]
Run Code Online (Sandbox Code Playgroud)

出[6] = 0.0995521

如果您使用的是概率分布以外的其他东西,则可以将其积分到交点值.使用CDF是一个有用的快捷方式,因为我们有一个PDF集成.

Daniel Lichtblau Wolfram Research