liveBook · Manning

Anomaly

Also called outlier

An anomaly is an observation, data state, or behavior that substantially deviates from an expected or prevailing pattern or condition.

How 20 Manning books explain it

Outlier Detection in Python

An extreme value is an observation far from the typical level of a time series, either unusually small or unusually large.

How it is used
Identifies unusually high or low time-series observations for investigation, including sales counts and industrial sensor readings.
How deep it goes
Works through IQR-based limits and threshold tuning, then contrasts fixed rules with forecast-based detection rather than deriving forecasting models.
Examples
Uses an injected daily sales spike, plotted against IQR limits, and industrial sensor deviations.
What you can do after
Apply it via Python IQR limits to flag candidate extreme values, then investigate what the flags mean.

Read how Outlier Detection in Python explains anomaly →

Statistics Slam Dunk

An outlier is an observation that lies unusually far from the other observations in a distribution or dataset.

How it is used
Protects linear regression analyses from extreme observations that can bias model results.
How deep it goes
Explains visual detection, two statistical tests, and winsorization, while noting limitations of Dixon’s Q Test and Grubbs’ Test.
Examples
Uses NBA career win shares and player deflections, comparing scatterplots, histograms, and boxplots before and after capping values.
What you can do after
Diagnose/debug with it by visually identifying extreme values and capping them through winsorization before regression modeling.

Read how Statistics Slam Dunk explains anomaly →

The Well-Grounded Data Analyst

An outlier is an observation whose value differs substantially from the typical pattern of the other observations.

How it is used
Uses outliers to guide data-quality checks and uncover meaningful groups before downstream analysis.
How deep it goes
Demonstrates visual and record-level inspection plus a price-filtering decision, without defining a formal detection rule.
Examples
Uses daily e-commerce event counts, house-sale prices, and high-spending customer groups as examples.
What you can do after
Evaluate/understand unusual observations through visualization, record inspection, contextual hypotheses, and explicit cleaning choices.

Read how The Well-Grounded Data Analyst explains anomaly →

Machine Learning for Tabular Data: XGBoost, Deep Learning, and AI

An extreme value is an observation or value located unusually far toward an edge of an observed distribution.

How it is used
Use outlier checks during exploratory analysis to find data problems and limit values that may affect machine-learning performance.
How deep it goes
Explains detection through descriptive statistics, charts, and percentiles, then demonstrates winsorization and percentile-based filtering rather than formal outlier tests.
Examples
Uses Auto MPG numeric features, accommodation predictors capped by winsorization, and an accommodation-price target filtered with percentile bounds.
What you can do after
Evaluate/understand whether extreme observations are errors, legitimate cases, or candidates for capping or percentile-based exclusion.

Read how Machine Learning for Tabular Data: XGBoost, Deep Learning, and AI explains anomaly →

Data Without Labels

In DBSCAN, an outlier or noise point is an observation that is neither a core point nor reachable from a core point and therefore receives no cluster assignment.

How it is used
Uses anomalies to distinguish DBSCAN noise from clustered observations and to flag unusual values that may affect analysis.
How deep it goes
Defines noise through DBSCAN neighborhoods and gives practical detection and treatment options, without developing a formal anomaly-scoring method.
Examples
Uses transaction-count and rainfall extremes, a core-border-noise diagram, and Python cluster and nearest-neighbor plots.
What you can do after
Apply it via scikit-learn DBSCAN to inspect noise points, then evaluate whether unusual observations warrant investigation or treatment.

Read how Data Without Labels explains anomaly →

Starting Data Analytics with Generative AI and Python

An outlier is an observation that is unusually distant from the other values in a dataset or from an expected pattern.

How it is used
Supports data-quality checks and interpretation of unusual observations in business analysis.
How deep it goes
Defines outliers and outlines detection, investigation, and treatment choices without prescribing a universal decision rule.
Examples
Uses transaction locations and review response-time distributions to illustrate unusual observations.
What you can do after
Evaluate unusual observations using counts and visualizations before choosing a context-appropriate treatment.

Read how Starting Data Analytics with Generative AI and Python explains anomaly →

Cyber Threat Hunting

An outlier is an observation that lies unusually far from the central or typical range of a data set.

How it is used
Uses outlier handling to reduce statistical noise while investigating anomalous network behavior and possible beaconing.
How deep it goes
Explains quartiles, skew, and IQR filtering with pandas listings, then stops short of fully interpreting each candidate connection.
Examples
Demonstrates outlier filtering on network timing data grouped by source IP, destination IP, and destination port.
What you can do after
Diagnose noisy network timing data with pandas and produce lower-variance connection candidates for threat investigation.

