How do I find probabilities in logistic regression? let's assume we have continuous independent variable and obviously binary dependent one. How can we calculate probabilities which is displayed on y-axis? With scale like in the image below, it's clear that we can simply take some x value, look through all the samples having this value and corresponding y values and calculate a/(a+b). But, how do I find probabilities if I have continuous variable?


You calculate the linear part of the generalized linear model.
$$
\beta_0+\beta_1x_i
$$
Then you transform the linear part according to the inverse link function. $$\beta_0+\beta_1x_i = \log\bigg(\dfrac{p_i}{1-p_i}\bigg)\implies
p_i =\dfrac{
1
}{
1+\exp(-(\beta_0+\beta_1x_i))
}
$$
