On 04.11.2022, at 09:46, Dang Ngoc Chan, Christophe <christophe.d...@sidel.com> wrote:

Hello Heinz,

De : users <users-boun...@lists.scilab.org> De la part de Heinz Nabielek
Envoyé : mardi 1 novembre 2022 22:02

I need to compute the inverse of the cumulative beta function, but I just cannot handle cdfbet.

From what I undestand in
https://help.scilab.org/docs/6.1.1/en_US/cdfbet.html
the notation for the beta function in Scilab is :
P = \int_{0}^{X} t^{A-1} * (1-t)^{B-1} dt
What you want is X knowing [P, A, B] right ?
The syntax seems to be
[X,Y]=cdfbet("XY",A,B,P,Q)
With Q = 1 - P.
With your examples:
--> [X,Y]=cdfbet("XY",1 ,10 ,0.95 ,0.05)
X  = 0.2588656
Y  = 0.7411344
--> [X,Y]=cdfbet("XY",1 ,100 ,0.95 ,0.05)
X  = 0.0295130
Y  = 0.9704870

Regards
Christophe Dang Ngoc Chan



Dear Christophe et Stéphane,
great many thanks for the patient explanations.
This way I was able to compute acceptance limits in the large-scale manufacture of small objects that are difficult to find in textbooks.
Greetings
Heinz   ... I am certain that you can generate a much more efficient Scilab code.

N=10^(3:9);
def=[300 100 30 10 3 1 0];
for i=1:7;
NN=N(i);
for j=1:7;
defects=def(j);
A(i,j)=cdfbet("XY", defects+1, NN+1-defects, .95,.05);
end;
plot2d(1e9,1,logflag='ll');xgrid();
plot(N', A,'--','LineWidth',3);
a=gca();a.font_size=3;
legend ('n=','300 defects','100 defects','30 defects','10 defects','3 defects','1 defect','0 defects');
xlabel('N = number of particles investiged','fontsize',3);
ylabel('one-sided upper 95% defect fraction','fontsize',3);
title ('Acceptance limit of defect fraction n/N at 95% confidence','fontsize',4);



Attachment: Acceptance limit of defect fraction n over N at 95% confidence.pdf
Description: Adobe PDF document





______________
Dr Heinz Nabielek
Schüttelstrasse 77A/11
A-1020 Wien, Österreich
Tel +43 1 276 56 13
cell +43 677 616 349 22
heinznabie...@me.com


_______________________________________________
users mailing list - users@lists.scilab.org
Click here to unsubscribe: <mailto:users-unsubscr...@lists.scilab.org>
http://lists.scilab.org/mailman/listinfo/users

Reply via email to