[Numpy-discussion] weibull distribution has only one parameter?

D.Hendriks (Dennis) D.Hendriks at tue.nl
Mon Nov 12 04:15:07 EST 2007

Robert Kern wrote:

>D.Hendriks (Dennis) wrote:
>>According to (for instance) 
>>http://en.wikipedia.org/wiki/Weibull_distribution the Weibull 
>>distribution has two parameters: lambda > 0 is the scale parameter 
>>(real) and k > 0 is the shape parameter (real). However, the 
>>numpy.random.weibull function has only a single 'a' parameter (except 
>>for the size parameter which indicates the size of the array to fill 
>>with values - this is NOT a parameter of the distribution itself). My 
>>question is how this 'a' parameter translates to the Weibull 
>>distribution as it 'normally' is and how to sample the distribution when 
>>I have the lambda and k parameters?
>lambda * numpy.random.weibull(k)
Thanks for the quick replay. However, when I look at the image of the 
probability density function at 
http://en.wikipedia.org/wiki/Weibull_distribution I see a red line and a 
green line, both with k=2. The red line is for lambda=0.5 and the green 
for lambda=1.0. The green line is not only half the height of the red 
one (while double the lambda factor!), but also has its mean a bit more 
to the right. Looking at the formulas on the same page, this makes 
sense. All of this makes me doubt the correctness of the formula you 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20071112/61d4bb7d/attachment.html>

More information about the NumPy-Discussion mailing list