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

[Pkg-octave-devel] Bug#510825: marked as done (octave3.0-htmldoc: Switch ">" and "<" in third argument to t_test_2())



Your message dated Mon, 5 Jan 2009 16:45:39 +0100
with message-id <20090105154539.GE31859@pc110.lyon.inserm.fr>
and subject line Re: Bug#510825: octave3.0-htmldoc: Switch ">" and "<" in third argument to t_test_2()
has caused the Debian Bug report #510825,
regarding octave3.0-htmldoc: Switch ">" and "<" in third argument to t_test_2()
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
510825: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=510825
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: octave3.0-htmldoc
Version: 1:3.0.1-6lenny1
Severity: normal

Thanks for maintaining octave.

I just used it gain to a statistical insight.

However, it seems to me that the t_test_2()
function, or its documentation, has reversed the
meanings of ">" and "<" in its third argument,
named "alt".

file:///usr/share/doc/octave3.0-htmldoc/interpreter/Tests.html
says

    "If alt is ">", the one-sided alternative mean
    (x) > mean (y) is used."

But, it seems to me that "<" is used.

Here's how I tested it...

    octave:1> x = [ 0, 1, 2 ]
    x =

      0  1  2

    octave:2> y = [ 100, 102, 103 ]
    y =

      100  102  103

    octave:3> t_test_2(x,y,">");
      pval: 1

I expected the pval to be close to 0.

Thanks,
Kingsley

-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (990, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)

Kernel: Linux 2.6.25-2-686 (SMP w/2 CPU cores)
Locale: LANG=en_US, LC_CTYPE=en_US (charmap=ISO-8859-1)
Shell: /bin/sh linked to /bin/bash

octave3.0-htmldoc depends on no packages.

octave3.0-htmldoc recommends no packages.

Versions of packages octave3.0-htmldoc suggests:
ii  chimera2 [www-browse 2.0a19-5            Web browser for X
ii  dillo [www-browser]  0.8.3-1             GTK-based web browser
ii  elinks [www-browser] 0.4.2.99-1          Character mode WWW/FTP browser
ii  emacs21 [www-browser 21.2-1              The GNU Emacs editor.
ii  iceweasel [www-brows 3.0.5-1             lightweight web browser based on M
ii  konqueror [www-brows 4:3.5.9.dfsg.1-2+b1 KDE's advanced file manager, web b
ii  links [www-browser]  0.99-1              Character mode WWW browser
ii  lynx [www-browser]   2.8.5-1             Text-mode WWW Browser
ii  octave3.0            1:3.0.3-1           GNU Octave language for numerical 
ii  w3m [www-browser]    0.5.2-2+b1          WWW browsable pager with excellent

-- no debconf information



--- End Message ---
--- Begin Message ---
* Kingsley G. Morse Jr. <change@nas.com> [2009-01-04 23:18]:

> Package: octave3.0-htmldoc
> Version: 1:3.0.1-6lenny1
> Severity: normal
> 
> Thanks for maintaining octave.
> 
> I just used it gain to a statistical insight.
> 
> However, it seems to me that the t_test_2()
> function, or its documentation, has reversed the
> meanings of ">" and "<" in its third argument,
> named "alt".
> 
> file:///usr/share/doc/octave3.0-htmldoc/interpreter/Tests.html
> says
> 
>     "If alt is ">", the one-sided alternative mean
>     (x) > mean (y) is used."
> 
> But, it seems to me that "<" is used.
> 
> Here's how I tested it...
> 
>     octave:1> x = [ 0, 1, 2 ]
>     x =
> 
>       0  1  2
> 
>     octave:2> y = [ 100, 102, 103 ]
>     y =
> 
>       100  102  103
> 
>     octave:3> t_test_2(x,y,">");
>       pval: 1
> 
> I expected the pval to be close to 0.

Thanks for your bug report but I think the doc string is correct.  I am
hereby closing this bug report.  However, feel free to reopen it if you have
strong and good arguments.

When you do t_test_2(x,y,">"), you are testing whether mean(x) is
significantly greater than mean(y), which means that your null hypothesis is
mean(x) <= mean (y).  Only when mean(X) is clearly greater than mean(y), you
will get a p-value close to zero, meaning that you can reject the null
hypothesis and say "yes, mean(x) is greater than mean(y)".

As a matter of fact, the behavior of Octave's t_test_2 is identical as R's
t.test function:

$ R
> ?t.test
[snip]
Description:

     Performs one and two sample t-tests on vectors of data.

Usage:
[snip]
     ## Default S3 method:
     t.test(x, y = NULL,
            alternative = c("two.sided", "less", "greater"),
            mu = 0, paired = FALSE, var.equal = FALSE,
            conf.level = 0.95, ...)
[snip]
Arguments:

       x: a (non-empty) numeric vector of data values.

       y: an optional (non-empty) numeric vector of data values.

alternative: a character string specifying the alternative hypothesis,
          must be one of '"two.sided"' (default), '"greater"' or
          '"less"'.  You can specify just the initial letter.
[snip]
Details:

     The formula interface is only applicable for the 2-sample tests.

     'alternative = "greater"' is the alternative that 'x' has a larger
     mean than 'y'.
[snip]
> x <- c (0, 1, 2)
> y <- c (100, 102, 103)
> t.test(x,y,"greater")$p.value
[1] 0.9999997

-- 
Rafael


--- End Message ---

Reply to: