HP Forums
probability plot - weibull - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html)
+--- Forum: HP Prime (/forum-5.html)
+--- Thread: probability plot - weibull (/thread-10301.html)



probability plot - weibull - Marcus_W - 03-09-2018 08:26 PM

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


RE: probability plot - weibull - parisse - 03-10-2018 07:11 AM

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.


RE: probability plot - weibull - Marcus_W - 03-10-2018 01:07 PM

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


RE: probability plot - weibull - Marcus_W - 03-10-2018 11:44 PM

Hey,

I think I found a solution, based on this:
http://www.real-statistics.com/distribution-fitting/fitting-weibull-regression/

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;

Comments are welcome.

bye,
Marcus