|
View:
New views
5 Messages
—
Rating Filter:
Alert me
|
|
|
a bug with Student t-value??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. -- Íõ»¯Èå ²©Ê¿Ñо¿Éú ±±¾©Ê¦·¶´óѧ¾°¹ÛÉú̬Óë¿É³ÖÐøÐÔ¿ÆÑ§Ñо¿ÖÐÐÄ ±±¾©Êк£µíÇøÐ½ֿÚÍâ´ó½Ö19ºÅ±±¾©Ê¦·¶´óѧÉúÃü¿ÆÑ§Ñ§Ôº 100875 Huaru Wang PhD Candidate, CLESS, College of Life Science, Beijing Normal University Tel: 010 - 5880 5812 Cell phone:189 0137 6067 No.19 Xinjiekouwai Street, Beijing 1000875 [[alternative HTML version deleted]] ______________________________________________ R-help@... 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. |
|
|
Re: a bug with Student t-value??Hi Huaru,
Are you sure you are looking at 0.95 and NOT 0.975? as qt(0.975,9) = 2.262 generally tables are given for alpha/2 (alpha=0.05 in your case) significance. Please check carefully. Thx, S. On Sat, Nov 7, 2009 at 4:02 AM, huaru wang <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. > -- > Íõ»¯Èå ²©Ê¿Ñо¿Éú > ±±¾©Ê¦·¶´óѧ¾°¹ÛÉú̬Óë¿É³ÖÐøÐÔ¿ÆÑ§Ñо¿ÖÐÐÄ > ±±¾©Êк£µíÇøÐ½ֿÚÍâ´ó½Ö19ºÅ±±¾©Ê¦·¶´óѧÉúÃü¿ÆÑ§Ñ§Ôº 100875 > Huaru Wang > PhD Candidate, CLESS, College of Life Science, Beijing Normal University > Tel: 010 - 5880 5812 > Cell phone:189 0137 6067 > No.19 Xinjiekouwai Street, Beijing 1000875 > > [[alternative HTML version deleted]] > > > ______________________________________________ > R-help@... 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. > > ______________________________________________ R-help@... 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. |
|
|
Re: a bug with Student t-value??Hi, Sunny,
Sorry for my mistake. Thank you for your correction. Thx, Huaru 2009/11/7 Sunny Srivastava <research.baba@...> > Hi Huaru, > Are you sure you are looking at 0.95 and NOT 0.975? > > as qt(0.975,9) = 2.262 > > generally tables are given for alpha/2 (alpha=0.05 in your case) > significance. > > > Please check carefully. > > Thx, > S. > > On Sat, Nov 7, 2009 at 4:02 AM, huaru wang <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. >> -- >> Íõ»¯Èå ²©Ê¿Ñо¿Éú >> ±±¾©Ê¦·¶´óѧ¾°¹ÛÉú̬Óë¿É³ÖÐøÐÔ¿ÆÑ§Ñо¿ÖÐÐÄ >> ±±¾©Êк£µíÇøÐ½ֿÚÍâ´ó½Ö19ºÅ±±¾©Ê¦·¶´óѧÉúÃü¿ÆÑ§Ñ§Ôº 100875 >> Huaru Wang >> PhD Candidate, CLESS, College of Life Science, Beijing Normal University >> Tel: 010 - 5880 5812 >> Cell phone:189 0137 6067 >> No.19 Xinjiekouwai Street, Beijing 1000875 >> >> [[alternative HTML version deleted]] >> >> >> ______________________________________________ >> R-help@... mailing list >> https://stat.ethz.ch/mailman/listinfo/r-help >> PLEASE do read the posting guide >> http://www.R-project.org/posting-guide.html<http://www.r-project.org/posting-guide.html> >> and provide commented, minimal, self-contained, reproducible code. >> >> > -- Íõ»¯Èå ²©Ê¿Ñо¿Éú ±±¾©Ê¦·¶´óѧ¾°¹ÛÉú̬Óë¿É³ÖÐøÐÔ¿ÆÑ§Ñо¿ÖÐÐÄ ±±¾©Êк£µíÇøÐ½ֿÚÍâ´ó½Ö19ºÅ±±¾©Ê¦·¶´óѧÉúÃü¿ÆÑ§Ñ§Ôº 100875 Huaru Wang PhD Candidate, CLESS, College of Life Science, Beijing Normal University Tel: 010 - 5880 5812 Cell phone:189 0137 6067 No.19 Xinjiekouwai Street, Beijing 1000875 [[alternative HTML version deleted]] ______________________________________________ R-help@... 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. |
|
|
Re: a bug with Student t-value??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.Harding@...> Fax-to-email: +44 (0)870 094 0861 Date: 07-Nov-09 Time: 09:55:50 ------------------------------ XFMail ------------------------------ ______________________________________________ R-help@... 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. |
|
|
Re: a bug with Student t-value??Sunny Srivastava wrote:
> Hi Huaru, > Are you sure you are looking at 0.95 and NOT 0.975? > > as qt(0.975,9) = 2.262 > > generally tables are given for alpha/2 (alpha=0.05 in your case) > significance. > > Please check carefully. Or, put differently, tables are often given for two-sided p-values (especially in the back pages of textbooks), whereas qt() is for one-sided. I.e. the t distribution with 9 DF has a probability of 0.95 of falling BELOW 1.833 but also of falling BETWEEN -2.262 and +2.262. -- O__ ---- Peter Dalgaard Øster Farimagsgade 5, Entr.B c/ /'_ --- Dept. of Biostatistics PO Box 2099, 1014 Cph. K (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~~~~~~~~~ - (p.dalgaard@...) FAX: (+45) 35327907 ______________________________________________ R-help@... 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. |
| Free embeddable forum powered by Nabble | Forum Help |