T tests, ANOVAs and regression. Tom Jenkins Ellen Meierotto SPM Methods for Dummies 2007. Why do we need t tests?. Objectives. Types of error Probability distribution Z scores T tests ANOVAs. Error. Null hypothesis Type 1 error ( α ): false positive Type 2 error ( β ): false negative.
Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.
T tests, ANOVAs and regression
Tom Jenkins
Ellen Meierotto
SPM Methods for Dummies 2007
Z=(xμ)/σfor one point compared to pop.
Pooled standard error of the mean
Variance
F test = Model variance /Error variance
Group 1
Group 1
Group 1
Group 2
Group 2
Group 2
Partitioning the variance
Total =
Model +
(Between groups)
Error
(Within groups)
Correlation and Regression
Y
X
Y
Y
Y
Y
Y
X
X
Positive correlation
Negative correlation
No correlation
Covariance ~
DX * DY
Variance ~
DX * DX
x
(
)(
)


y


x
x
y
y
x
x
y
y
i
i
i
i
0
3

3
0
0
2
2

1

1
1
3
4
0
1
0
4
0
1

3

3
6
6
3
3
9
å
=
=
7
y
3
=
x
3
What does this number tell us?
CorrelationNegativePositive
Small0.29 to 0.1000.10 to 0.29
Medium0.49 to 0.300.30 to 0.49
Large1.00 to 0.500.50 to 1.00
ŷ = ax + b
slope
ε
= y i , true value
ε =residual error
minimises distance between
data and fitted line, i.e.
the residuals
intercept
= ŷ, predicted value
Model line: ŷ = ax + b
a = slope, b = intercept
Residual (ε) = y  ŷ
Sum of squares of residuals = Σ (y – ŷ)2
Σ (y – ŷ)2
b
b
ε
ε
b
b
b
b
sums of squares (S)
Gradient = 0
min S
Values of a and b
Σ(y  ax  b)2
r sy
r = correlation coefficient of x and y
sy = standard deviation of y
sx = standard deviation of x
a =
sx
y = ax + b
b = y – ax
b = y – ax
r sy
r = correlation coefficient of x and y
sy = standard deviation of y
sx = standard deviation of x
x
b = y 
sx
How well does this line fit the data, or how good is it at predicting y from x?
∑(ŷ – y)2
∑(y – y)2
SSy
SSpred
sy2 =
sŷ2 =
=
=
n  1
n  1
dfŷ
dfy
∑(y – ŷ)2
SSer
serror2 =
=
n  2
dfer
This is the variance explained by our regression model
This is the variance of the error between our predicted y values and the actual y values, and thus is the variance in y that is NOT explained by the regression model
How good is our model cont.
sy2 = sŷ2 + ser2
sŷ2 = r2 sy2
r2 = sŷ2 / sy2
ser2 = sy2 – r2sy2
= sy2 (1 – r2)
sŷ2
r2 (n  2)2
F
=
(dfŷ,dfer)
ser2
1 – r2
complicated
rearranging
=......=
So all we need to
know are r and n !
r(n  2)
t(n2) =
(because F = t2)
√1 – r2
y = ax + b +ε
y = a1x1+ a2x2 +…..+ anxn + b + ε