Theil-Sen Regression
Theil-Sen regression estimates the slope of a straight line as the median of the slopes between all pairs of points, giving a robust, distribution-free alternative to least squares.
Theil-Sen 회귀는 모든 점 쌍 사이 기울기의 중앙값으로 직선의 기울기를 추정하는, 이상값에 강한 비모수 회귀입니다.
A few outliers are dragging my regression line; is there a robust way to estimate the trend between two variables?
몇 개의 이상값이 회귀선을 끌어당기는데, 두 변수의 추세를 강건하게 추정하는 방법이 있나요?
Theil-Sen regression takes the median of all pairwise slopes, so up to about 29 percent of the points can be outliers without breaking the estimate. Its significance is assessed with Kendall's tau, and a nonparametric confidence interval is available for the slope.
When to use Theil-Sen Regression
- The relationship is roughly linear but the data contain outliers
- Errors are skewed or heavy-tailed
- You need a robust trend estimate, for example in environmental monitoring series
When to use something else
- Several predictors must be adjusted for at once; use robust regression (Huber) instead
- Both variables are measurements of the same quantity to be compared; use Passing-Bablok regression instead
Assumptions and requirements
- The relationship is linear
- Observations are independent
- The predictor is continuous with few ties
What the analysis reports
- Median slope with nonparametric confidence interval
- Intercept
- Kendall's tau and its p value
- Least squares slope for comparison
How to report it
The Theil-Sen slope of [outcome] on [predictor] was [value] units per unit, 95% CI [[value], [value]] (Kendall's τ = [value], p = [value], n = [value]).
Related methods
Run Theil-Sen Regression on Quorant
- Data you need
- a table (CSV or Excel) with an outcome variable and predictor (feature) columns
- Price
- 250 credits for one analysis up to 10,000 rows (complexity level 2); larger or wider data costs more. Optional methodologist review: 1200 credits.
- Checking
- Checked by property tests in every deployment
- Before you pay
- A free pre-analysis diagnosis checks your data and gives an exact quote; nothing is deducted until you approve it.