octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #66034] finv results when second value of degr


From: José Luis García Pallero
Subject: [Octave-bug-tracker] [bug #66034] finv results when second value of degrees of freedom tends to infinity
Date: Sat, 27 Jul 2024 17:23:58 -0400 (EDT)

URL:
  <https://savannah.gnu.org/bugs/?66034>

                 Summary: finv results when second value of degrees of freedom
tends to infinity
                   Group: GNU Octave
               Submitter: jgpallero
               Submitted: sáb 27 jul 2024 21:23:55
                Category: Octave Function
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Incorrect Result
                  Status: None
             Assigned to: None
         Originator Name: jgpallero
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: other
        Operating System: Any
           Fixed Release: None
         Planned Release: None


    _______________________________________________________

Follow-up Comments:


-------------------------------------------------------
Date: sáb 27 jul 2024 21:23:55      By: José Luis García Pallero
<jgpallero>
Function 

X = finv (P, DF1, DF2)

returns erratic values when DF2 adopts very big values:

>> finv(0.025,10,100000000000)
ans = 0.3908
>> finv(0.025,10,1000000000000)
ans = 0.3926
>> finv(0.025,10,10000000000000)
ans = 0.3697
>> finv(0.025,10,100000000000000)
ans = 0.1110
>> finv(0.025,10,1000000000000000)
ans = 1.4655
>> finv(0.025,10,10000000000000000)
ans = 0.2220
>> finv(0.025,10,100000000000000000)
ans = 1.4901e+07
>> finv(0.025,10,1000000000000000000)
ans = 1.4901e+08
>> finv(0.025,10,10000000000000000000)
ans = 1.4901e+09
>> finv(0.025,10,inf)
ans = NaN

If DF2 is assigned explicitly to infinity, the result is NaN

But in Matlab this problem is solved:

>> finv(0.025,10,100000000000)
ans =
    0.3223
>> finv(0.025,10,1000000000000)
ans =
    0.3223
>> finv(0.025,10,10000000000000)
ans =
    0.3223
>> finv(0.025,10,100000000000000)
ans =
    0.3223
>> finv(0.025,10,1000000000000000)
ans =
    0.3223
>> finv(0.025,10,10000000000000000)
ans =
    0.3223
>> finv(0.025,10,100000000000000000)
ans =
    0.3223
>> finv(0.025,10,1000000000000000000)
ans =
    0.3223
>> finv(0.025,10,10000000000000000000)
ans =
    0.3223
>> finv(0.025,10,inf)
ans =
    0.3247


The F-Snedecor with infinity degrees of freedom in the denominator tends to
chi-square with DF1 divided by DF1:

>> chi2inv(0.025,10)/10
ans = 0.3247


I don't know the algorithm used in Octave, but at least it would be nice if
infinity is used as DF2, it would be detected and internally use chi2inv
(P,DF1)/DF1







    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?66034>

_______________________________________________
Mensaje enviado vía Savannah
https://savannah.gnu.org/

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]