RANSAC Regression
Random Sample Consensus (RANSAC) Regression · Also known as: random sample consensus, RANSAC, robust regression, RANSAC Regresyonu
RANSAC Regression is a robust linear regression method introduced by Fischler and Bolles in 1981 that fits a model to the inlier points of a dataset while automatically excluding outliers. Instead of fitting all the data at once, it repeatedly samples small subsets, fits a candidate model, and keeps the model that wins the largest consensus of agreeing points.
Read the full method
Sign in with a free account to read this section.
Method map
The neighbourhood of related methods — select a node to explore.
When to use it
RANSAC Regression is a good fit when the relationship is approximately linear, the outcome is continuous, and the data may contain a substantial share of outliers that you want excluded automatically rather than modelled. It needs a reasonable sample (about 30 observations or more) so that the random sampling can find a reliable consensus, and it works best when the inlier points genuinely represent the underlying model. It is less suitable for very small samples or when the outlier fraction is so high that finding a clean consensus becomes impractical.
Strengths & limitations
- Tolerates a high proportion of outliers and excludes them automatically from the fit.
- Does not require normally distributed errors.
- Yields a linear model whose coefficients are interpreted just like ordinary regression, but estimated only on the inlier points.
- In very small samples (n < 20) the random sampling cannot find a reliable consensus.
- When the outlier fraction is very high (above about 25%), the number of trials needed grows steeply and a deterministic robust method is preferable.
- Results depend on the residual threshold and the number of trials, so different settings can yield different inlier sets.
Frequently asked
How is RANSAC different from ordinary least squares?
OLS fits all points at once and is easily pulled off course by outliers, because it minimises the squared error of every point. RANSAC instead fits to a consensus of inlier points and discards the outliers, so a handful of gross errors does not distort the line.
How many outliers can RANSAC handle?
It can tolerate a high outlier share, but as the fraction grows the number of random trials needed to find a clean consensus rises sharply. Beyond roughly 25% outliers a deterministic robust method such as least trimmed squares is usually preferable.
What does the residual threshold do?
The residual threshold defines how close a point must be to a candidate model to count as an inlier. It directly controls which points enter the consensus set, so it should be set with care and its effect on the result checked.
When should I use Theil-Sen instead?
When the sample is very small (around fewer than 20 observations), RANSAC's random sampling cannot find a reliable consensus. A Theil-Sen estimator, which is deterministic, is a more dependable robust alternative in that case.
Sources
- Fischler, M. A. & Bolles, R. C. (1981). Random Sample Consensus: A Paradigm for Model Fitting with Applications to Image Analysis and Automated Cartography. Communications of the ACM, 24(6), 381-395. DOI: 10.1145/358669.358692 ↗
- Torr, P. H. S. & Zisserman, A. (2000). MLESAC: A New Robust Estimator with Application to Estimating Image Geometry. Computer Vision and Image Understanding, 78(1), 138-156. DOI: 10.1006/cviu.1999.0832 ↗
How to cite this page
ScholarGate. (2026, June 1). Random Sample Consensus (RANSAC) Regression. ScholarGate. https://scholargate.app/en/statistics/ransac-regression
Which method?
Set this method beside its closest kin and read them side by side — the library lays the books on the table; the choice is yours.
- Least Trimmed SquaresStatistics↔ compare
- OLS RegressionEconometrics↔ compare
- Quantile RegressionEconometrics↔ compare
- Robust Covariance (MCD)Statistics↔ compare
- Theil-Sen EstimatorStatistics↔ compare