Psychology 202a Advanced Psychological Statistics October 6, 2015 The plan for today • • • • Assumptions of the t test. Quantile-Quantile plots. The t test for repeated measures. The two-sample, independent groups t test. Assumptions of the t test • Independent observations. • Distribution is normal. • The idea of robustness. (not an assumption) Assessing the assumptions • Independence – Look at procedure, not at data • Normality – Graphical methods • Stem-and-leaf plots, histograms • The normal quantile-quantile plot Understanding the Q-Q plot • Manual Q-Q plots • Using R's “qqnorm” function • The 'plot' subcommand in SAS's proc univariate t tests for differences between means • Why differences? • A step in the right direction: the repeated measures t test. • H 0 : D 0 H A : D 0 • Classroom exercise t tests for differences between means • The two-sample Z test: Z M1 M 2 2 1 n1 2 2 . n2 • The two-sample t test: can’t just substitute estimated standard deviation. The pooled variance estimate • Weighted average of the two individual variance estimates: 2 2 ( n 1 ) s ( n 1 ) s 1 2 2 sP2 1 n1 n2 2 df1s12 df 2 s22 . df1 df 2 • df = n1+n2 - 2 The two-sample independent-groups t test M1 M 2 t , sM 1 M 2 where s X1 X 2 2 P 2 P s s . n1 n2 What’s the null hypothesis? H 0 : 1 2 0 H A : 1 2 0 What if it doesn’t make sense to pool the variances? • Satterthwaite’s approximation for degrees of freedom: 2 2 2 s1 s2 n1 n2 df . 2 2 2 2 s1 s (n1 1) 2 (n2 1) n1 n2 • Use unpooled variances for the standard error with adjusted degrees of freedom. • The t test in SAS and R. Assumptions of the t test • Independence within each population. • Independence between populations. • Equal variances in the two populations. – Also known as “homoscedasticity.” • Both populations normally distributed. Evaluating the assumptions • Independence within populations: examine the data collection procedure. • Independence between populations: examine the process that created the groups. • Random assignment guarantees independence between populations. Evaluating the assumptions • Homoscedasticity: – Graphical comparisons of the two groups – Comparison of the two sample standard deviations • Normality: – Graphical examination of each group – Q-Q plots The illogic of auxiliary hypothesis tests • Auxiliary hypothesis tests: – Involve confirmation of the null hypothesis. – Are least likely to detect a problem under precisely the circumstances where the problem matters the most. – Involve assumptions of their own (implying infinite recursion).