Distribution
Outlier Detection
Flags extreme values in numeric columns under three separate rules and reports how many were flagged and where they sit.
Method summary
Outlier detection asks how far a value stands from the rest of its column and flags the ones that cross a stated boundary. The panel offers three rules. The interquartile rule takes the lower and upper quartiles, multiplies the distance between them by the chosen multiplier, and flags whatever falls outside the resulting bounds; because it rests on quartiles it is not pulled around by the extreme values themselves. The z score rule converts each value into a distance from the mean in standard deviations and flags those whose absolute value exceeds the threshold. The modified z score rule replaces the mean and standard deviation with the median and the median absolute deviation, so a few extreme observations cannot bend the criterion in their own favour. For every rule the result lists the count of flagged observations, their percentage, and the bounds that produced them. None of this is a hypothesis test: the rules compute no probability, they only draw a line, and the decision stays with the researcher.
Which research questions does it answer?
- How many responses fall outside the body of the distribution on continuous variables such as income or duration?
- Which rows hold the observations that visibly pull the mean and the standard deviation?
- Could a handful of extreme cases lie behind an unexpected coefficient in my regression output?
- Which rows should I inspect when looking for careless or auto-filled answers?
When should you use it?
- Before an analysis that rests on means, standard deviations or least squares estimation, to review the extremes of the data.
- When each column holds at least 5 observations; below that the engine applies no rule and says so in a message.
- When descriptive statistics show an unexplained gap between the mean and the median.
- When a data entry error or a unit mix-up is suspected, monthly income entered as an annual figure for instance.
- When several continuous columns should be screened in one run to see which carries the most extreme cases.
Required variable types
- Flagging works on numeric columns only; categorical and text columns cannot be selected.
- There is no split into dependent and independent variables; each column is judged within its own distribution.
- The rules are univariate. A combination of two variables that is unusual jointly goes unflagged as long as each value stays inside its own bounds.
- One row per respondent, and the indices returned correspond to those row numbers.
Key assumptions
- Comparable values
- The rules treat every row as being on the same scale. Where a column mixes units, some answers in months and others in years for example, what gets flagged reflects the mix-up rather than any genuine extremity.
- Non-zero spread
- The z score divides by the standard deviation and the modified z score by the median absolute deviation, so either rule becomes undefined when its divisor is zero. A column where every respondent gave the same answer has no extremes to find in any case.
- Enough observations
- Quartiles and the median absolute deviation are unstable with very few cases. In a column of five values the bounds shift noticeably when a single answer changes.
- Roughly symmetric distribution
- Resting on the mean and the standard deviation, the z score rule treats the whole of a long tail as unusual in clearly skewed data. In a right-skewed income distribution the high earners are the shape of the variable, not anomalies.
How YouReply checks these assumptions
- Comparable values: The panel does not check this assumption automatically; the researcher evaluates it.
- Non-zero spread: The z score rule is skipped where the standard deviation is zero and the modified z score rule where the median absolute deviation is zero; both situations appear as an explanatory message in place of a result.
- Enough observations: The engine applies no rule to a column with fewer than 5 observations and reports that the count is insufficient.
- Roughly symmetric distribution: The panel does not examine skewness within this method. To see skewness and kurtosis values you need to run the normality tests or descriptive statistics separately.
How the analysis is run
- 1Upload your file to the panel and check in the Data tab grid that the numeric columns were read correctly.
- 2On the Variable tab declare your missing value codes as missing; an undeclared code such as 999 will inevitably be flagged by every rule.
- 3On the Analysis tab open the method picker and search by name or take the method from the distribution category; the data requirements box shows which columns qualify.
- 4Tick the columns to screen in the parameter form. You can leave the rule field on all or select a single rule.
- 5Change the interquartile multiplier away from 1.5 or the z score threshold away from 3 if you need to; the modified z score threshold is fixed at 3.5 and cannot be changed.
- 6Start the run. For every column the result lists the bounds per rule, the count and percentage flagged, sample values and the combined row indices in collapsible sections.
- 7Download the tables as Excel and open the flagged rows in your own data. No chart is drawn for this method, and any correction or removal is something you carry out in the data yourself.
Statistics and tables produced
- Interquartile rule result
- The lower and upper quartiles, the range between them, the computed lower and upper bounds, and the count and percentage of observations outside them.
- Z score rule result
- The threshold used plus the count and percentage of observations whose absolute z score exceeds it, computed from the column's mean and standard deviation.
- Modified z score rule result
- The count and percentage of observations whose score, based on the median and the median absolute deviation, exceeds the fixed threshold of 3.5.
- Sample flagged values
- The first 10 flagged values per rule. The counts are exact while the list is truncated: if 40 observations are flagged the count reads 40 but 10 values are shown.
- Combined row indices
- Indices of the rows flagged by any rule, limited to the first 20. These indices are what you use to locate the rows in your own data file.
- Per-column summary
- Observation count and the joint picture from the rules for every screened column. Columns where no rule could run are listed with a message giving the reason.
Effect size and confidence intervals
- Percentage flagged
- Describes how widespread the extremes are rather than how extreme they get. Even in a symmetric distribution the interquartile rule flags roughly 1% of cases; a figure above 5% usually means the distribution is skewed or that units have been mixed in the column.
- Position of the bounds within the data range
- The distance between the bounds and the observed minimum and maximum tells you how far the flagged cases sit. Values clustering just past the upper bound are the natural continuation of a tail, while one value several times beyond it suggests a data entry error.
- Agreement between the rules
- An observation flagged by all three rules is a stronger candidate than one flagged by a single rule. Cases where the z score rule stays silent while the modified z score fires indicate that the extreme values themselves have dragged the mean and the standard deviation their way.
No confidence interval and no p value are produced here, because what the method performs is rule-based flagging and not a significance test. The rules do not estimate the probability that an observation is anomalous, they only report whether it falls outside a boundary set in advance. The boundaries themselves vary from sample to sample, and no interval is reported for that variability. The engine deletes nothing, changes nothing and winsorises nothing: what happens to a flagged observation is the researcher's decision, and the reasoning belongs in the methods section.
Example research question and example result
The numbers below are a representative example, not data from a real study or a real user.
- Research question
- In a customer study, does the monthly spending column contain data entry errors or genuinely unusual answers? (Illustrative example, not real data.)
- Variables
- Monthly spending: the amount as reported, 504 complete answers · Rule field on all, interquartile multiplier 1.5, z score threshold 3
- Example result
- Lower quartile 420, upper quartile 1,180, range 760; lower bound -720, upper bound 2,320. The interquartile rule flagged 21 observations (4.2%), all beyond the upper bound. The z score rule flagged 6 observations (1.2%) and the modified z score rule, at its threshold of 3.5, flagged 34 (6.7%). The combined list holds 38 distinct row indices, of which the first 20 appear in the report. Among the first 10 flagged values are 2,400, 2,650, 3,100 and 48,000.
- Interpretation
- Most of what was flagged clusters just past the upper bound, which says that spending is right-skewed and that these cases should be read as the natural tail of the distribution. One value stands apart: 48,000 sits close to twenty times the upper bound and may well come from annual spending entered in a monthly field or from a lost decimal separator, so the raw row deserves inspection and correction. That the modified z score flags more cases is expected, since the median absolute deviation resists the pull of extreme values and keeps the criterion tighter. The right move is not to delete every flagged row but to review them one by one and correct only the faulty entry.
Real output on a sample dataset
The results below were produced by the analysis engine from this data file. Changing the variable changes the research question as well; every run was computed in advance, so the page sends no request to the engine.
General customer survey (synthetic)
A wide survey of three hundred respondents: two and three category grouping variables, continuous measures, a five point ordinal scale, a binary purchase outcome, a four category brand choice, three repeated measurements, paired binary questions, three raters, four price questions and deliberately empty cells.
- Rows
- 300
- Columns
- respondent_id, gender, education, region, age, income, satisfaction, service_score, price_score, quality_score, loyalty, nps_score, purchased, brand_choice, satisfaction_level, pre_score, post_score, measure_1, measure_2, measure_3, use_before, use_after, use_followup, rater_1, rater_2, rater_3, price_too_cheap, price_cheap, price_expensive, price_too_expensive, feedback_score, followup_rating
The data is synthetic: it comes from a fixed random seed, not from a real study. The values below were produced by the analysis engine from this file, so uploading the same file to the panel gives the same results.
Research question: Are there outliers in income that pull the mean upwards?
- Analyzed columns
- income
- Computation variant
- iqr
- IQR multiplier
- 1.5
Results per column
| Row | Valid observations | Mean | Standard deviation | Median | Interquartile range rule | Distinct outliers in the column | Outlier row indices (first twenty) |
|---|---|---|---|---|---|---|---|
| income | 300 | 45.41 | 17.09 | 42.05 | - | 6 | - |
Summary
- Number of analyzed columns
- 1
- Total outliers detected
- 6
Computation credits: scipy 1.18.0 · statsmodels 0.14.6 · scikit-learn 1.9.0 · numpy 2.5.1 · pandas 3.0.5 · semopy 2.3.11 · 89fc29a · Data seed: 20260914
How to report the result
In the monthly spending column the interquartile rule flagged 21 of 504 observations (4.2%) beyond the upper bound; on inspection only one proved to be a data entry error and was corrected, while the rest were retained as the tail of the distribution.
An example sentence close to APA style; the numbers are representative.
When you should not use it
- The rules work one variable at a time. Response patterns that are unusual across several variables jointly go unnoticed while each value stays within its own bounds.
- Being flagged is not the same as being wrong. The long tail of a skewed distribution crosses these boundaries even though the values are a genuine part of the population.
- At most 10 sample values per rule and at most 20 combined row indices are returned. The counts are exact, so you know how many were flagged, but the full list cannot be obtained from the panel.
- The modified z score threshold is fixed at 3.5; the other two rules take a parameter, but there is no way to tighten or loosen this one.
- The engine removes no row and alters no value. Correcting, trimming or excluding cases is work you do in your own data file.
- No chart illustrates the flagging. Since neither a box plot nor a scatter plot is produced, the position of the extremes within the distribution cannot be seen.
What to use when the assumptions are not met
- Descriptive StatisticsWhy: When percentiles together with the minimum and maximum are enough to see the edges of the distribution without imposing a rule.
- Normality TestsWhy: When the question is how much the extremes distort the shape of the distribution; it reports skewness and kurtosis alongside formal tests.
- Linear Regression (OLS)Why: When the anomaly belongs to the model residuals rather than to one column; cases far from the fitted value show up in the regression output.
Frequently asked questions
- Should I delete the flagged cases?
- Deletion is not the default step. For each flagged value start from its origin: if you find a unit mix-up, a misplaced decimal separator or an undeclared missing value code, correct it. If the value is real and belongs to the population, keeping it is the right call, since dropping it narrows the distribution artificially and makes standard errors look smaller than they are. A common practice is to run the analysis twice, once with and once without the extreme cases, and report both results. Whichever rows you do exclude, say which ones and why in the methods section.
- Which rule should I trust?
- The three rules differ in sensitivity. Built on quartiles and the median, the interquartile rule is unaffected by the extremes themselves and serves as the widely used default. The z score rule uses the mean and standard deviation, which lets a few large values distort its own criterion, so it sometimes misses what it should catch. The modified z score gets around that by using the median absolute deviation and is usually the strictest of the three. Leaving the rule field on all and reading the three results side by side is the most practical way to see which cases stay extreme under every criterion.
- More than 5% of my cases were flagged, is that normal?
- A high share usually means the shape of the distribution does not suit the rule, not that individual cases are faulty. With right-skewed variables such as income, spending or duration measurements, the entire long tail can fall outside the bounds. Rather than tightening the rule, it is often better to screen the variable on a log scale or to drop the notion of outliers altogether and choose an analysis suited to a skewed distribution. A high share can also be a symptom of missing value codes that were never declared.
- How do I get the complete list of flagged rows?
- The panel returns the first 10 values per rule and the first 20 combined row indices, while the counts are exact. If you need everything, use the boundaries in the result to filter your own data file: the lower and upper bounds of the interquartile rule, the z score threshold, and the column's mean and standard deviation are all printed, so the same rule can be reapplied by hand or in a spreadsheet. The indices follow the row order of the file you uploaded.
References
- Tukey, J. W. (1977). Exploratory Data Analysis
- Iglewicz, B., & Hoaglin, D. C. (1993). Detection of Outliers
- Field, A. (2018). Discovering Statistics Using IBM SPSS Statistics
- numpy.percentile documentation
Try it with your own data
The free plan includes 50 analysis runs a month and needs no card.