Read how Cyber Threat Hunting explains anomaly →

Pandas Workout: 200 exercises to make you a stronger data analyst

An outlier is an observation unusually far below or above the central range of a dataset according to a chosen criterion.

How it is used
Uses unusual observations to investigate precise analytical questions and assess whether changes affect rare or extreme cases.
How deep it goes
Explains IQR thresholds, pandas filtering, comparative analysis, boxplots, and z-score extensions without developing statistical theory.
Examples
Uses taxi distances and passenger counts, plus Chicago temperature readings visualized with boxplots.
What you can do after
Diagnose unusual observations with pandas, compare related measures, visualize extremes, and experiment with percentile or z-score criteria.

Read how Pandas Workout: 200 exercises to make you a stronger data analyst explains anomaly →

Experimentation for Engineers

An observed data point that lies unusually far from the other observations in a dataset or fitted relationship.

How it is used
Flags measurements that can make a response-surface regression unreliable near an assumed optimum.
How deep it goes
Defines visual diagnosis and range-shrinking remediation, but defers automatic bad-point detection and universal thresholds.
Examples
Uses a low markout-profit measurement at threshold 0.5 and order_size 3.5, then contrasts it with a later outlier-free iteration.
What you can do after
Diagnose questionable regression measurements and refine parameter ranges before continuing optimization.

Read how Experimentation for Engineers explains anomaly →

Domain-Specific Small Language Models

A model feature or weight with unusually large magnitude that can hurt low-precision quantization if not treated separately.

How it is used
Identifies unusually large weights or activations that can undermine low-precision LLM quantization during deployment.
How deep it goes
Explains why outliers impair precision and compares threshold-based separation with per-channel smoothing, without deriving the transformations.
Examples
Compares FP16, naive 8-bit, and SmoothQuant accuracy results on validation examples, including OPT-2.7B.
What you can do after
Evaluate/understand when outlier handling may protect quantized-model accuracy and why accelerator efficiency affects the choice of method.

Read how Domain-Specific Small Language Models explains anomaly →

Build a DeepSeek Model (From Scratch)

An outlier is a numerical activation, weight, or gradient whose magnitude is unusually large relative to other values in its group.

How it is used
Motivates replacing tensor-wide scaling with fine-grained scaling to preserve precision during low-precision quantization.
How deep it goes
Works through a numerical quantization example and explains grouped scaling as mitigation, without detailing its implementation.
Examples
Illustrates precision loss with the vector [2.0, 3.0, 500.0] quantized to 8-bit integers.
What you can do after
Understand how a large value can degrade smaller values under shared scaling and how independent group scales mitigate the effect.

Read how Build a DeepSeek Model (From Scratch) explains anomaly →

Statistics Every Programmer Needs

An outlier is an observation that is unusually distant from the pattern represented by the rest of a dataset.

How it is used
Uses outlier checks when assessing data and fitting linear regression.
How deep it goes
Defines outliers, mentions scatterplot detection, and illustrates removal without detailing a detection procedure.
Examples
Removes a presumed point from eight observations and reports R² rising from 0.88 to 0.95.
What you can do after
Diagnose regression data by checking for outliers and evaluating their effect on model fit.

Read how Statistics Every Programmer Needs explains anomaly →

Build AI Drug Discovery Pipelines

An outlier is a data point whose value is unusually distant from the pattern or distribution of the other observations.

How it is used
Identifies unusual solubility observations that may hinder model learning and introduces low-density regions as possible anomalies.
How deep it goes
Defines outliers and gives IQR thresholds, but does not develop a complete anomaly-detection workflow.
Examples
Uses aqueous-solubility values from −12 to 1.97 logS and contrasts them with a typical drug-like range near −6 to −3.
What you can do after
Diagnose potential outliers by applying IQR thresholds, inspecting chemical extremes, or identifying low-probability regions.

Read how Build AI Drug Discovery Pipelines explains anomaly →

Data-Driven Cybersecurity

An outlier is an observation that lies unusually far from the expected distribution or reference pattern.

How it is used
Identifies deviations in cybersecurity data that may warrant threat investigation.
How deep it goes
Explains baseline analysis, thresholding, and false-positive review, then demonstrates clustering; it defers deeper statistical and AI analysis.
Examples
Uses device communication and login-behavior data to illustrate outliers in clustering plots and outputs.
What you can do after
Diagnose potentially unusual device behavior by applying statistical thresholds or inspecting clustering results.

