[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #44996] statistics: Appropriate results of gev
From: |
Rafael Laboissiere |
Subject: |
[Octave-bug-tracker] [bug #44996] statistics: Appropriate results of gev(c|p)df function for small values of k |
Date: |
Sat, 02 May 2015 10:52:12 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.118 Safari/537.36 |
URL:
<http://savannah.gnu.org/bugs/?44996>
Summary: statistics: Appropriate results of gev(c|p)df
function for small values of k
Project: GNU Octave
Submitted by: rlaboiss
Submitted on: Sat 02 May 2015 10:52:10 AM GMT
Category: Octave Forge Package
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Inaccurate Result
Status: None
Assigned to: None
Originator Name:
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Release: dev
Operating System: Any
_______________________________________________________
Details:
When computing the cdf and pdf of the GEV distributions, in functions gevcdf
and gevpdf, respectively, the parameter k appears in the denominator of a
division operation. To avoid division by zero, the condition k==0 is tested
and an alternative formula is used for it.
However, this test should be extended to values very close to zero. Doing
some non-extensive tests, I concluded that the function returns wrong results
for values of abs(k) lesser than 1e-11. The most appropriate limit value
should be more carefully chosen, though.
This problem was evidenced in unit tests of the gevcdf and gevpdf functions.
In one case, we have:
k = -0.03 : 0.01 : 0.03;
In my system (Octave 4.0 on Debian i386), the fourth element of k is different
from zero (it is equal 3.4694e-18) and the result of gevcdf is clearly wrong,
and the unit test fails.
Patch attached.
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: Sat 02 May 2015 10:52:10 AM GMT Name: small-k-in-gev-functions.diff
Size: 2kB By: rlaboiss
<http://savannah.gnu.org/bugs/download.php?file_id=33876>
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?44996>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #44996] statistics: Appropriate results of gev(c|p)df function for small values of k,
Rafael Laboissiere <=