17/9/26
5
min
Data analysis
What are outliers and how to detect them in your data
What are outliers: these are values that deviate abnormally from the rest of a data set. Learn how to detect them, determine their cause, and decide whether you should correct them, keep them, or adapt your analysis to avoid drawing misleading conclusions.

An outlier is a data point that lies abnormally far from the general behavior of a sample. It can be an error, a genuine exception, or a valuable clue, so detecting one is not the same as deleting it. First, you need to investigate.

Imagine a store receives between 20 and 35 orders a day and records 240 on a Tuesday. That 240 stands out, but you don't know why yet. Perhaps there was a brilliant campaign, a duplicate order, or a measurement error. The right decision depends on the cause and the goal of the analysis.

What exactly are outliers?

Outliers are observations that clearly deviate from the pattern followed by the rest of the data. The NIST statistical handbook defines them by their abnormal distance from other values in a sample and warns that what is considered abnormal depends on the context.

An outlier can appear for several reasons:

  • An error in entering, importing, or measuring a value.
  • A real change in customers, processes, or the market.
  • An exceptional event, such as a viral campaign.
  • A small or unrepresentative sample.
  • The application of a model that does not describe the data well.

That is why there is no universal boundary. A 5,000-euro order might be normal for an industrial company and extraordinary for a small e-commerce business.

Why do outliers matter?

Outliers matter because they can shift averages, distort comparisons, and worsen predictive models. If nine purchases are around 50 euros and one reaches 1,000, the average ticket will rise significantly even though almost no customer spends that amount.

They can also uncover opportunities. A spike in conversions might reveal an especially profitable channel; a sudden drop, a problem with a form; an unusual query, a need that no one was addressing. At Ocelot, we analyze these exceptions within their context before turning a striking figure into a marketing decision.

How is an outlier detected?

An outlier is detected by comparing each observation with the distribution and pattern of the set, first visually and then with an appropriate statistical criterion. No method alone replaces business knowledge.

Charts for locating strange values

A box plot shows the median, quartiles, and outliers. A scatter plot helps to see anomalous relationships between two variables. A time series allows you to distinguish an isolated spike from a sustained change. These are good starting points because they show the shape of the data before applying automatic rules.

Interquartile range rule

The interquartile range, or IQR, is the difference between the third and first quartiles. A common rule marks values lower than Q1 minus 1.5 times the IQR or higher than Q3 plus 1.5 times the IQR as potential outliers. It is useful when the distribution is not perfectly symmetrical and avoids relying too heavily on the mean.

Z-score and robust methods

The Z-score expresses how many standard deviations a value is from the mean. It works best when data approximates a normal distribution, but the mean itself can be dragged by extreme values. The NIST outlier detection guide suggests checking assumptions first and explains robust alternatives based on the median.

¿Se debe eliminar siempre un outlier?

No, un outlier solo debería eliminarse cuando existe una razón verificable y documentada. Borrarlo porque molesta puede ocultar información y presentar un resultado artificialmente limpio.

Una secuencia prudente sería esta:

  1. Comprueba la fuente original y descarta errores de captura.
  2. Averigua qué ocurrió en ese momento o registro.
  3. Repite el análisis con el dato y sin él.
  4. Elige un método robusto si el valor es legítimo.
  5. Documenta la decisión para que pueda revisarse.

Si una venta está duplicada, se corrige. Si corresponde a un cliente real, se conserva o se analiza como segmento separado. Si no puedes conocer la causa, presenta ambos escenarios y explica la incertidumbre.

Ejemplos de outliers en marketing y negocio

En marketing y negocio, los outliers aparecen como picos de tráfico, costes publicitarios extremos, compras inusualmente grandes o tiempos de respuesta fuera de rango. También pueden surgir en encuestas, previsiones de demanda y métricas de producción.

Supón que una campaña recibe cientos de visitas desde una misma ubicación sin generar interacción. Podría ser tráfico no humano. En cambio, una página que multiplica sus solicitudes tras ser recomendada en un medio muestra una excepción auténtica que merece estudiarse. El número se parece; la explicación cambia por completo la acción.

La clave es conectar analítica y contexto. Si necesitas convertir datos de campañas, web o ventas en decisiones comprensibles, el equipo de Ocelot puede ayudarte a separar las anomalías útiles del ruido y a construir una medición más fiable.

Preguntas frecuentes sobre outliers

¿Outlier y anomalía significan lo mismo?

Se usan a menudo como sinónimos, aunque anomalía suele describir un patrón inesperado más amplio y outlier, una observación extrema. La diferencia práctica depende del campo y del método empleado.

¿Un outlier siempre es un error?

No. Puede proceder de un fallo de registro, pero también de un evento real o de un comportamiento minoritario. Antes de corregirlo o eliminarlo hay que buscar su causa.

¿Cuántos outliers puede tener un conjunto de datos?

No hay una cantidad fija. Depende de la distribución, el tamaño de la muestra y el criterio elegido. Si aparecen muchos, quizá no sean excepciones sino varios segmentos o un modelo inadecuado.

¿Qué método es mejor para detectar outliers?

No existe uno mejor para todos los casos. Los gráficos y el rango intercuartílico son buenos para explorar, mientras que las pruebas estadísticas exigen comprobar supuestos. La elección debe responder al tipo de dato y a la decisión que vas a tomar.

GROW YOUR BUSINESS IN 2026

GROW YOUR BUSINESS IN 2026
Book a 30-min meeting