4. y = a + bx + e
y must be continuous.
x can be nominal, ordinal,
interval, or ratio scaled.
b is the slope of the
regression line, or y | x
a is the the point on the y
axis at which the
regression line with slope
b intercepts the y axis.
5. y = a + bx + e
y must be continuous.
x can be nominal, ordinal,
interval, or ratio scaled.
b is the slope of the
regression line, or y | x
a is the the point on the y
axis at which the
regression line with slope
b intercepts the y axis.
THE PREDICTED
VALUE OF Y
IS CONTINUOUS
6. y = a + bx + e
y must be continuous.
x can be nominal, ordinal,
interval, or ratio scaled.
b is the slope of the
regression line, or y | x
a is the the point on the y
axis at which the
regression line with slope
b intercepts the y axis.
BUT WHAT IF Y IS
NOMINAL?
7. y = a + bx + e
y must be continuous.
x can be nominal, ordinal,
interval, or ratio scaled.
b is the slope of the
regression line, or y | x
a is the the point on the y
axis at which the
regression line with slope
b intercepts the y axis.
THE PREDICTED
VALUE OF A
NOMINALLY-
SCALED Y COULD
EXCEEDTHE
LIMITS OF Y
8. y
• Is “nominal,” i.e., is composed of unordered
categories
• Is “binary,” i.e., has two values
Examples of binary, nominal y variables
• Graduation status — graduated; not graduated
• Poverty status — living in poverty; not living in
poverty
y variable usually coded “0” and “1” (e.g., “1,”
if graduated, and “0” otherwise
9. We model the probability of being in the positive
category (“1”) on the dependent variable rather
that the other category (“0”), given the
independent variables
Examples of binary logistic regression questions
• The probability of graduating, given being male
rather than female
• The probability of living in poverty, given living in
Alabama rather than any other state in the U.S.
Predicted probabilities must not < 0 or >1 by
definition
10. Pr[y = 1 | x] = f(x)
f(x) chosen is x / 1 + x because, for any value of x,
Pr[y = 1 | x] must range between 0 and 1
So, Pr[y = 1 | x] = x / 1 + x
In binary logistic regression,
Pr[y = 1 | x] = exb / 1 + exb can be rearranged to
Pr[y = 1 | x] = 1 / 1 + e-xb
12. Pr[y = 1 | x] = 1 / 1 + e-xb, where
• Pr[y = 1 | x] is the probability that y = 1, given
independent variables, x
• e is the exponential function; is approximately equal
to 2.71828
• b is termed the “logit,” which is the log of the odds
that y = 1 and not 0
log(b) is called the “odds ratio,” which is the
ratio between the odds of y = 1 and the odds of
y = 0
13. log(b) is called the “odds ratio,” which is the
ratio between the odds of y = 1 and the odds
of y = 0
The odds ratio
• Can vary from 0 to positive infinity
• Is equal to 1 if the odds of y = 1 and y = 0 are the
same
• Is <1 if the odds of y = 1 < y = 0
• Is >1 of the odds of y = 1 > y = 0