liveBook · Manning

Log probability

As explained in Statistics Every Programmer Needs

Log-likelihood is the logarithm of the likelihood of observed data under a statistical model and its parameter values.

Log-likelihood is the logarithm of the likelihood function: the probability of observing the data given a statistical model and its parameter values. It measures how closely those parameters explain the observed data. section 5.2.3 section 7.3.10

Use log-likelihood to:

  • Compare a fitted logistic regression with its intercept-only null model; a larger difference indicates greater predictive value from the independent variables. section 5.2.3
  • Evaluate competing models fitted to the same data, while recognizing that the raw value is difficult to interpret in isolation. section 5.2.3 section 7.3.10
  • Assess time-series model fit and combine fit information with AIC, BIC, or HQIC when model complexity matters. section 7.3.10

Logistic-regression fit

A fitted logistic regression stores the model and null-model log-likelihoods. McFadden’s pseudo R² uses their quotient to summarize the added value of predictors, producing a more readily interpretable fit measure between 0 and 1. section 5.2.3

How Statistics Every Programmer Needs covers it

How deep it goes
Defines the likelihood transformation and applies it to null-model comparisons, pseudo R², and information criteria without deriving estimation algorithms.
Examples
Uses binary-outcome logistic regression and fitted time-series models as concrete settings for interpreting model fit.
What you can do after
Evaluate model fit and compare fitted models using stored log-likelihoods, pseudo R², AIC, BIC, and HQIC.
How it connects
Connects log-likelihood with logistic regression, null models, McFadden’s pseudo R², AIC, BIC, HQIC, and time-series models.

Also explained in

Compare how 8 books explain log probability →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Statistics Every Programmer Needs. The section links point to the parts of the book it draws on.