Dear Greg Snow / Rolf Turner:
I must thank you very much for your very prompt and a detailed response to my
query on t.test command.
I am attaching herewith, a file in csv format, containing the column vector with
on which I am performing the one-sample t-test using t.test. I understand that
1.96 is not an automatic rejection of null. However, at alpha = 0.05 and degrees
of freedom = 99 (100 observations minus 1), one may consider rejecting the null
at t-value greater than 1.96 for a two-tailed test and an absolute value of 1.64
for upper and lower tailed tests. I am performing one-sample t-test with a
hypothesized mean of 50 and the actual mean works out to 59.96753. I would also
like to bring to your notice that while, I perform a two-tailed t-test using the
following command:
t.test(X,mu=50,alternative='two.sided',conf.level=0.95)
I am getting a p-value < 2.2e-16.
If I use the same command with alternative = ?greater?, as follows:
t.test(X,mu=50,alternative='greater',conf.level=0.95)
I still get a p-value <2.2e-16
However, if I use the command with alternative = ?less?, as follows:
t.test(X,mu=50,alternative='less',conf.level=0.95)
I am getting a p-value = 1 and therefore, this query. As you mention in your
e-mail, I even thought that 2.2e-16 is to be deducted from 1 to get the p-value
for the ?less? and perhaps that seems to be a explanation to it.
I am still attaching the R script file and the data file for your perusal.
Thanking you once again.
Kindest regards,
Smruti Bulsari
LinkedIn Profile: https://www.linkedin.com/in/smruti-bulsari-0a30b312/
Blog Posts: https://wordpress.com/posts/smrutibulsari.wordpress.com
________________________________
From: Greg Snow <538280 at gmail.com>
Sent: 13 March 2019 01:36
To: SMRUTI BULSARI
Cc: r-help at R-project.org
Subject: Re: [R] Issue with t.test
Can you show us an example with the data that you are using and the
output from t.test.
A t-value of 1.96 is not an automatic rejection. It depends on alpha
and the degrees of freedom. Even if we set alpha at 0.05, 1.96 should
not give a p-value less than 0.05 with finite degrees of freedom.
This also depends on the arguments to t.test. If the alternative is
set to "Less" then a t value of 1.96 would give a p-value close to
0.975 for high degrees of freedom.
The only time I have seen t.test give a p-value of 1 is when the data
mean exactly equals the null hypothesis mean and the alternative is
the default of two.sided.
For us to diagnose what is going on we need to see your command (how
you are calling t.test) and what data you are using.
On Tue, Mar 12, 2019 at 1:49 PM SMRUTI BULSARI <bsmruti at hotmail.com>
wrote:>
> I am writing this e-mail as I have come across one issue while performing
t-test using R. If the function t.test(?) is used, a p-value of 1 is obtained
for a calculated t-value greater than 1.96. If the t-value is greater than 1.96,
the null hypothesis is rejected. However, if the p-value is greater than 0.05,
one may say that there is not enough evidence to reject the null hypothesis.
Thus, a t-value of greater than 1.96 and a p-value of 1 leaves the user of R
software confused on whether to reject or not to reject the null. Moreover, how
can p-value of stochastic process be exactly equal to 1? Can you please guide me
on whom should I report this issue to? Or can you please forward this issue to
the appropriate person / team?
>
> Thanking you,
>
> Sincerely,
>
> Smruti Bulsari
>
> Assistant Professor
> Department of Human Resource Development
> Veer Narmad South Gujarat University
> Surat - 395 007
> (Gujarat) INDIA
>
> Ph:+91-261-2256071 (Ext. 204)
>
> Alternate E-mail: sbbulsari at vnsgu.ac.in
>
> LinkedIn Profile: https://www.linkedin.com/in/smruti-bulsari-0a30b312/
>
> Blog Posts: https://wordpress.com/posts/smrutibulsari.wordpress.com
>
>
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> 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.
--
Gregory (Greg) L. Snow Ph.D.
538280 at gmail.com