1001Ferramentas
๐Ÿ“ Calculators

Theil-Sen Estimator (Robust Regression)

Computes the Theil-Sen line, a robust alternative to least squares for fitting a linear trend. Instead of minimizing squared errors (which makes the classic line very sensitive to outliers), it takes the median of all slopes between pairs of points. Because it uses the median, it tolerates up to about 29% of outlying points without being dragged off course. It's the natural companion to the Mann-Kendall test for quantifying the detected trend. Enter the X and Y values.

Resultado

โ€”

Theil-Sen Estimator (Robust Regression)

Computes the Theil-Sen line, a robust alternative to least squares for fitting a linear trend. Instead of minimizing squared errors (which makes the classic line very sensitive to outliers), it takes the median of all slopes between pairs of points. Because it uses the median, it tolerates up to about 29% of outlying points without being dragged off course. It's the natural companion to the Mann-Kendall test for quantifying the detected trend. Enter the X and Y values.

The slope that outliers can't hijack

Least-squares regression has an Achilles' heel: because it minimizes squared errors, a single point far off the curve can bend the whole line. In real data, full of suspect measurements, that's a constant risk. The Theil-Sen estimator offers an alternative that practically ignores outlying points.

The recipe is disarmingly simple. For each pair of points, you compute the slope of the line joining them. With many points, this yields a heap of slopes; the Theil-Sen estimate is simply the median of all of them. Because the median is unmoved by extreme values, the resulting line withstands nearly a third of the data being outliers without losing its way. The intercept comes from the median of the corresponding residuals.

Enter the X and Y values in two lists. The tool returns the slope and intercept of the Theil-Sen line. It's the right choice when you doubt the quality of some points, or when you want to quantify the magnitude of a trend that the Mann-Kendall test has already flagged as significant.

Related Tools

The results provided by this tool are for general informational and educational purposes only and do not constitute professional, financial, medical, legal, tax or accounting advice. Always confirm important decisions with a qualified professional and official sources.