Confidence Interval

assume \(\mu_\bar{X}=\mu_0\), with sample size n>=30, we are expected to conduct z test.

Rejection Region

  • \(P((-z_{crit}<Z<z_{crit})) = 1 -a\)

P-Value Approach

  • If \(p-value < a\), we reject \(H_0\)

T Test

  • T test has fatter tails

  • t_n-1

Assumptions

For Population Mean

  • 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

For Proportions

  • Simple random sample, independence

  • \(np>=10\), and \(n(1-p)>=10\)

Critical Value Approach

Reject when obs. test stat falls in Rejection Region >(1-a), lower.tail=FALSE

qt(0.025,df=99,lower.tail = FALSE) ##True critical value, if founded t testistic > this, reject the null hypothesis
[1] 1.984217

P-Value Approach

  • 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

Chi Square

  • \[ \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)