qt(0.025,df=99,lower.tail = FALSE) ##True critical value, if founded t testistic > this, reject the null hypothesis[1] 1.984217
assume \(\mu_\bar{X}=\mu_0\), with sample size n>=30, we are expected to conduct z test.
T test has fatter tails
t_n-1
Normality, if sample size not >30
qqnorm in R checks normality if knows raw data. If no, checks outliers and if everything within 2.5 SD of the mean
Independence of observations
Simple random sample, independence
\(np>=10\), and \(n(1-p)>=10\)
Reject when obs. test stat falls in Rejection Region >(1-a), lower.tail=FALSE
Reject if p-value < a
It is one tail
For example, assuming T test stat = 6.33, \(t_{19,0.005}=2.712\), p value < 0.005, and of course reject null hypothesis
\[ \frac{(n-1)S^2}{\sigma^2} \sim \chi^2_{n-1} \]only if random samples from normal populations, and sigma square is known
\(\frac{a}{2}\) on both tails if two tails hypothesis, \(a\) and \(1-a\) p value on right or left tail
2*pchisq(X^2_obs,df=n-1,LT=F), pchisq(X^2_obs,df=n-1,LT=F),pchisq(X^2_obs,df=n-1,LT= T)