octave-maintainers
[Top][All Lists]
Advanced

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

Re: Help verifying statistics distribution functions


From: Michael D Godfrey
Subject: Re: Help verifying statistics distribution functions
Date: Sun, 19 Jun 2011 12:55:52 -0700
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110428 Fedora/3.1.10-1.fc15 Thunderbird/3.1.10

On 06/19/2011 10:58 AM, Rik wrote:
I'm in the process of overhauling the distribution functions in Octave in
order to expand them to accept and return class single arguments.  I've
found and fixed a bunch of corner cases, but I need some compatibility
testing from someone with the Matlab Statistics Toolbox.

This is a very good idea.  Here are Matlab results:

version:                                               < M A T L A B (R) >
                                                  Copyright 1984-2009 The MathWorks, Inc.
                                                Version 7.9.0.529 (R2009b) 64-bit (glnxa64)
                                                              August 12, 2009
>> binoinv (binocdf (1,4,0.5), 4, 0.5)

ans =

     2

>> binopdf (-1, 4, 0.5)

ans =

     0
>> fpdf (1,4.5,2)

ans =

    0.3027
>> fpdf (1, -1, 2)

ans =

   NaN

>> finv (0.5, Inf, 2)

ans =

   NaN
>> gaminv (0.5, Inf, 1)

ans =

   NaN

>> hygeinv (0, 4, 2, 2)

ans =

     0
>> hygecdf (1, 4.5, 2, 2)

ans =

   NaN

>> hygecdf (1, -4, 2, 2)

ans =

   NaN

>> hygecdf (3, 4, 2, 2)

ans =

     1

>> normpdf (1,1,0)

ans =

   NaN

>> normcdf ([])

ans =

     []

>> tpdf (1, 1.5)

ans =

    0.1799

>> unidinv (0, 2:5)

ans =

   NaN   NaN   NaN   NaN

>> unidpdf (-1, 10)

ans =

     0

>> unidpdf (2.5, 10)

ans =

     0

>> unidcdf (3.5, 10)

ans =

    0.3000
===================================

I think that is all you asked for.   As you likely know Matlab is the right
place to check compatibility.  R  is the right place to check for correctness.
R is free.

Michael









reply via email to

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