在Matlab中绘制正态分布

问题描述 投票:1回答:2

这是绘制正态分布的好方法吗?有时,我得到的pdf值(pdf_x)大于1。

% thresh_strain contains a Normally Distributed set of numbers
[mu_j,sigma_j] = normfit(thresh_strain);   
x=linspace(mu_j-4*sigma_j,mu_j+4*sigma_j,200);   
pdf_x = 1/sqrt(2*pi)/sigma_j*exp(-(x-mu_j).^2/(2*sigma_j^2));   
plot(x,pdf_x);

谢谢

<< img src =“ https://image.soinside.com/eyJ1cmwiOiAiaHR0cHM6Ly9pLnN0YWNrLmltZ3VyLmNvbS9WMmNWcC5wbmcifQ==” alt =“在此处输入图像描述”>

matlab normal-distribution
2个回答
1
投票

pdf的整数为1,在任何时候值都可以更高。您的情节是核心。


0
投票

正如@ Daniel在他的answer中指出的那样,对于连续随机变量,PDF是概率(或强度的度量)的导数,因此可以大于1。 CDF是概率,必须始终为[0,1]。

作为示例,请使用下面标记的分布。每条曲线下的面积为1(它们是有效分布),但密度可以大于1。

Example w/ PDFs above 1

[与StackExchange相关的帖子:herehere

© www.soinside.com 2019 - 2024. All rights reserved.