Parameter estimation in logistic regression

46 Views Asked by At

I am trying to perform logistic regression using the following data:

\begin{array}{c|c c c c c c c c} X & 1 & 2 & 2.5 & 3 & 4 & 5 & 6.5 & 8\\ \hline y & 0 & 0 & 0 & 0 & 1 & 1 & 1 & 1 \\ \end{array}

where X is the independent variable and y is the dependent variable. I know that the logistic regression model is given by the logistic function

$$ p = \frac{1}{1+e^{-(b_0 + b_1x)}} $$

I would like to estimate the parameters $b_0$ and $b_1$ for the data provided in the above table. I am aware that maximum likelihood estimation (MLE) is used for the estimation of parameters $b_0$ and $b_1$ in general and that $logit(p) = b_0 + b_1x$. Moreover, a cost function can be formulated and minimized using MLE. However, instead of general derivations, I would like to know the process and individual iterations involved for the calculations of the parameters in this particular example.

Further, if the data is changed to the following:

\begin{array}{c|c c c c c c c c} X & 1 & 2 & 2.5 & 3 & 4 & 5 & 6.5 & 8\\ \hline y & 10 & 21 & 27 & 34 & 60 & 72 & 77 & 92 \\ \end{array}

in which case the dependent variable is no more binary, then how will the parameters be estimated in this case?