AI Glossary / Statistics and probability / Advanced

Cox model

Definition

The Cox model usually means Cox proportional hazards regression, a method relating predictors to the time until an event while accommodating appropriate censoring. It models a baseline hazard multiplied by an exponential predictor effect. It is widely used in survival analysis and applies to events such as equipment failure or customer departure.

What it means

Some observations end before the event occurs. A machine may still be operating when a study closes, or a customer may still subscribe at the last recorded date. Such observations provide partial information about event time rather than complete failure times.

The Cox model uses that information under suitable assumptions. Its coefficients describe hazard ratios: relative instantaneous event rates among those who remain event-free at a particular time. A hazard ratio is not a ratio of cumulative event probabilities.

The standard model is semiparametric because it specifies how predictors multiply the hazard without requiring a fixed parametric shape for the baseline hazard over time.

How it works

For fixed predictors x, the model is h(t|x) = h_0(t) exp(beta transpose x). The baseline hazard h_0(t) can change with time. For two predictor profiles, the hazard ratio is exp[beta transpose (x_a - x_b)], constant over time in this basic proportional-hazards specification.

Coefficients are commonly fitted using a partial likelihood built from event times and the people or items still at risk then. With no tied event times, an event's contribution compares that subject's exponential score with the sum of scores in its risk set. Tied times require an appropriate method.

Absolute survival predictions additionally require estimation of baseline survival. Check predictor form, proportional hazards, and censoring assumptions. Censoring should be independent of the event process conditional on the information appropriately included in the analysis; informative loss to follow-up can undermine ordinary estimates.

Three practical examples

  • A maintenance team relates operating conditions to time until first equipment failure, retaining machines still functioning at study close as censored observations.
  • A subscription analyst models time to cancellation while distinguishing administrative end-of-study censoring from poorly understood disappearance from records.
  • An AI evaluation team compares a survival prediction system with a Cox baseline, checking both risk ranking and time-specific prediction calibration.

Think of it this way

Think of tracking runners until they cross a finish line, while some leave your field of view first. You know those runners had not finished when last observed. The Cox model compares event rates among those still under observation and at risk, rather than pretending every lost runner finished at departure.

Worked example

Consider a fixed binary predictor x with coefficient beta = 0.4. Comparing x = 1 with x = 0 gives a hazard ratio exp(0.4), approximately 1.4918.

This means the modeled instantaneous event rate is about 49.18% higher at each time under proportional hazards, among those still event-free. It does not mean the event probability is 49.18 percentage points higher.

Suppose the estimated baseline survival at a chosen horizon is S_0(t) = 0.80. In this basic model, S(t|x) = S_0(t) raised to exp(beta x). Therefore survival for x = 1 is 0.80 raised to 1.4918, approximately 0.7168.

The event probabilities by that horizon are 0.20 and approximately 0.2832. Their difference is about 8.32 percentage points, and their ratio is about 1.416, which differs from the hazard ratio of 1.4918.

The coefficient and baseline survival are stipulated, not estimated from invented records. No uncertainty interval is available from these values alone. The calculation illustrates why a relative hazard needs additional information before it becomes an absolute event-risk prediction.

Illustrative case study

Fictional case: Ridge Equipment builds a failure-monitoring model. Its initial spreadsheet treats machines still operating after twelve months as if they failed exactly then. The analyst corrects the event indicators and records follow-up time separately.

The team fits a Cox model using operating characteristics available at the prediction date. It checks whether one predictor's effect changes over follow-up and whether withdrawals are associated with impending failure.

The final report distinguishes relative hazard estimates from predicted failure probabilities at specified horizons. It also describes uncertainty and the limits of the observation process. The model supports planning comparisons; it does not establish that changing a predictor will causally prevent failures.

Common misconceptions and mistakes

  • A hazard is a rate, not an ordinary probability at a single instant.
  • Proportional hazards does not mean the baseline hazard is constant; both groups' hazards may vary while their ratio stays constant.
  • Censored observations are not simply failures or records to discard.
  • A hazard ratio alone does not determine absolute risk or median event time.
  • Adjusting for measured predictors does not automatically turn observational associations into causal effects.
  • A competing event may change the meaning of the target probability; treating competing events as ordinary censoring does not directly estimate their competing-risk cumulative incidence.

Business use

Businesses can use Cox regression to study durations such as time to departure, failure, or completion. Define the event and time origin precisely. Ensure that predictor values are available at the intended decision time, avoiding information learned only after follow-up begins unless the analysis explicitly handles time-varying covariates.

Evaluate performance at the horizons relevant to decisions. Good ranking does not guarantee accurate probabilities. Compare predicted and observed outcomes using methods that appropriately accommodate censoring.

When proportional hazards is unsuitable, consider a justified extension or alternative. Stratification allows different baseline hazards across strata, while time-varying effects change the interpretation of coefficients. More complex modeling should address an identified need rather than conceal unclear event definitions or unreliable records.

People also ask

Does Cox regression require normally distributed event times?

No.

Can its baseline hazard vary over time?

Yes; the standard model leaves its shape unspecified.

Is a hazard ratio of two the same as twice the event probability?

Generally no. Event probabilities depend on time and baseline survival as well as the modeled relative hazard.

Check your understanding

Answer: 1.

What extra quantity was needed in the worked example?

Answer: Baseline survival at the chosen horizon. 2.

Why retain a still-operating machine?

Answer: Its event-free follow-up provides information even though the eventual failure time is unknown. 3.

What does proportional hazards constrain?

Answer: The hazard ratio for fixed predictor profiles in the basic model, not the baseline hazard's shape.

Related terms

  • Survival analysis
  • Hazard ratio
  • Censoring
  • Calibration
  • partial likelihood
  • baseline hazard
  • competing risks

Learn next

Learn survival and hazard functions, then right censoring and risk sets. Study partial likelihood and proportional-hazards diagnostics before interpreting coefficients. Compare relative associations with absolute, time-specific predictions and learn how competing risks alter prediction questions.

  • Proportional hazards
  • Censoring

More in Statistics and probability

  • Covariance - Covariance measures how two variables vary together relative to their respective means.
  • Covariance function - A covariance function specifies the covariance between a random process's values at two inputs.
  • Covariance matrix - A covariance matrix is a square table describing the variances and pairwise covariances of a random vector's components.
  • Cramér's phi ( F c ) - Cramér's phi, commonly written phi_c and more widely known as Cramér's V, measures association between two categorical variables in a contingency table.
  • Credence (statistics) - Credence is a degree of belief that a proposition is true.
  • Criterion variable - A criterion variable is the variable a statistical model or prediction study aims to predict.

Sources

Frank Harrell, Glossary of Statistical Terms, Cox model: https://hbiostat.org/glossary/

Statsmodels developers, Methods for Survival and Duration Analysis: https://www.statsmodels.org/stable/duration.html

Lifelines author documentation, Survival Regression: https://lifelines.readthedocs.io/en/latest/Survival%20Regression.html

Primary educational and software sources were consulted. The numerical hazard-to-survival example and fictional equipment case are original, with stipulated model values.

Previous: Coverage error Next: Cramér's phi ( F c )

  • Home
  • Daily AI Updates
  • Blog
  • AIFBL Academy
  • AI Glossary
  • Products and Tools
  • Store
  • Free CFO AI Prompt Pack
  • About Shihan Sheriff
  • Privacy Policy
  • Terms of Use
  • Refund Policy
  • Cookie Policy
  • Earnings Disclaimer