Logistic Regression in Biostatistics

Graduate Depth 186 in the knowledge graph I know this Set as goal
Unlocks 15 downstream topics
logistic-regression odds-ratio binary-outcome maximum-likelihood

Core Idea

Logistic regression models binary outcomes (disease/no disease, death/survival) by relating the log-odds of the outcome to a linear combination of predictors: log(p/(1-p)) = beta_0 + beta_1*x_1 + ... + beta_k*x_k. The logit transformation maps probabilities from the bounded [0,1] interval to the unbounded real line, making linear modeling appropriate. Each coefficient beta_j represents the change in log-odds per unit increase in x_j, and exp(beta_j) gives the adjusted odds ratio — the multiplicative change in odds of the outcome for a one-unit increase in the predictor, holding all other variables constant. Logistic regression is estimated by maximum likelihood rather than least squares, and it is the workhorse model for binary health outcomes throughout clinical research and epidemiology.

Explainer

Linear regression assumes the outcome is continuous and unbounded — systolic blood pressure, cholesterol level, or body weight. But many of the most important questions in health research involve binary outcomes: does the patient have the disease or not? Did the treatment succeed or fail? Did the patient survive five years or not? You cannot model a 0/1 outcome with ordinary linear regression because predicted values can fall outside [0,1], the errors are not normally distributed, and the variance depends on the mean. Logistic regression solves all three problems by modeling a transformed version of the outcome probability.

The logit transformation converts a probability p to the log-odds: logit(p) = log(p/(1-p)). If p = 0.5, the odds are 1:1 and the log-odds are 0. As p approaches 1, the log-odds go to positive infinity; as p approaches 0, they go to negative infinity. This maps the constrained probability to the entire real line, so a linear combination of predictors always produces a valid probability when passed through the inverse logit (logistic) function: p = 1/(1 + exp(-z)), where z = beta_0 + beta_1*x_1 + ... The resulting S-shaped curve ensures that predicted probabilities are always between 0 and 1, regardless of the predictor values.

The coefficients of logistic regression are interpreted on the log-odds scale. A coefficient of 0.5 for a predictor means that a one-unit increase raises the log-odds of the outcome by 0.5. Exponentiating gives the odds ratio: exp(0.5) ≈ 1.65, meaning the odds of the outcome increase by 65% per unit of the predictor. This multiplicative interpretation is constant across the predictor range on the odds scale but not on the probability scale — the change in probability for a one-unit increase depends on where you start. Moving BMI from 22 to 23 changes diabetes probability differently than moving from 35 to 36, even though the log-odds change is the same.

Logistic regression is fit by maximum likelihood estimation rather than least squares. MLE finds the coefficient values that make the observed data most probable under the model. There is no closed-form solution as there is for OLS; instead, iterative algorithms (typically Newton-Raphson or iteratively reweighted least squares) converge to the maximum. Model fit is assessed through deviance, the Hosmer-Lemeshow test, or information criteria rather than R-squared. For prediction, the area under the ROC curve (AUC) quantifies how well the model discriminates between cases and non-cases — a topic you will encounter next in diagnostic test evaluation.

Practice Questions 4 questions

Prerequisite Chain

