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

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

[Octave-bug-tracker] [bug #50169] u_test produces wrong result (reversed


From: Tasos Papastylianou
Subject: [Octave-bug-tracker] [bug #50169] u_test produces wrong result (reversed alternative hypothesis p value and inaccurate z value)
Date: Sat, 28 Jan 2017 13:50:30 +0000 (UTC)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:51.0) Gecko/20100101 Firefox/51.0

URL:
  <http://savannah.gnu.org/bugs/?50169>

                 Summary: u_test produces wrong result (reversed alternative
hypothesis p value and inaccurate z value)
                 Project: GNU Octave
            Submitted by: tpapastylianou
            Submitted on: Sat 28 Jan 2017 01:50:29 PM GMT
                Category: Octave Function
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Incorrect Result
                  Status: None
             Assigned to: None
         Originator Name: Tasos Papastylianou <poacheR>
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 4.2.0
        Operating System: Any

    _______________________________________________________

Details:

As per
http://stackoverflow.com/questions/41902166/octave-mann-whitney-u-test-p-value-confusion/




   1   1   1   1   1

octave:2> y=[2,2,2,2,2,2]
y =

   2   2   2   2   2   2

octave:3> [p,z]=u_test(x, y, "<>")
p =  0.0061699
z = -2.7386
octave:4> [p,z]=u_test(x, y, ">")
p =  0.0030849
z = -2.7386


The u_test function seems to have the 'alternative hypothesis' p values the
wrong way round.

Furthermore, the z value is inconsistent with other sources (online
calculators, and the equivalent function in julia, but those two are also
inconsistent with each other).
In fairness, the source code does state the z value will be inaccurate for
smaller sample sizes, but I have no idea where the discrepancy is coming from.




    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?50169>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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