Turning Point • At the beginning of the course, we discussed three ways in which mathematics and statistics can be used to.

Download Report

Transcript Turning Point • At the beginning of the course, we discussed three ways in which mathematics and statistics can be used to.

Turning Point
• At the beginning of the course, we discussed three ways in
which mathematics and statistics can be used to facilitate
psychological science
– quantification and measurement
– theoretical modeling
– evaluating theoretical models
• Up to this point, we have focused on quantification and
measurement
Turning Point
• For the second part of the course, we are going to focus on
ways in which statistics can be used to model
psychological processes
• We will begin with some simple models and work our way
up to more complex ones
– modeling the influence of one variable on an outcome
(simple regression)
– modeling the influence of many variables on an
outcome (multiple regression)
Example
6
4
2
0
HAPPINESS
8
10
• Let’s say we wish to model the relationship between coffee
consumption and happiness
-4
-2
0
C OFFEE
2
4
-4
-2
0
x
2
4
-4
-2
0
x
2
4
-4
-2
0
x
2
4
- 50
0
0.8
- 40
10
-5
-5
0.9
30
-4
-2
0
x
2
4
- 30
- 20
1- 2* x ^ 2
20
1+2* x ^ 2
1.0
1+0* x
0
1- 2* x
0
1+2* x
1.1
5
5
- 10
40
0
50
1.2
10
10
Some Possible Functions
-4
-2
0
x
2
4
0.8
-5
0.9
1.0
1.1
1.2
• Linear relationships
• Y = a + bX
– a = Y-intercept (the
value of Y when X = 0)
– b = slope (the “rise over
the run”, the steepness
of the line); a weight
1+0* x
10
5
0
1- 2* x
0
-5
1+2* x
5
10
Lines
-4
-2
0
2
x
Y = 1 + 2X
4
-4
-2
0
x
2
4
-4
Lines and intercepts
0
Y = 5 + 2X
-5
HAPPINESS
5
10
• Y = a + 2X
• Notice that the implied
values of Y go up as we
increase a.
• By changing a, we are
changing the elevation
of the line.
Y = 3 + 2X
Y = 1 + 2X
-4
-2
0
C OFFEE
2
4
10
• Slope as “rise over
run”: how much of a
change in Y is there
given a 1 unit increase
in X.
• As we move up 1 unit
on X, we go up 2 units
on Y
• 2/1 = 2 (the slope)
0
1- 2* x
rise
-5
run
0
5
rise from 1 to 3
(a 2 unit
change)
-5
1+2* x
5
10
Lines and slopes
move from
0 to 1
-4
-2
0
x
Y = 1 + 2X
2
4
-4
-2
0
x
2
Lines and slopes
10
• Notice that as we
increase the slope, b,
we increase the
steepness of the line
0
Y = 1 + 2X
-5
HAPPINESS
5
Y = 1 + 4X
-4
-2
0
COFFEE
2
4
Lines and slopes
10
b=4
0
b=0
b=-2
-5
HAPPINESS
5
b=2
b=-4
-4
-2
0
COFFEE
2
4
• We can also have
negative slopes and
slopes of zero.
• When the slope is zero,
the predicted values of
Y are equal to a.
Y = a + 0X = a
Other functions
15
10
5
0
HAPPINESS
20
25
• Quadratic function
• Y = a + bX2
– a still represents the
intercept (value of Y
when X = 0)
– b still represents a
weight, and influences
the magnitude of the
squaring function
-4
-2
0
C OFFEE
2
4
Quadratic and intercepts
30
• As we increase a, the
elevation of the curve
increases
15
10
5
Y = 0 + 1X2
0
HAPPINESS
20
25
Y = 5 + 1X2
-4
-2
0
COFFEE
2
4
120
Quadratic and Weight
• When we increase the
weight, b, the quadratic
effect is accentuated
80
60
40
20
Y = 0 + 1X2
0
HAPPINESS
100
Y = 0 + 5X2
-4
-2
0
COFFEE
2
4
Quadratic and Weight
• As before, we can have
negative weights for
quadratic functions.
• In this case, negative
values of b flip the
curve upside-down.
• As before, when b = 0,
the value of Y = a for
all values of X.
100
Y = 0 + 5X2
0
-50
Y = 0 + 0X2
Y = 0 – 1X2
-100
HAPPINESS
50
Y = 0 + 1X2
Y = 0 – 5X2
-4
-2
0
COFFEE
2
4
0 030 10
20 030 10
-10
5 10
-5
0
-10
5 10
-5
-4
0
-4
-4
-4
-4
-30
5 10
-
-10 -300
0
0
0
0
0
0
0
x
2
x
2
x
2
x
2
x
2
x
2
x
2
-10 -300
-10
0
-2 * x + 1 * x ^2
-2 * x + 1 * x-2^2* x + 0 * x ^2
-2 * x + 0 * x ^2
-2 * x + 0 * -2
-2 * x + -1 * x ^2
-2 * x + -1 * x ^2
1 * x ^2
x ^2* x + -1 * x ^2
0
quadratic weight (c)
0
-4
+
20
-10 30
-5
-4
4
4
4
4
4
4
-4
020 5 10
020 5 10-0.010
20
0.0-0.0100.0100.0-0.0100.0100.0-25
-15
-5
0.010
-25
0 -15
-4
-4
-4
-4
-4
-4
- -40
2
04
2
x
x
-4
0 2
04
x
x
-40
2 04 2
x
x
-4
0 2
04
x
x
0 2
-4
04
x
x
-40
2 04 2
x
x
-4
0 2
04
x
x
2
2
2
2
0 -15
-5
4
4
4
4
4
0.0-0.0100.0100.0-0.0100.0100.0-25
0.010
-15
-25
-5
4
020 5 10-0.010
20
0 -15
4
020 5 10
0 -15
linear weight (b)
-4
-4
-4
-4
-4
-4
-4
00
0
0
0
0
0
0
x
2
x
2
x
2
x
2
x
2
x
2
x
2
-5
0 * x + -1 * x ^2
0 * x + -1 * x ^2
1 * x ^20 * x + 1 * x ^20 * x + 1 * x0^2* x + 0 * x ^20 * x + 0 * x ^20 * x + 0 * x0^2* x + -1 * x ^2
-25
-5
0 * x + -1 * x ^2
0 * x + -1 * x ^2
1 * x ^20 * x + 1 * x ^20 * x + 1 * x0^2* x + 0 * x ^20 * x + 0 * x ^20 * x + 0 * x0^2* x + -1 * x ^2
-25
-5
4
4
4
4
4
4
4
-4
-4
0
-30
5 10
-10 -300
x
-40
2 04 2
x
x
-4
0 2
04
x
x
0 2
-4
04
x
x
-40
2 04 2
x
x
-4
0 2
04
x
x
20 030 10
x
-10
5 10
-5
-4
04
0
-4
-4
0 2
5 10
-10
-5
-4
x
0
-4
x
-10 30
-5
20
-4
-4
0 2
+04
2
2
2
2
2
-10 -300
-10
0
20
-10 30
-5
4
4
0
4
20 030 10
-10
5 10
-5
0
4
0 030 10
-10
5 10
-5
0
-30
5 10
-10 -300
4
-4
4
-4
4
-4
-4
-4
-4
-4
0
x
0
x
0
x
0
x
0
0
0
x
2
• When linear and
quadratic terms are
present in the same
equation, one can
derive j-shaped curves
• Y = a + b1X + b2X2
2
2
2
2
x
2
x
2
-10
0
20
-10 30
-5
4
4
0
4
20 030 10
-10
5 10
-5
0
4
0 030 10
-10
5 10
-5
0
-30
5 10
-10 -300
-10 -300
-10
0
2 * x + -1 * x ^2
2 * x + -1 * x ^2
1 * x ^22 * x + 1 * x ^22 * x + 1 * x2^2* x + 0 * x ^22 * x + 0 * x ^22 * x + 0 * x2^2* x + -1 * x ^2
-10 -300
2 * x + -1 * x ^2
2 * x + -1 * x ^2
1 * x ^22 * x + 1 * x ^22 * x + 1 * x2^2* x + 0 * x ^22 * x + 0 * x ^22 * x + 0 * x2^2* x + -1 * x ^2
0 030 10
020 5 10
020 5 10-0.010
20
0.0-0.0100.0100.0-0.0100.0100.0-25 0.010
-15
-25
-5 0 -15
-25
-5 0 -15
-5 0
1 * x ^22 * x + 1 * x ^22 * x + 1 * x2^2* x + 0 * x ^22 * x + 0 * x ^22 * x + 0 * x2^2* x + -1 * x ^2
2 * x + -1 * x ^2
2 * x + -1 * x ^2
0
0
-10 30
-5
0 -10
5 10
-5
0 -10
5 10
-5
0
-30
5 10
-10 -300
-10 -300
-10 0
0 030 10 20 030 10 20
1 * x ^20 * x + 1 * x ^20 * x + 1 * x0^2* x + 0 * x ^20 * x + 0 * x ^20 * x + 0 * x0^2* x + -1 * x ^2
0 * x + -1 * x ^2
0 * x + -1 * x ^2
4
Linear & Quadratic Combinations
4
-4
4
-4
4
-4
-4
-4
-4
-4
0
0
0
0
0
0
0
x
2
4
x
x
x
x
x
x
2
4
2
4
2
4
2
4
2
4
2
4
Some terminology
• When the relation between variables are expressed in this
manner, we call the relevant equation(s) mathematical
models
• The intercept and weight values are called parameters of
the model.
• Although one can describe the relationship between two
variables in the way we have done here, for now on we’ll
assume that our models are causal models, such that the
variable on the left-hand side of the equation is assumed to
be caused by the variable(s) on the right-hand side.
Terminology
• The values of Y in these models are often called predicted
values, sometimes abbreviated as Y-hat or Yˆ. Why? They
are the values of Y that are implied by the specific
parameters of the model.
Estimation
• Up to this point, we have assumed that our models are
correct.
• There are two important issues we need to deal with,
however:
– Is the gist of the model correct? That is, is a linear, as
opposed to a quadratic, model the appropriate model for
characterizing the relationship between variables?
– Assuming the model is correct, what are the correct
parameters for the model?
Estimation
• For the next few weeks we will assume that the basic
model (i.e., whether it is linear, whether the right variables
are included) is correct. In the third part of the course, we
will deal with methods for addressing this issue and
comparing alternative models.
• The process of obtaining the correct parameter values
(assuming we are working with the right model) is called
parameter estimation.