z & t-tests - facstaff home page for...
TRANSCRIPT
Z & t-tests
• It refers to the statistical tests built on the assumption that the data being analyzed were sampled from a specified distribution
• Parameters of the distribution (e.g. µ & σ2) are estimated and are used to calculate tail probabilities
• Most statistical tests specify the normal distribution
Parametric Analyses
Steps of Parametric Analyses
1. State null and alternative hypotheses
2. Specify the null distribution
3. Obtain sample data
4. Calculate the test statistic & tail probability based on threshold criterion, α
5. Decide to reject or fail to reject the null hypothesis and interpret your decision
Rejecting or Failing to Reject the H0
• If the test statistic falls in the critical region, the null hypothesis is rejected
• If the test statistic does not fall in the critical region, the null hypothesis is NOT rejected
• Notice that no statements are made about the alternative hypothesis
Z-test
• Obtains the probability of sample means being within any interval or beyond any point
• Assumptions: know the population mean and standard deviation and have normally-distributed data
• Thus, we can test simple hypotheses about sample means (called the Z-test) – Calculate z-score for sample mean, zobt
– Compare to critical z-score, zcrit
Who did better on the their test?
Dick Harry
X=70 Y=80
µ=65 µ=70
σ=2 σ=10
Formula for a Z-score
= standard error = standard
deviation of the sampling
distribution
Who did better on the their test?
Dick: (70-65)/(2/(1^0.5)) = 2.5 st. dev.
Harry: (80-70)/(10/(1^0.5)) = 1.0 st. dev.
Use Excel Normsdist function instead
of a unit normal table
• The probability is 0.773 or 1 - 0.227
Example
– Find the z-score associated with the
upper and lower scores when considering
95% of a normal distribution • “upper and lower scores”: two-tailed test
• α should be divided by 2 before looking up the z-
score
• α/2 = 0.05/2 = 0.025
• ± 2 stdev. ≈ 95% of distribution
t- distribution
http://www.statsoft.com/textbook/sttable.html#t
2. Specify the Test Statistic:
t test
21
21
XXs
XXt
21
222
211 11**
21 NNdf
sdfsdfs
TXX
Where this equals the standard error of the
difference between the two means, and df1=n1-1,
df2=n2-1, and dft=n1+n2-2
Conduct the Correlated t-test
Simulation
• http://onlinestatbook.com/simulations/corre
lated_t/correlated_t.html
Generalized Confidence Intervals
P(Y – tα[n-1]sY ≤ µ ≤ Y + tα[n-1]sY) = (1-α)
• where tα[n-1] is the critical value of the t-
distribution with probability P = α, and sample
size n, and sY is the standard error of the mean
• Calculate 95% confidence interval for
previous example with five difference
scores
• 3.04-6.96
Comparison of Z-test to single
sample t-test H0: µ = 58, HA: µ ≠ 58, α=0.10, n=20, σ2=28, X=56
Z-test
z=(56-58)/((28/20)^0.5) = -1.69 reject H0 because -1.69<-1.645 Zcrit
90% confidence interval = 56±1.645*((28/20)^0.5) = 54.054-57.946
t-test
t=(56-58)/((28/20)^0.5) = -1.69 fail to reject H0 because -1.69>-1.729 tcrit for α=0.10 and df=19
90% confidence interval = 56±1.729*((28/20)^0.5) = 53.955-58.045
t-test Equation Summary
• Single sample t = (Y-µH0)/sY
• Dependent sample t-test = (D-µH0)/sD
– where sYorD = sYorD / √n
• Independent sample t-test=((X1-X2)-µH0)/sX1-X2
– where
21
222
211 11**
21 NNdf
sdfsdfs
TXX