how to use original dataset to get the logistic regression?

70 Views Asked by At

This from wikipedia https://en.wikipedia.org/wiki/Logistic_regression

enter image description here

I understand P(X=2)=0.26 is the predicted probability when hours is 2 after the logistic regression. I want to know how do we use original data points to use least square method to produce the logistic regression equation?