Matlab 版 (精华区)
发信人: ramjet (史努比狗), 信区: Matlab
标 题: plotting statistical distributions
发信站: 哈工大紫丁香 (2001年11月13日12:04:58 星期二), 站内信件
有关概率分布的一个问题,我感觉好像有人问过,感兴趣的不妨看一下
Hi,
Is there a plot utility for the Gamma distribution which, like for
example
Weibplot for the Weibull distribution, can be used for plotting the
estimated Gamma distribution and the data as a straight line?
thanks in advance
Martijn
Post a follow-up to this message
Message 2 in thread
寄件者:Tom Lane (tlane@mathworks.com)
主旨:Re: plotting statistical distributions
新闻群组:comp.soft-sys.matlab
View this article only
日期:2001-11-12 07:24:54 PST
Martijn, gamma plotting is a little trickier than normal or Weibull
plotting. For the normal distribution, you can plot the data against
quantiles from the standard normal distribution (mean 0, variance 1),
and
the plot will look linear for normally distributed data regardless of
its
mean and variance. Different location and scale (mean and standard
deviation) parameters all produce linear plots, just with different
slopes
and intercepts.
For the Weibull distribution the same is true if you plot the log of
the
data. The log of the Weibull distribution is an extreme value
distribution,
and its parameters are also location and scale parameters.
For the gamma distribution things are not so fortunate. There's no
transformation that will remove the effect of the parameters. If you
know
the parameters you can do something like the following:
x = gamrnd(2,3,100,1); % generate gamma(2,3) data
pp = ((1:100)' - .5) / 100 % define some plotting positions
plot(gaminv(pp,2,3),sort(x),'x') % do a gamma plot using known
parameters
More realistically you will not know the parameters. You could try
using
gamfit to estimate them, as long as you realize that different values of
the
first parameter will lead to different curves that are not linear.
-- Tom
Post a follow-up to this message
--
在这个时代
如果你要为社会做一点贡献的话
那么就想办法
让你和你爱的人
好好的活着
※ 来源:·哈工大紫丁香 bbs.hit.edu.cn·[FROM: 202.118.237.3]
※ 修改:·ramjet 於 11月13日12:07:01 修改本文·[FROM: 202.118.237.3]
Powered by KBS BBS 2.0 (http://dev.kcn.cn)
页面执行时间:2.246毫秒