> Hello Heinz,
>
>> De : Heinz Nabielek
>> Envoy? : mardi 7 f?vrier 2023 13:07
>>
>> cdfchi = cumulative distribution function chi-square distribution.
>> I want to generate the 95% confidence limit of small numbers like below
>
> According to https://help.scilab.org/doc/6.0.0/en_US/cdfchi.html
> I think the following does what you want:
>
> n = 1:5
> P = 0.95*ones(n)
> Q = 1 - P
> [Xmax] = cdfchi("X", n, P, Q)
> [Xmin] = cdfchi("X", n, Q, P)

Great many thanks. Result is then

--> [Xmin' n' Xmax']
   0.0039321   1.   3.8414588
   0.1025866   2.   5.9914645
   0.3518463   3.   7.8147279
   0.710723    4.   9.487729
   1.1454762   5.   11.070498

However, EXCEL conf=0.95 gives me:
0.02531781      1       5.57164339
0.24220928      2       7.22468767
0.61867212      3       8.76727307
1.08986537      4       10.2415887
1.62348639      5       11.6683321

for Xmin=CHIINV(1-(1-conf)/2,2*n)/2
for Xmax=CHIINV((1-conf)/2,2*(n+1))/2

Also, for large numbers, upper 95% limit should be approx. n+1.96√n
n       n+1.96√n          cdfchi
50      63.86   67.50
100     119.60  124.34
150     174.00  179.58

Where do I go wrong with the  chi-square distribution?
Heinz
  ______________
Dr Heinz Nabielek
Schüttelstrasse 77A/11
1020 Wien, Österreich
Tel +43 1 276 56 13
cell +43 677 616 349 22


_______________________________________________
users mailing list - users@lists.scilab.org
Click here to unsubscribe: <mailto:users-unsubscr...@lists.scilab.org>
https://lists.scilab.org/mailman/listinfo/users
This email and any attachments are intended solely for the use of the 
individual or entity to whom it is addressed and may be confidential and/or 
privileged.

If you are not one of the named recipients or have received this email in error,

(i) you should not read, disclose, or copy it,

(ii) please notify sender of your receipt by reply email and delete this email 
and all attachments,

(iii) Dassault Systèmes does not accept or assume any liability or 
responsibility for any use of or reliance on this email.


Please be informed that your personal data are processed according to our data 
privacy policy as described on our website. Should you have any questions 
related to personal data protection, please contact 3DS Data Protection Officer 
https://www.3ds.com/privacy-policy/contact/

Reply via email to