Read how Data-Driven Cybersecurity explains anomaly →

Vibe Engineering

An outlier is an observation that differs markedly from the distribution or expected pattern of the other observations.

How it is used
Uses outlier handling in medicine-price prediction to limit extreme or potentially broken prices from influencing model predictions.
How deep it goes
Applies a 99th-percentile price cutoff but does not describe how to distinguish valid extremes from broken values.
Examples
Uses medicine prices above the 99th percentile as the exclusion case and notes outlier handling as a real-data challenge.
What you can do after
Apply a 99th-percentile price filter before fitting a price-prediction model.

Read how Vibe Engineering explains anomaly →

The Art of AI Product Development

An outlier is a data point whose behavior or value is anomalous relative to the dominant patterns in a dataset.

How it is used
Detects unexpected deviations in time-series behavior and identifies users who do not fit discovered behavioral clusters.
How deep it goes
Defines anomalies as unexpected departures and illustrates peaks, troughs, and unmatched users without detailing detection algorithms.
Examples
Uses unusual clicking by a new user, a bot outside customer clusters, and a brief traffic spike as examples.
What you can do after
Diagnose unusual activity by investigating deviations, as with a user whose repeated clicks revealed a site-scraping bot.

Read how The Art of AI Product Development explains anomaly →

Financial AI in Practice

An outlier is a data value that is unusually distant from other observations in a dataset or distribution.

How it is used
Protects credit-model binning and WoE calculations from extreme values that can distort results or destabilize production performance.
How deep it goes
Compares capping, transformation, and dedicated bins, but does not provide implementation steps or a method for selecting among them.
Examples
Uses unusually high incomes, large transactions, spending spikes, and extremely wealthy borrowers as examples.
What you can do after
Apply capping, transformations, or dedicated bins while weighing genuine high-value signals against overfitting to rare observations.

Read how Financial AI in Practice explains anomaly →

Quantization and Fast Inference

An outlier is a value that differs substantially from most values in a distribution.

How it is used
Protects rare, high-magnitude activation dimensions when quantizing large language models.
How deep it goes
Explains how outliers disrupt quantization and summarizes mitigation methods without deriving their implementations.
Examples
Contrasts activations mostly in [−1,1] with a channel near 100, and describes dimensions hundreds of times larger than neighbors.
What you can do after
Evaluate/understand why clipping or coarse scaling can harm quantized model quality and motivate outlier-aware methods.

Read how Quantization and Fast Inference explains anomaly →

CUDA for LLMs

An outlier is a data value that differs substantially from typical values in a distribution.

How it is used
Uses outliers to motivate robust calibration and finer scale granularity in quantization.
How deep it goes
Works through min-max precision loss with numeric values, then contrasts percentile calibration and per-channel or per-group scales.
Examples
Uses activations [0.1, 0.5, 0.8, 100.0] to show how an outlier compresses ordinary values under UINT8 asymmetric quantization.
What you can do after
Diagnose precision loss from an outlier and compare percentile calibration or finer scale granularity as responses.

Read how CUDA for LLMs explains anomaly →

Grokking Statistics

An outlier is an observation that differs markedly from most other observations in a dataset.

How it is used
Flags unusual observations and explains why median-based summaries can better represent typical values when data is skewed.
How deep it goes
Defines outliers through examples and standard-deviation thresholds, stopping short of formal detection methods.
Examples
Uses bar tabs, extreme coffee measurements, and an unlikely investment return to illustrate unusual observations.
What you can do after
Evaluate/understand how extreme values affect summaries and identify unusually distant observations with standard-deviation ranges.

Read how Grokking Statistics explains anomaly →

Also covered in

What to know first

Related concepts

Questions about anomaly

What is anomaly?

An anomaly is an observation, data state, or behavior that substantially deviates from an expected or prevailing pattern or condition.

Which Manning books explain anomaly?

Outlier Detection in Python, Statistics Slam Dunk, The Well-Grounded Data Analyst, Machine Learning for Tabular Data: XGBoost, Deep Learning, and AI, Data Without Labels, Starting Data Analytics with Generative AI and Python, Cyber Threat Hunting, Pandas Workout: 200 exercises to make you a stronger data analyst and 12 more.

What should I know before learning anomaly?

Manning books that teach anomaly usually introduce mean, standard deviation, language model and median first.

What kinds of anomaly are there?

Kinds of anomaly include local outlier, out-of-distribution and contextual anomaly.

What is anomaly also called?

Anomaly is also called outlier.

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.