Logistic_Regression
Logistic_Regression
What is a regression
linear regression and a logistic
A regression analysis is a method for
regression?
modeling relationships between
variables.
In a linear regression, the dependent
It makes it possible to infer variable is a metric variable, e.g. salary
or predict a variable or electricity consumption.
For example:
Whether a person buys or does
not buy a particular product
or
whether a disease is
present or not
We could study the influence of We could now investigate what influence the
age, gender and smoking status independent variables have on the disease.
on that particular disease. If there is an influence, then we can predict
how likely a person is to have a certain disease.
y
y
1
1
0
0
x
No matter which value we have for the x
independent variables, only 0
or 1 results. minus infinity can occur.
However, the goal of logistic No matter where we are on the x-axis,
regression is to estimate the
probability of occurrence.
1
The value range for the prediction
should therefore be between 0 and 1.
1/2
y
-∞ 0 +∞
1
between minus and plus infinity only
values between 0 and 1 result.
0
And that is exactly
x
what we want!
1
1/2 The logistic function is now
used by the logistic regression.
-∞ 0 +∞
For z, the equation of the linear
regression is now simply inserted.
In our example,
the probability of having a certain disease
In our example,
the probability of having a certain disease