2
$\begingroup$

I have the following Weibull distribution:

$f(x;\lambda,\beta) = (\lambda\beta)x^{(\beta-1)}e^{(-\lambda x^b)} $ where $\lambda$ is scale parameter and $\beta$ is shape parameter.

I have an alternative parameterization for Weibull in r link:

$f(x;a,b) = \frac{a}{b} (\frac{x}{b})^{(a-1)} e^{(- (x/b)^a)} $ where $a$ is shape parameter and $b$ is scale parameter.

How do you equate the shape and scale parameters from above distributions. Below is my solution. Clearly, I'm wrong.

> l=0.5
> b=2.5
> 
> dwei <- function(x,l,b){
+   l*b*x^(b-1)*exp(-l*(x^b))
+ }
> 
> dwei(x=2,l,b)
[1] 0.2089704
> dweibull(x=2, shape=b, scale = 1/l)
[1] 0.4598493
$\endgroup$
0

1 Answer 1

1
$\begingroup$

I think your order of operations is wrong. As a simplified example, $$\left(\frac{x}{2}\right)^2 = \frac{x^2}{4},$$ so in your pdf, you need $$(\lambda x)^{\beta - 1}=\lambda ^{\beta -1}x^{\beta - 1}$$ in the first product, and likewise inside the exponential function.

Putting it all together: $$ f(x;\lambda,\beta)= \lambda \beta (\lambda x)^{\beta - 1}\exp\left(-(\lambda x)^\beta\right) $$ and implemented in R to double-check:

dwei <- function(x,l,b){
   l * b * (l * x) ^ (b - 1) * exp( - (l * x) ^ b)
 }
dwei(x=2, l=0.5, b=2.5)
[1] 0.4598493

Which matches the R function output.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.