Weibull Distribution Behaving Weirdly?

318 Views Asked by At

I'm attempting to fit a cumulative Weibull curve to some psychophysics perception data. Basically, we're testing the subject's accuracy at a number of different motion speeds, and attempting to fit the data with an upside-down Weibull (should look like a backwards S shape) in order to accurately determine the subject's threshold.

The form of the equation is:

1 - 0.5*exp((-x/a)^b).

a is the "scale parameter" and b is the "shape parameter".

The reason for the 0.5 is that in psychophysics we assume that the worst a subject can perform, given no information at all, is at chance, or 50%.

Using matlab's nlinfit function, I acquired these estimated parameters: a = -0.8, b = -22. I think that b has to be negative to flip the curve upside down.

The weird thing is that instead of going from 1 to 0 in a smooth cumulative-distribution way, the graph of the function seems to shoots off to oscillate between ∞ and -∞ as you get close to x=1. With other similar parameters (such as a = 1, b = -10), it does similarly crazy things, like start at -∞. This makes no sense to me -- how can the function possibly go above 1 or below 0, when both parameters are negative? Perhaps if a<0 and b>0, I could see how the function could get to +∞, but this isn't the case. Shouldn't these parameters make for 1-(a very small number)? Also, it's not just a general problem with my equation or the graphing tool -- using more reasonable parameters (for example, a=1 b=-5), the graph looks very pretty indeed.

I haven't worked with the versatile Weibull distribution before...Any ideas as to why the function could be behaving this way given these parameters?

Much appreciated, Michaela

1

There are 1 best solutions below

0
On

If your equation is supposed to be the CDF of a Weinbull, it should rather be $$1 - exp(-(x/a)^b)$$

Notice (besides the removed 0.5) that the minus sign position is outside the inside parentheses.

Notice also that both parameters must be positive.