[R] {10,20,30}>={25,30,15}

francogrex francogrex at mail.com
Fri May 18 21:15:02 CEST 2007


At the alpha level you set, A is neither greater nor less than B. Supposing
you don't use paired t.test: 
data:  c(10, 20, 30) and c(25, 30, 15) 
t = -0.4588, df = 3.741, p-value = 0.6717
alternative hypothesis: true difference in means is not equal to 0 
95 percent confidence interval:
 -24.06675  17.40008 
sample estimates:
mean of x mean of y 
 20.00000  23.33333 

it tells you what is the null and what is the alternative.



genomenet wrote:
> 
> Hi There,
> Using t.test to test hypothesis about which one is greater, A or B?
> where A={10,20,30},B={25,30,15}.
> My question is which of the following conclusions is right?
> #################hypothesis testing 1
> h0: A greater than or equal to B
> h1: A less than B
> below is splus code
> A=c(10,20,30)
> B=c(25,30,15)
> t.test(c(10,20,30),c(25,30,15),alternative="less")
> output:
> p-value=0.3359
> because p-value is not less than alpha (0.05), we
> cannot reject h0.
> so A greater than or equal to B.
> #################hypothesis testing 2
> h0: A less than or equal to B
> h1: A greater than B
> below is splus code
> A=c(10,20,30)
> B=c(25,30,15)
> t.test(c(10,20,30),c(25,30,15),alternative="greater")
> output:
> p-value=0.6641
> because p-value is not less than alpha (0.05), we
> cannot reject h0.
> so A less than or euqal to B.
> #########################################
> Thank you very much.
> Van
> 

-- 
View this message in context: http://www.nabble.com/%7B10%2C20%2C30%7D%3E%3D%7B25%2C30%2C15%7D-tf3779346.html#a10688603
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list