Dear R,

I am using this R version:R version 2.11.1 (2010-05-31)(Cran Mirror Berlin)



It seems to me, that R constructs a wrong confidence intervall if you try to get a one sided t-test.

If the true mean is 1 and my alternative hypothesis (H1) says that mu is smaller ("less")than zero the conf. intervall should reach +∞ and not -∞ if it is constructed for the H0 saying that mu is greater or equal to zero.



> rnorm(20,1)->n

> mean(n)

[1] 1.206958

 

> t.test(n,mu=0,alternative="less")  

        One Sample t-test

 

data:  n 

t = 9.3976, df = 19, p-value = 1        alternative hypothesis: true mean is less than 0 

95 percent confidence interval:

     -Inf 1.429035         sample estimates:

mean of x 

 1.206958



Hope I am right you can help me if I am wrong.



Greetings,



Ingo Meemken

	[[alternative HTML version deleted]]