Counting to 10Counting to 20Understanding ZeroThe Number ZeroCounting to FiveOne-to-One CorrespondenceCombining Small Groups Within 5Addition Within 10Addition Within 20Two-Digit Addition Without RegroupingTwo-Digit Addition with RegroupingAddition Within 100Repeated Addition as MultiplicationMultiplication Facts Within 100Division as Equal SharingDivision as Grouping (Measurement Division)Division: Grouping (Repeated Subtraction) ModelDivision: Fair Sharing ModelDivision as Equal SharingDivision as GroupingBasic Division FactsDivision Facts Within 100Two-Digit by One-Digit DivisionDivision with RemaindersRemainders and Quotients in DivisionDivision Word ProblemsIntroduction to Long DivisionFactors and MultiplesPrime and Composite NumbersEquivalent FractionsRelating Fractions and DecimalsDecimal Place ValueReading and Writing DecimalsComparing and Ordering DecimalsAdding and Subtracting DecimalsMultiplying DecimalsDividing DecimalsDividing FractionsMixed Number ArithmeticOrder of OperationsInteger Order of OperationsVariable ExpressionsCombining Like TermsOne-Step EquationsTwo-Step EquationsSolving Multi-Step EquationsEquations with Variables on Both SidesAngle Pairs: Complementary, Supplementary, and VerticalParallel Lines and TransversalsCorresponding AnglesAlternate Interior AnglesTriangle Angle Sum TheoremExterior Angle TheoremTriangle Inequality TheoremSimilar Triangles: AA SimilaritySimilar Triangles: SSS and SAS SimilarityProportions in Similar TrianglesRight Triangle Trigonometry IntroductionTrigonometric Ratios ReviewRadian MeasureConverting Between Degrees and RadiansThe Unit CircleGraphing Sine and CosineGraphing Tangent and Reciprocal Trigonometric FunctionsDerivatives of Trigonometric FunctionsAntiderivativesIterated Integrals and Fubini's TheoremDouble Integrals in Cartesian CoordinatesDouble Integrals over Rectangular RegionsDouble Integrals in Polar CoordinatesDouble Integrals: Definition and SetupIterated Integrals and Fubini's TheoremDouble Integrals over Rectangular RegionsDouble Integrals over General RegionsApplications of Double Integrals: Area, Mass, and MomentsTriple Integrals in Cartesian CoordinatesTriple Integrals in Cylindrical and Spherical CoordinatesChange of Variables and the Jacobian DeterminantApplications of Triple Integrals: Volume and MassVector Fields and Their RepresentationsLine Integrals of Vector FieldsGreen's TheoremSurface Integrals and Flux of Vector FieldsSurface Integrals and Flux of Vector FieldsDivergence Theorem: Flux and OutflowDivergence TheoremElectric FluxGauss's LawConductors in Electrostatic EquilibriumCapacitance and CapacitorsDielectricsDielectric Constant and Relative PermittivityElectric Field Inside Dielectric MaterialsDielectric Materials and PolarizationDielectric Susceptibility and PermittivityEnergy Density in Electric FieldsElectric Current and Current DensityElectrical Resistance and ResistivityOhm's Law and Circuit ElementsElectromotive Force (EMF) and BatteriesKirchhoff's Circuit Laws: Voltage and CurrentDC Circuit Network Analysis MethodsTransient Response in RC CircuitsRC CircuitsLC and RLC CircuitsAC Circuits: FundamentalsImpedance and ReactanceAC Power and ResonanceElectromagnetic WavesThe Electromagnetic SpectrumBlackbody Radiation and Planck's LawPhotoelectric EffectThe Photon: Light as QuantaCompton ScatteringWave-Particle Dualityde Broglie WavelengthHeisenberg Uncertainty PrincipleWavefunction and the Born RuleThe Schrödinger EquationState Vectors and WavefunctionsQuantum SuperpositionQuantum EntanglementBell Theorem and Bell InequalitiesPostulates of Quantum MechanicsScattering TheoryIntroduction to Scattering TheoryPartial Wave Analysis in ScatteringSpin Angular MomentumElectron Spin and Intrinsic Magnetic MomentStern-Gerlach Experiment: Spin Quantization and MeasurementElectron Diffraction and Matter Wave PropertiesDavisson-Germer Experiment: Crystal Diffraction of ElectronsElectron Diffraction and Matter Wave InterferenceWavefunctions and Probability Density InterpretationQuantum Superposition and Linear Combinations of StatesQuantum Operators and ObservablesCanonical Commutation Relations and UncertaintyHeisenberg Uncertainty Principle and Measurement LimitsTime-Independent Schrödinger Equation and EigenvaluesHydrogen Atom in Quantum MechanicsSpectral Lines and Energy TransitionsSelection Rules for Atomic TransitionsLS and jj Coupling Schemes in Multi-Electron AtomsPauli Exclusion Principle and Antisymmetric WavefunctionsElectron Configuration and the Aufbau PrincipleThe Periodic Table and Atomic Electronic StructureThe Periodic TableElectron ConfigurationPeriodic TrendsIonization EnergyIonic BondingLewis StructuresResonance Structures and Delocalized ElectronsResonance and Formal ChargeMolecular Polarity and Dipole MomentsIntermolecular ForcesStates of Matter and Phase Changes: Melting, Boiling, and SublimationGas Laws and the Ideal Gas EquationGas Stoichiometry and Volume-Volume CalculationsThermochemistry and EnthalpyHeat Capacity and CalorimetryEntropy and Molecular DisorderSpontaneity and ΔGEntropy and Gibbs Free EnergyChemical EquilibriumAcid-Base ChemistryOrganic Reaction Mechanisms and Arrow PushingElectrophilic Addition to AlkenesAromaticity and BenzeneDNA StructureCentral Dogma of Molecular BiologyThe Genetic CodeDNA MutationsDNA Repair MechanismsCell Cycle Checkpoints and Cancer PreventionMitotic Spindle Checkpoint and Chromosome SegregationKinetochore Structure and FunctionMitochondria: Structure and FunctionCellular Respiration OverviewBacterial Metabolism OverviewAntibiotic Resistance MechanismsInfectious Disease EpidemiologyFoundations of EpidemiologyMeasuring Disease Frequency: Incidence and PrevalenceEpidemiologic Study DesignsStudy Design in BiostatisticsLogistic Regression in Biostatistics

Longest path: 187 steps · 938 total prerequisite topics

Prerequisites (3)

Leads To (9)