Mean
A mean is a measure of central tendency, calculated as the arithmetic average of values or, for a random variable, as the probability-weighted average of its possible values.
Pandas Workout: 200 exercises to make you a stronger data analyst
The arithmetic average of a collection of numerical values, also serving as the central-location parameter of a normal distribution.
- How it is used
- Summarizes numeric Series and selected data subsets as a central value for descriptive analysis and comparison.
- How deep it goes
- Defines arithmetic calculation, demonstrates pandas methods and broadcasting, and warns about outlier sensitivity without pursuing deeper statistical theory.
- Examples
- Uses test scores, normally distributed values, temperatures, taxi rides, athlete data, tourism data, and vowel counts.
- What you can do after
- Apply it via pandas `Series.mean()` to summarize, compare, filter, and rescale numeric data.
Read how Pandas Workout: 200 exercises to make you a stronger data analyst explains mean →
Math and Architectures of Deep Learning
The expected value or center parameter of a probability distribution, especially a Gaussian distribution.
- How it is used
- Parameterizes probability distributions and estimates their centers from training data for generative modeling.
- How deep it goes
- Defines weighted-sum and integral forms, extends them to vectors and functions, and relates means to sampling, geometry, and variance.
- Examples
- Uses repeated samples, binary success encoding, binomial success counts, Gaussian bells, height data, mixture peaks, and VAE latent vectors.
- What you can do after
- Apply it via PyTorch distribution properties and sample averages to compare theoretical and empirical means.
Read how Math and Architectures of Deep Learning explains mean →
Build a Robo-Advisor with Python (From Scratch)
An arithmetic average return is the sum of periodic investment returns divided by the number of periods.
- How it is used
- Calculates average historical returns and supplies return assumptions for Monte Carlo simulations.
- How deep it goes
- Defines the formula, implements it with pandas, contrasts compounding, and derives a volatility approximation without assuming normality.
- Examples
- Computes annualized means for AAPL, FE, and WMT and compares S&P 500 arithmetic and geometric averages.
- What you can do after
- Apply it via pandas to calculate periodic and annualized returns, then select arithmetic inputs for simulations.
Read how Build a Robo-Advisor with Python (From Scratch) explains mean →
Latency
Execution latency is the elapsed time required for a computation or instruction sequence to complete.
- How it is used
- Summarizes measured operation times while prompting a check of whether slow requests are hidden.
- How deep it goes
- Explains the mean’s limits through latency variability and percentiles; does not develop a statistical calculation procedure.
- Examples
- Uses a 50 ms HTTP response-time claim and 95th, 99th, and 99.9th percentiles to distinguish a summary from a distribution.
- What you can do after
- Diagnose/debug with it by checking percentile latency and measurement boundaries before relying on an average.
Grokking Statistics
A measure of central tendency calculated as the arithmetic average of numerical observations.
- How it is used
- Summarizes numerical data with a central value for descriptive statistics and later population inference.
- How deep it goes
- Defines and computes the mean, explains notation and floating-point rounding, then applies sample means in distributions and inference.
- Examples
- Uses collie weights, retail sales, coffee-ground preferences, tornado widths, body temperatures, and screen-time data.
- What you can do after
- Apply it via Python or NumPy to calculate and interpret averages for numerical samples or populations.
Statistics Slam Dunk
The mean is the arithmetic average of a set of numeric observations.
- How it is used
- Summarizes NBA performance, draft segments, and prediction errors with a single group-level average.
- How deep it goes
- Applies mean() through grouped summaries, charts, centering, z-scores, and model-error evaluation without deriving arithmetic mechanics.
- Examples
- Uses draft-pick career games, team points per game by season, scoring leaders, z-scores, and absolute prediction errors.
- What you can do after
- Apply it via base R and dplyr to compare groups, establish baselines, and summarize regression prediction error.
Statistics Every Programmer Needs
The mean, or expected value in a probability model, is the average level of a random variable or observed values.
- How it is used
- Summarizes observed values and weights uncertain outcomes to support simulation, quality monitoring, and decisions.
- How deep it goes
- Defines the arithmetic mean, works through probability-weighted payoffs, and implements a historical mean in Python; does not develop a formal probability proof.
- Examples
- Uses historical stock returns, an investment payoff table, employee absenteeism, and a quality-control center line.
- What you can do after
- Apply it via Python to calculate historical averages and expected payoffs, then interpret them alongside variability and decision priorities.
Advanced Algorithms and Data Structures
A mean is the arithmetic average obtained by summing numerical values and dividing by their count.
- How it is used
- Supplies centroids for similarity search trees and k-means, and supplies the reference value used to compute variance.
- How deep it goes
- Defines the arithmetic mean and shows coordinate-wise centroid updates, while deferring variance computation to library functions rather than giving its pseudocode.
- Examples
- Uses coordinate-wise node-centroid updates, k-means centroid updates, and outlier-shifted clusters.
- What you can do after
- Apply it to compute coordinate-wise centroids and variance, and diagnose centroid shifts caused by outliers.
Read how Advanced Algorithms and Data Structures explains mean →
D3.js in Action, Third Edition
The mean is the arithmetic average obtained by summing numeric observations and dividing by their count.
- How it is used
- Uses the mean to compare salary distributions across data visualization roles.
- How deep it goes
- Explains group extraction, d3.mean calculation, sorting, and visual placement while stopping short of deeper statistical interpretation.
- Examples
- Demonstrates average salaries for analysts, developers, designers, scientists, and leadership roles in violin plots.
- What you can do after
- Apply the mean via d3.mean to calculate group averages and place them in D3 distribution visualizations.
Effective Data Analysis
The mean is the arithmetic average of a set of numerical values.
- How it is used
- Uses the mean to summarize a typical numerical value and compare groups while assessing what an average hides.
- How deep it goes
- Explains interpretation, distribution assumptions, and outlier sensitivity through comparisons rather than formal derivations.
- Examples
- Uses New York City and Boston temperatures and an exercise on a simulated distribution to test which average to report.
- What you can do after
- Evaluate/understand it by checking distribution shape and spread before reporting a mean or choosing a median for stakeholders.
Machine Learning Platform Engineering
Latency is the elapsed time between a request or input and the corresponding response or output.
- How it is used
- Uses latency to assess deployed model responsiveness and detect slow API or LLM responses.
- How deep it goes
- Explains where to test and monitor latency, but gives no calculation method or latency target.
- Examples
- Uses an embedded-device deployment, a BentoML monitoring dashboard, and Langfuse traces for an LLM application.
- What you can do after
- Diagnose/debug with latency metrics by checking deployed response times and tracing slow LLM operations.
Read how Machine Learning Platform Engineering explains mean →
Starting Data Analytics with Generative AI and Python
The mean is the arithmetic average of a set of numerical values.
- How it is used
- Uses the mean as a compact descriptive statistic for summarizing numerical data and supporting operational decisions.
- How deep it goes
- Lists the mean within descriptive statistics and pairs it with distribution analysis, without developing a formal calculation procedure.
- Examples
- Uses review response times, summary statistics, histograms, and box plots to examine averages and unusual observations.
- What you can do after
- Evaluate numerical summaries while checking distributions and outliers before calling the mean typical.
Read how Starting Data Analytics with Generative AI and Python explains mean →
Machine Learning System Design
The arithmetic average of a set of numerical values.
- How it is used
- Serves as a candidate feature summarizing an SKU’s sales over the previous N days for retail forecasting.
- How deep it goes
- Lists the mean among candidate sales aggregates but does not specify a computation procedure or how to choose N.
- Examples
- Uses an SKU’s sales over the previous N days as the concrete setting for a mean feature.
- What you can do after
- Evaluate/understand it as a candidate forecasting feature, considering prediction quality alongside computation time, interpretability, and stability.
Grokking AI Algorithms, Second Edition
A mean is the arithmetic average of a set of numerical values.
- How it is used
- Uses means to replace some missing numerical values and center carat–price data for linear regression.
- How deep it goes
- Defines the arithmetic calculation and works through feature means and deviations before using them in a Python regression function.
- Examples
- Uses missing diamond features and a ten-diamond carat–price table with means of 1,229 and 3,431.
- What you can do after
- Apply it via arithmetic or Python to calculate feature averages, assess mean replacement, and center values for a regression line.
Read how Grokking AI Algorithms, Second Edition explains mean →
Rust Servers, Services, and Apps
Latency is the delay between an operation being initiated and its observable completion or response.
- How it is used
- Frames latency as a service requirement for web applications, especially those needing short response times or near-real-time interaction.
- How deep it goes
- Distinguishes network from service latency and names contributing factors without detailing measurement or optimization procedures.
- Examples
- Uses video streaming, online gaming, and round-trip network requests as latency-relevant examples.
- What you can do after
- Understand how network and service factors contribute to request-response latency and why Rust is associated with low latency.
Outlier Detection in Python
A mean is a measure of central tendency calculated as the arithmetic average of numerical observations.
- How it is used
- Combines scores from multiple outlier detectors into a final ranking or decision score.
- How deep it goes
- Defines arithmetic averaging and explains ensemble trade-offs, but does not develop a deeper statistical derivation.
- Examples
- Uses four detector scores across five rows, including contrasting mean, maximum, and median results.
- What you can do after
- Evaluate detector ensembles by comparing mean aggregation with maximum, median, and task-specific thresholds.
Modern C, Third Edition
A mean value is the arithmetic average of a collection of numeric values.
- How it is used
- Summarizes repeated code timings while assessing measurement results.
- How deep it goes
- Works through a twenty-timing sample and shows C reporting code, but does not develop a mean-calculation implementation.
- Examples
- Uses twenty timings with a 0.6-second mean and a C listing that prints mean time per loop body.
- What you can do after
- Evaluate/understand repeated timing results without mistaking their mean for evidence of consistency.
Bayesian Optimization in Action
An expected value is the probability-weighted average value of a random variable.
- How it is used
- Uses means to summarize Gaussian variables and guide Gaussian-process predictions and acquisition decisions.
- How deep it goes
- Defines expected values and mean vectors, then applies predictive means in Gaussian processes and UCB without deriving their update equations.
- Examples
- Illustrates means with housing-price Gaussians, materials mixing-temperature predictions, and UCB confidence bounds.
- What you can do after
- Evaluate/understand Gaussian predictions and adjust exploration versus exploitation through the UCB mean term and β.
Experimentation for Engineers
A mean is the arithmetic average of a collection of numerical values.
- How it is used
- Uses repeated business-metric measurements to make more reliable A/B testing and system-selection decisions.
- How deep it goes
- Defines the arithmetic average, demonstrates its variation-reduction behavior, and extends calculation to standard error.
- Examples
- Uses ASDAQ and BYSE execution costs, three-observation calculations, 300-observation comparisons, and NumPy implementations.
- What you can do after
- Apply the mean via NumPy to aggregate replicated measurements and compare business metrics across alternatives.
Classic Computer Science Problems in Swift: Essential techniques for practicing programmers
- How it is used
- Calculates array averages as a statistical primitive and recomputes cluster centroids from assigned points.
- How deep it goes
- Defines the mean as sum divided by count and implements it as an Array<Double> property, without teaching elementary statistics.
- Examples
- Uses a five-value dataset yielding 394 and averages assigned point coordinates to recalculate centroids.
- What you can do after
- Build a Swift Array<Double> mean property by dividing the sum by the element count.
The Art of AI Product Development
Latency is the elapsed time between an input or request and the corresponding model response or system result.
- How it is used
- Guides model selection, agent design, production testing, and user-experience decisions.
- How deep it goes
- Defines latency and applies it to model, workflow, and production integration trade-offs without detailing timing internals.
- Examples
- Uses draft editing, sub-two-second sandbox predictions, live data streams, load tests, and differently sized open-source models.
- What you can do after
- Diagnose latency with production-like load tests and evaluate speed against quality, cost, infrastructure, and user expectations.
Transformers in Action
A speedup is the ratio of the execution time of a baseline implementation to that of an optimized implementation.
- How it is used
- Measures latency improvements produced by inference and GPU optimization techniques.
- How deep it goes
- Explains latency benchmarking, KV-cache reuse, and GPU optimization, but stops short of deriving a statistical mean.
- Examples
- Uses Llama 3.2 3B timing comparisons and reports 2x to 4x gains from optimized GPU kernels.
- What you can do after
- Evaluate inference optimizations by comparing measured execution durations with and without caching or optimized kernels.
The Quick Python Book, Fourth Edition
- How it is used
- Uses the mean as a summary statistic alongside high, low, and median temperatures.
- How deep it goes
- Demonstrates the sum-and-count calculation in Python without developing statistical theory.
- Examples
- Calculates summary statistics for Heathrow monthly high temperatures from 1948 through 2016.
- What you can do after
- Apply it via Python's sum() and len() to average a numeric list.
Read how The Quick Python Book, Fourth Edition explains mean →
Investing for Programmers
The mean is the arithmetic average of a set of numerical observations.
- How it is used
- Uses the mean to summarize central stock prices or returns during technical analysis.
- How deep it goes
- Defines the mean as a dataset’s central average and applies it alongside standard deviation and variance.
- Examples
- Compares mean log returns for Apple, Coca-Cola, and NuScale using 2023 market data.
- What you can do after
- Evaluate average stock performance and compare it with measures of dispersion.
100 Go Mistakes and How to Avoid Them
Execution time is the elapsed duration required for a computation or operation to complete.
- How it is used
- Uses mean execution time to compare benchmarked operations and relate garbage-collection pressure to user latency.
- How deep it goes
- Reports per-operation averages and qualifies them with repeated-run variation, but does not derive the mean mathematically.
- Examples
- Uses Go benchmark timings and repeated atomic-store microbenchmarks to illustrate mean comparisons.
- What you can do after
- Evaluate benchmark comparisons by repeating runs, checking variation, and accounting for the tested machine and Go version.
Read how 100 Go Mistakes and How to Avoid Them explains mean →
Machine Learning Algorithms in Depth
A mean is a numerical location parameter representing the average or central value of a probability distribution.
- How it is used
- Uses the mean to represent expected values, estimate integrals from samples, and compare portfolio returns against risk.
- How deep it goes
- Derives the Bernoulli mean, applies empirical averaging, and computes standard error without developing a general estimator theory.
- Examples
- Uses coin flips, Monte Carlo estimation of π, random portfolios, and exercises involving Bernoulli and Beta distributions.
- What you can do after
- Apply it via NumPy to calculate empirical means, estimate expected values, and quantify Monte Carlo error.
Read how Machine Learning Algorithms in Depth explains mean →
Rust in Action: Systems programming concepts and techniques
Elapsed time is the duration between two temporal events or points.
- How it is used
- Uses averaging to combine timestamp measurements and server responses when estimating clock differences.
- How deep it goes
- Explains arithmetic and weighted means through NTP equations, but stops short of general statistical theory.
- Examples
- Uses paired timestamp differences and multiple NTP server responses as concrete averaging examples.
- What you can do after
- Apply it via NTP calculations to combine timestamp estimates and reduce the influence of slow responses.
Read how Rust in Action: Systems programming concepts and techniques explains mean →
Prompt Engineering in Practice
The sum of a set of numerical values divided by the number of values.
- How it is used
- Stabilizes numerical prompt outputs by averaging independent generations when variation could change an engineering decision.
- How deep it goes
- Defines when to use the mean and demonstrates its calculation; treats spread as a secondary signal and calculates the average manually.
- Examples
- Scores an incident runbook with four independent ratings of 7, 8, 7, and 6, yielding a mean of 7.0.
- What you can do after
- Apply it by averaging independent numerical generations and retaining their spread as a signal for reviewer attention.
Related concepts
- varianceused by · Variance is the expected squared deviation of a random variable from its mean, measuring the spread of its distribution.
- uptimepart of · Uptime is the duration or proportion of a specified period during which a system or service is operational and available to provide its intended function.
- coefficient of variationused by · The coefficient of variation is a normalized measure of relative variability equal to a quantity’s standard deviation divided by its mean.
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.



























