# HP Forums

Full Version: probability plot - weibull
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello,

I own my HP Prime for some day and I am fascinated about the possibilities.
I have now one question. I would like to calculate failure probabilities with "Weibull probability plots" based on measured data.
So my question is, is there any probability to generate a Weibull probability plot on a HP Prime?
I have seen the weibull and weibull_cdf function but I don't know what the parameters (k,n,t,x,x2) are and how I could calculate these parameters with the HP Prime based on my measured data.

Thank you. & Best regards,
Marcus
The syntax is :
weibull_cdf(Real(k),Real(lambda),[Real(theta)],Real(x1),[Real(x2)])
Cf. https://en.wikipedia.org/wiki/Weibull_distribution for parameter definitions, theta is an additional optionnal parameter, a shift in x.
Hey Parisse,

thank you for you answer regarding weibull_cdf.

I think this function is useful when I know the parameters of my weibull distribution. My problem is, that I have measured data and would like to build/fit a weibull function based on this data.

Has anyone an idea how to realize this with my HP Prime?

Best regards,
Marcus
Hey,

I think I found a solution, based on this:
http://www.real-statistics.com/distribut...egression/

I am not so good in coding, but maybe there is someone how can use this:

Code:
``` LOCAL len :=0; LOCAL n :=0; LOCAL param := 0; LOCAL beta := 0; LOCAL lambda := 0; LOCAL value := 0; EXPORT weibull_ifitr(data,percent) BEGIN C1:=data; len:=length(C1); C2:=sort(C1); C3:=ln(C2); FOR n FROM 1 TO len DO C4(n):=(n-0.5)/len; END; C5:=ln(-ln(1-C4)); param:=linear_regression(C3,C5); beta:=param(1); lambda:=e^(-param(2)/param(1)); value:=weibull_icdf(beta,lambda,percent); RETURN value; END;```