[R] Issue with t.test

Jim Lemon drj|m|emon @end|ng |rom gm@||@com
Wed Mar 13 21:55:19 CET 2019


Hi Smruti,
In the example in question, you are probably doing something like this:

# I didn't see any attachment for the data
X<-rnorm(99,mean=59.96753)
t.test(X,mu=50,alternative="less")

       One Sample t-test

data:  X
t = 101.29, df = 98, p-value = 1
alternative hypothesis: true mean is less than 50
95 percent confidence interval:
    -Inf 60.07022
sample estimates:
mean of x
59.90779

What this probably means is since the lower confidence interval for
the test is undefined, the program returns a p-value of 1 as an
estimate, much like the p-value<2.2e-16 for the other tests.

> 1-2e-16
[1] 1

Neither of these values are exact, but indicate that the null
hypothesis should be accepted or rejected respectively.

Jim



More information about the R-help mailing list