# Understanding the Logistic regression formula

Logistic regression aims at transforming the linear regression formula and fitting the s curve or logistic function to a particular dataset in order to calculate the probability of a categorical outcome variable given a number of predictor variables.

Also a formula aims at demonstrating what needs to happen to yield the desired results (s curve). What is the standard formula that makes regression model logistic? I am a bit confused because they seem to be written differently (although could be meaning the same thing in different sources).After some research the below formula appears to be what I am looking for (docs.tibco.com/pub/sfire-dsc/6.5.0/doc/html/TIB_sfire-dsc_user-guide/GUID-C4D05ED0-3392-4407-B62A-7D29B26DC566.html). First the logistic function below is applied to transform linear to logistic;

And then the below final formula is obtained which is what I intend to use as the standard Logistic regression formula. Is this correct?

Which is interpreted as P = Probability of Event, and and X1,X2,… are the independent variable values.

The idea is to provide a holistic base of the model, from theory to practice in my methodology section.

• What is your question? Eg, I don't see a "?" anywhere. Apr 21 at 12:13
• I have revised the question. Thank you. I am looking for guidance to the standard logistic regression formula and how to interpret it, to provide theoretical background in my data analysis section. Apr 21 at 12:24
• Now you only have a question as to whether the formula is correct. It is. Whether you want to call it the "standard logistic formula" is up to you. There are other equivalent formulations. But I don't know what a "holistic base of the model" means and a methodology section could probably just say "I used logistic regression". Apr 21 at 13:16
• What you say seems broadly correct & it's still not clear to me exactly what your question is, but a missing piece (in your understanding) might be that $\text{log}(p/(1-p))=\mu \Leftrightarrow p=1/(1+\text{e}^{-\mu})$, i.e. the second function -- sometimes called 'expit' -- is the inverse of the logit. The model fit is performed in the logistic (link) scale, and you can obtain probabilities via back-transformation. Apr 21 at 13:19
• Thank you all for your patience, my question was perhaps rather to confirm whether that is the correct formula for logistic regression because I am not sure, and whether it is complete. In my data analysis section, I want to give a theoretical background on what logistic regression is, including how it is done by giving the formula, interpreting it before giving the practical results from r. I am struggling to understand because I have no math or statistic background. Apr 22 at 17:45

• If you have a trained logistic regression model with coefficients $$[\beta_i]$$ and you want to classify a data point given by a vector $$[X_i]$$, the formula to get the probability of a success is the "standard logistic function" or "inverse logit" $$p=\frac{1}{1+e^{-(\beta_0+\beta_1X_1+...)}}$$This is the equation for the "S" or "sigmoid" curve that you've fitted.
• Then there is the "logit" itself, which is the inverse function of the above and what you've written in your question. $$\ln\frac{p}{1-p}=\beta_0+\beta_1X_1+...$$ This is essentially the statement that you're modelling the log-odds as a linear regression of your data, which is the central idea of the logistic regression.