I have been given the data set:
42 36 46 43 41 35 43 45 40 39
The null hypothesis is that $\mu=42$ and alternative hypothesis is that $\mu<42.$
I have found that $s=3.59011, \bar X=41$.
I have then used this to find the test statistic by doing the following:
$$t=\frac{\sqrt{10}(41-42)}{3.59011}=-0.8808$$
Now in order to find the p-value I have found $$\mathbb{P}(T<-0.8808)=\mathbb{P}(T>0.8808)=1-\mathbb{P}(T<0.8808)=1-0.7993325=0.2006675.$$
This all looks correct to me but when I try to find the p-value using R it says that the p-value should be $0.4013$
Any ideas where I'm going wrong?
I am given that we want a significance level, $\alpha=0.05$.
Also, am I right in saying that the critical region $C=\{T<c^*\}$ where $c^*=1.833113$?
From my p-value I wouldn't reject the null hypothesis as my p-value is greater than 0.05. However, it lies within this region so that would say do reject it. Am I missing something?
You have the right p-value, but you did not understand the software. The p-value that you say you got from R is for a two-sided alternative hypothesis that says $\mu\ne42$ instead of $\mu<42$.
Your critical value is correct. [PS: I hadn't noticed until it was pointed out by "heropup" that the minus sign was missing. It would be correct if you put that in.]