[Rd] Printing the null hypothesis
(Ted Harding)
Ted.Harding at manchester.ac.uk
Sun Aug 16 12:55:20 CEST 2009
On 16-Aug-09 10:38:40, Liviu Andronic wrote:
> Dear R developers,
> Currently many (all?) test functions in R describe the alternative
> hypothesis, but not the the null hypothesis being tested. For example,
> cor.test:
>> require(boot)
>> data(mtcars)
>> with(mtcars, cor.test(mpg, wt, met="kendall"))
>
> Kendall's rank correlation tau
>
> data: mpg and wt
> z = -5.7981, p-value = 0.000000006706
> alternative hypothesis: true tau is not equal to 0
> sample estimates:
> tau
> -0.72783
>
> Warning message:
> In cor.test.default(mpg, wt, met = "kendall") :
> Cannot compute exact p-value with ties
>
>
> In this example,
> H0: (not printed)
> Ha: true tau is not equal to 0
>
> This should be fine for the advanced users and expert statisticians,
> but not for beginners. The help page will also often not explicitely
> state the null hypothesis. Personally, I often find myself in front of
> an htest object guessing what the null should have reasonably sounded
> like.
>
> Are there compelling reasons for not printing out the null being
> tested, along with the rest of the results? Thank you
> Liviu
I don't know about *compelling* reasons! But (as a general rule)
if the Alternative Hyptohesis is stated, then the Null Hypothesis
is simply its negation. So, in your example, you can infer
H0: true tau equals 0
Ha: true tau is not equal to 0.
I don't think one needs to be an advanced user or expert statistician
to see this -- it is part of the basic understanding of hypothesis
testing.
Some people might regard the "H0" statement as simply redundant!
The "Ha" statement is, however, essential, since different alterntatives
may ne adopted depending on the application such as
Ha: true tau is greater than 0
(implicit: true tau <= 0)
or
Ha: tru tau is less than 0
(implicit: true tau >= 0)
Hoping this helps,
Ted.
--------------------------------------------------------------------
E-Mail: (Ted Harding) <Ted.Harding at manchester.ac.uk>
Fax-to-email: +44 (0)870 094 0861
Date: 16-Aug-09 Time: 11:55:15
------------------------------ XFMail ------------------------------
More information about the R-devel
mailing list