I have created a T test in R and got the below output.

`t.test(casein,mu=pw,alternative="greater") ## One Sample t-test ## ## data: casein ## t = 3.348, df = 11, p-value = 0.003251 ## alternative hypothesis: true mean is greater than 261.3099 ## 95 percent confidence interval: ## 290.1791 Inf ## sample estimates: ## mean of x ## 323.5833 `

Here as you can see the P-value is 0.003, which is less than the significant value of 0.05. Hence shouldn't the alternative hypothesis be rejected in this case? How is true?

**Contents**hide

#### Best Answer

The purpose of the `t.test()`

function is to return the p-value, a confidence interval and a some summary statistics. That is what it has done.

It is up to you do decide what you want do with the results. If you think that p = 0.003 is sufficiently small to reject the null hypothesis, then that is your business.

Note that it is always the null hypothesis (that mu=pw) that is accepted or rejected, not the alternative. The alternative hypothesis (that mu>pw) is, as the name implies, the alternative when the null become untenable.