T检验步骤
Set as below:
H0 is time μ≥ 5 min
H1 is time μ<5 min
2. Sample size n=15,α=0.05,df=14
3. σ is unknown,choose t test
4. For α=0.05, the critical Zvalues are ±1.96
5. μ=5
x-bar=4.29
S=1.64
tSTAT=(x-bar-μ)/(S/(n)^(1/2))=(x-bar-miu)/s除以根号n=((4.29-5)*(15)^(1/2))/1.64=-1.676718
6. check on the criticalvalue of t, df=14,α=0.05(单尾查α即可),tα=1.7613
stata用法:
invttail(df,p)
Description: the inverse reverse cumulative (upper tail or survivor)
Student's t distribution: if ttail(df,t) = p, then
invttail(df,p) = t
Domain df: 2e-10 to 2e+17 (may be nonintegral)
Domain p: 0 to 1
Range: -8e+307 to 8e+307
即:
. di invttail(14,0.05)
1.7613101
Since-1.676718>-1.7613, we cannot reject H0, whichmeans we cannot draw the conclusion that waiting time is less than 5 mins.
σ is unknown andassume the population you are sampling from follows a normal distribution.