The Engineering Desk
Engineering, without the noise.

DesignSimulations and MathematicsLibrary

Logistic regression

Modeling a pass/fail outcome from continuous inputs, and reading odds ratios.

ImagineRIT2018PneumaticDropTester
Photo: “ImagineRIT2018PneumaticDropTester” by DanielPenfield, CC BY-SA 4.0, via Wikimedia Commons

When the response is pass or fail, ordinary regression can predict probabilities below 0 or above 1. Logistic regression models the log of the odds instead:

Reading the results

  • A positive coefficient means the chance of the event rises with that input.
  • is the odds ratio: how the odds multiply for each one-unit increase in the input.
  • The fitted model gives a predicted probability for any combination of inputs.

Uses

  • Probability that a weld fails a pull test as a function of current and time.
  • Probability of a leak as a function of torque.
  • Probability that an inspector detects a defect as a function of its size.

Sample size

Each pass/fail result carries little information. You need enough events, not just enough units: a common guide is at least 10 events for each term in the model.

See also

References

  1. Hosmer, D. W., Lemeshow, S., and Sturdivant, R. X. Applied Logistic Regression. Wiley.

More in Simulations and Mathematics