1001Ferramentas
🚨Calculators

Outlier Detection (IQR Rule)

Detect outliers using IQR rule (outside Q1−1.5·IQR or Q3+1.5·IQR).


  

IQR and outlier detection

The interquartile range measures the central spread of the data: IQR = Q3 − Q1. Tukey's fences (1977) flag outliers without assuming normality — mild outliers fall below Q1 − 1.5·IQR or above Q3 + 1.5·IQR; extreme outliers use the 3·IQR multiplier. Example: 10, 12, 14, 15, 16, 18, 100 → Q1 = 12, Q3 = 18, IQR = 6, upper fence = 27 → 100 is flagged. The boxplot draws a box from Q1 to Q3 with the median inside, "whiskers" out to the last non-outlier value, and isolated points beyond. More robust than the σ rule because Q1/Q3 are not pulled by extreme values.

Applications

Data cleaning in ML pipelines (sklearn, pandas), salary analysis (separate discrepant cases), stock markets (rare events, fat tails), industrial quality control, banking fraud (atypical transactions), and epidemiology (extreme cases).

FAQ

IQR or standard deviation — which to choose? IQR is robust: it does not depend on the mean nor on σ, so it does not blow up with outliers. σ is preferable on clean, approximately normal data.

Why 1.5·IQR? Empirical choice by Tukey balancing false positives and false negatives. Under a normal distribution, the fences cover about 99.3% of the data — beyond is suspicious.

Should I always remove flagged outliers? No. Investigate first: it may be a typo, a measurement error, or a real signal (fraud, rare event). Removing without thinking destroys information.

Related Tools

📐

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.

🚩

Grubbs' Test (Outlier)

Computes Grubbs' test, used to identify whether the most extreme value in a sample is a statistical outlier, under the assumption that the data would be normal without it. It compares the deviation of the farthest point from the mean, in standard-deviation units, against a critical value derived from the t distribution. If the G statistic exceeds the critical value, the point is flagged as an outlier. It's the classic test for cleaning data before an analysis. Enter the data and the confidence level.

📊

Median Quartiles IQR Calculator

Computes median, first quartile Q1, third quartile Q3 and interquartile range IQR of a list of numerical values.

📊

Cliff's Delta (Effect Size)

Computes Cliff's delta, a non-parametric effect-size measure between two groups. It answers a direct question: if I draw a value at random from each group, how much more likely is one to be larger than the other? It ranges from −1 to +1; zero means complete overlap. Because it works only with order comparisons, it requires no assumptions about the distribution and is robust to outliers. It's the ideal companion to the Mann-Whitney test. Enter the two groups of values.

📊

F-Test for Equality of Variances

Computes the F-test for comparing the variances of two independent groups, checking whether they have the same spread. It's a common step before choosing between the classic t-test (which assumes equal variances) and Welch's (which doesn't). The statistic is the ratio of the two sample variances, and the F distribution, with its two degrees of freedom, provides the p-value. The tool takes the two samples and computes F, the degrees of freedom and the two-sided p-value. Enter the two groups of values.

🎲

Binomial Distribution

Compute P(X = k) and P(X ≤ k) in binomial distribution B(n, p).

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.