You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

指数修正正态分布拟合疑问:loc参数为何不等于分布均值?

Clarifying the Exponentially Modified Normal Distribution Mean in SciPy

It’s totally reasonable to assume the loc parameter maps directly to the distribution’s mean—many common distributions in SciPy work that way! But the exponentially modified normal (exponnorm) is a special case because it’s a convolution of two separate distributions, so its mean depends on a combination of parameters, not just loc.

Why loc Isn’t the Overall Mean

The exponnorm distribution in SciPy combines a normal distribution and an exponential distribution:

  • The loc parameter only sets the mean of the underlying normal component of the distribution.
  • The full distribution’s mean is calculated using all three parameters: loc, scale, and K.

For SciPy’s implementation, the exact formula for the mean is:

mean = loc + scale * K

Verifying Your Fit

Using your reported parameters:

  • K=10.84, loc=154.35, scale=73.82

Plugging into the formula gives us:
154.35 + (73.82 * 10.84) ≈ 154.35 + 800.21 = 954.56

The slight difference from your fitted mean of 984 is likely due to rounding in the parameter values you shared (e.g., maybe K was calculated with more precision as ~11.24). Regardless, the key takeaway is that loc doesn’t represent the full distribution’s mean—your stats() call is correctly computing the combined mean, which matches your dataset, so the fit is valid.

Quick Recap

  • For exponnorm, loc = mean of the normal component only
  • Full distribution mean = loc + scale * K
  • Your code’s result aligning with your dataset’s mean confirms the fit is working as intended

内容的提问来源于stack exchange,提问作者Adam Schroeder

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.20 12:10:51