On 07-Nov-09 09:02:38, huaru wang wrote:
> Hello, every one,
> 
> Using the qt() function in R, I got a different Student t-value
> with the Student t table.
> e.g. the return value of function qt(0.95,9) is 1.833, while in
> table it is 2.262.
> 
> I do not know why the difference exists. I guess it may be a bug
> in R.
> -- 

Not at all. The reason is that your table gives the t-value for a
two-sided test (with equal tails), i.e. 0.025 in each tail.
The function qt() in R returns the t-value for a one-sided test,
i.e. 0.05 in the (by default) upper tail. Compare:

  qt(0.95,9)
# [1] 1.833113
  qt(0.975,9)
# [1] 2.262157

The second value agrees with your table. Many printed tables give
the two-sided values, rather than the one-sided.

Hoping this helps,
Ted.

--------------------------------------------------------------------
E-Mail: (Ted Harding) <ted.hard...@manchester.ac.uk>
Fax-to-email: +44 (0)870 094 0861
Date: 07-Nov-09                                       Time: 09:55:50
------------------------------ XFMail ------------------------------

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to