Concept Architecture
Concept
Theoretically, Leave-One-Out Cross-Validation (LOOCV) is a special case of K-Fold Cross-Validation in which the number of folds equals the number of observations in the dataset. Each observation is excluded once, the model is fitted using the remaining observations, and the excluded observation is used for validation. LOOCV exists to estimate the predictive performance of statistical and machine learning models while making maximal use of available data, particularly in studies with small sample sizes.
Mathematically, Leave-One-Out Cross-Validation estimates the expected prediction error by averaging the validation loss obtained from all individual leave-one-out iterations. Since each observation serves once as the validation sample and n ? 1 times as part of the training data, the resulting estimate is nearly unbiased for out-of-sample prediction error, although it may exhibit relatively high variance compared with other cross-validation methods.
In practice, LOOCV is implemented by repeatedly fitting the model after omitting a single observation, calculating the prediction error for that omitted observation and averaging the errors across all observations. In health economics, LOOCV is applied to validate predictive risk models, health outcome models, resource utilisation models and machine learning algorithms when datasets are relatively small and retaining as much training data as possible is desirable.
Purpose
Used to estimate out-of-sample predictive performance, compare competing statistical models, assess model generalisability and validate prediction models when sample sizes are limited.
Mathematical Formulae
Primary Formula
LOOCV = (1/n) ? ????� L?
where:
- LOOCV = average leave-one-out validation error
- n = number of observations
- L? = prediction loss for the omitted observation in iteration i
Supporting Formulae
Mean Squared Error (regression):
MSE = (1/n) ? ?(y? ? ??)�
Root Mean Squared Error:
RMSE = �MSE
Classification Error:
Error = Number of incorrect predictions / Number of observations
Related Mathematical Methods
- K-Fold Cross-Validation
- Repeated K-Fold Cross-Validation
- Bootstrap Validation
- Hold-Out Validation
- Cross-Validation
- Maximum Likelihood Estimation
Example
A health economist develops a regression model to predict annual healthcare costs using data from 120 patients.
Using Leave-One-Out Cross-Validation:
- 120 separate models are fitted.
- Each model excludes one patient.
- The excluded patient's cost is predicted.
- The squared prediction errors are averaged.
Suppose the average validation Mean Squared Error is:
LOOCV MSE = 18.6
This value provides an estimate of the model's expected prediction error when applied to new patients and can be compared with competing prediction models.
Excel Implementation
| Function | Example Formula | Health Economics Application |
|---|---|---|
| ROW | =ROW(A2)-1 | Identify the observation omitted during each iteration. |
| AVERAGE | =AVERAGE(B2:B121) | Calculate the mean validation error across all leave-one-out iterations. |
| SUMPRODUCT | =SUMPRODUCT((Actual-Predicted)^2)/COUNT(Actual) | Calculate Mean Squared Error for validation. |
| COUNT | =COUNT(A2:A121) | Determine the total number of leave-one-out iterations. |
| Solver | Optimise model parameters after excluding each observation. | Estimate model performance under leave-one-out validation. |
VBA (Optional)
A VBA routine can automate repeated leave-one-out model fitting, calculate validation errors for every omitted observation and summarise overall predictive performance.
Sources
- Stone M. Cross-Validatory Choice and Assessment of Statistical Predictions. Journal of the Royal Statistical Society Series B. 1974;36(2):111?147.
- Allen DM. The Relationship Between Variable Selection and Data Augmentation and a Method for Prediction. Technometrics. 1974;16(1):125?127.
- Hastie T, Tibshirani R, Friedman J. The Elements of Statistical Learning. Springer.
- James G, Witten D, Hastie T, Tibshirani R. An Introduction to Statistical Learning. Springer.
- Briggs A, Claxton K, Sculpher M. Decision Modelling for Health Economic Evaluation. Oxford University Press.
- ISPOR Good Practice Reports.
Related Concepts (2)
Library
Publications
1
Statistical Analysis of Cost-Effectiveness Data — Willan & Briggs, 1st Edition ed., 2006 (John Wiley & Sons)
A synthesis of statistical methods for analysing cost-effectiveness data, including net-benefit regression, confidence intervals for the ICER, cost-effectiveness acceptability curves, and covariate adjustment. Part of the Wiley Statistics in Practice series.
BookView source →
Frequently Asked Questions (6)
What is leave-one-out cross-validation?
A cross-validation form repeatedly refitting a model using all but one observation, using that observation to test accuracy, until each has served once.
Source: Stone 1974
How does leave-one-out cross-validation use each observation?
Leave-one-out cross-validation refits a model many times, each time setting aside a single observation, training on all the rest, and testing the model on the one held out, until every observation has served as the test case exactly once. Averaging these single-point tests gives an estimate of how the model performs on unseen data that uses the dataset almost in full for training each round. It is the extreme case of k-fold cross-validation, thorough but computationally heavy. Testing on one point at a time is its method. Hastie and colleagues (2009) describe this technique.
Source: Hastie et al. 2009
How does leave-one-out cross-validation work?
Leave-one-out cross-validation works by, for each observation in turn, training the model on all the other observations and predicting the left-out one, then comparing the prediction with its actual value; after every observation has been left out once, the prediction errors are combined to estimate performance. So leave-one-out cross-validation works by systematically omitting one observation at a time, fitting on the remainder, and testing on the omitted point, which produces as many train-test rounds as there are observations, using nearly all the data for training in each round and giving an estimate of generalisation based on predicting each observation from the others.
Source: Stone 1974
What are the advantages and disadvantages of leave-one-out cross-validation?
The advantages of leave-one-out cross-validation include using almost all the data for training each time, giving a nearly unbiased estimate of performance, and being deterministic, with no randomness in the splits; its disadvantages include high computational cost, since the model is refitted as many times as there are observations, and higher variance in the estimate. So leave-one-out cross-validation trades low bias and full data use against computational expense and greater variance, which is why it is used for smaller datasets or where an almost unbiased estimate is wanted, while k-fold cross-validation with fewer folds is often preferred for larger data as a more efficient compromise.
Source: Stone 1974
How does leave-one-out relate to k-fold cross-validation?
Leave-one-out cross-validation is the special case of k-fold cross-validation in which the number of folds equals the number of observations, so each fold contains a single observation. As the number of folds increases toward the sample size, k-fold cross-validation approaches leave-one-out. So leave-one-out is the extreme of k-fold cross-validation, using the maximum number of folds, which gives the largest training sets and near-unbiased estimates at the cost of the most computation, while smaller numbers of folds, such as five or ten, offer a balance, illustrating that leave-one-out and k-fold are points on the same continuum of cross-validation.
Source: Stone 1974
When is leave-one-out cross-validation used?
Leave-one-out cross-validation is used when the dataset is small, so that leaving out one observation at a time is affordable and using nearly all the data for training is valuable, or when a nearly unbiased estimate of performance is wanted. So leave-one-out cross-validation is used chiefly for small datasets and situations favouring maximal use of the data, where its computational cost is manageable, whereas for larger datasets its expense and the higher variance of its estimate make k-fold cross-validation with fewer folds the more practical choice, so the decision depends on the sample size and computational resources.
Source: Stone 1974
Trust Record
Verified by Dr Darrin Baines
British health economist
Professional identity: darrinbaines.org
Verification date: 17 Dec 2025
Content version: 1.0.0
Canonical Identity
- Persistent URI
- https://healtheconomics.wiki/concept/leave-one-out
- Term code
- HE-ES-SA-101
Stable URI · Machine-readable · Resolvable · CC BY 4.0