Binomial Logistic Regression to predict probability
Confusion Point 1:
I think I'm right in saying one of the steps of Logistic Regression is to get:
$$\log(\mathrm{Odds})$$
Now take this very simple example: I want to predict whether somebody is a parent based on their age. My data set includes 7 training entries: it includes Age of people, and whether they are parents or not:
--------------------------------------
Age Parent? P(parent|age) log(Odds)
--------------------------------------
15.0 0 0 -∞
20.8 0 0 -∞
22.2 1 1 +∞
28.4 0 0 -∞
33.1 1 1 +∞
40.9 1 1 +∞
48.7 1 1 +∞
--------------------------------------
Does $\log(\mathrm{Odds})$ have to be calculated for each of the $n$ entries you have of the independent variable, $x$ (7 in this example)? My particular example only gives me $\log(\mathrm{Odds})$ values of $+\infty$ and $-\infty$. This surely cannot be correct. How can I fit a line to this? Does this mean I have to start binning data into groups? Surely, if I start binning into groups, the Age independent variable is no longer continuous---does that matter?
Confusion Point 2:
How are the coefficients, $\beta_0$ and $\beta_1$ found?
Once one has $\log(\mathrm{Odds})$ as a function of the independent variable, I think it is safe to assume to have the form:
$$y=mx+c$$ $$\log(\mathrm{Odds})=\beta_1 x + \beta_0$$
where $\beta_0$ is analagous to the y-intercept, $c$, and $\beta_1$ is analagous to the gradient, $m$. That is, after all, a major driving factor of taking the log of the Odds, right?---it makes a continuous number between $-\infty$ and $+\infty$.
Would one then minimise the squares between the observed odds and the model odds much like in Ordinary Least Square fitting (e.g., analytically, gradient descent, etc.) to find $\beta_0$ and $\beta_1$?