liveBook · Manning

Sample size

Sample size is the number of observations, units, or items included in a sample or group being analyzed.

How 5 Manning books explain it

Grokking Statistics

Sample size is the number of observations included in a sample.

How it is used
Uses sample size to judge how much evidence supports estimates of population means and confidence intervals.
How deep it goes
Explains notation, representativeness, sampling-distribution spread, confidence-interval precision, and small-sample t-distribution choices without deriving formulas.
Examples
Uses dorm sleep tracking, adult body temperatures, confidence intervals for sleep hours, and constrained counts of satellites or bridges.
What you can do after
Evaluate/understand how sample size affects uncertainty, interval width, and whether normal or t-based methods fit a mean estimate.

Read how Grokking Statistics explains sample size →

Effective Data Analysis

Sample size is the number of observations or participants included in a statistical sample.

How it is used
Uses sample size to plan inferential tests, assess detectable effects, and protect anonymity in analytical reporting.
How deep it goes
Explains power-based planning, alpha adjustments, test assumptions, large-sample limits, and a five-person privacy threshold.
Examples
Uses t-test power calculations, simulated normal samples, Kruskal-Wallis exercises, and an employee survey with an n=1 subgroup.
What you can do after
Apply sample-size planning with statsmodels and evaluate how sample size affects test results and privacy-safe reporting.

Read how Effective Data Analysis explains sample size →

Evaluating AI Systems

Sample size is the number of observations or examples included in a study or evaluation.

How it is used
Guides evaluation dataset sizing by balancing reliable conclusions against data collection costs.
How deep it goes
Explains sizing factors and metric convergence without prescribing a universal sample size formula.
Examples
Contrasts smoke tests with benchmark comparisons and rare-failure or subgroup evaluations.
What you can do after
Evaluate whether an evaluation dataset is large enough for its goals, task variability, and risk tolerance.

Read how Evaluating AI Systems explains sample size →

AI Model Evaluation

Sample size is the number of observations or participants included in a statistical experiment.

How it is used
Sets the number of users exposed to an online controlled experiment.
How deep it goes
Defines sample size operationally and connects it to traffic, duration, power, and false-positive risk without giving a calculation method.
Examples
Uses recommendation variants emphasizing recency, user affinity, or diversity to illustrate why additional treatments require more exposure.
What you can do after
Operate/configure A/B tests by allocating exposure, limiting variants, and planning enough traffic or duration for trustworthy comparisons.

Read how AI Model Evaluation explains sample size →

Statistics Every Programmer Needs

Sample size is the number of observations or trials included in a statistical sample or simulation.

How it is used
Determines the amount of evidence used to estimate variation, monitor process stability, or simulate outcome frequencies.
How deep it goes
Explains effects on precision, control limits, statistical power, and proportion variability, but does not derive sample-size selection rules.
Examples
Uses 500 simulated trials, scalable trial counts, control-chart samples, and p-chart proportions as concrete examples.
What you can do after
Apply it to choose trial counts, interpret control-chart sensitivity, and assess how sampling affects variability estimates.

Read how Statistics Every Programmer Needs explains sample size →

Also covered in

What to know first

Related concepts

Questions about sample size

What is sample size?

Sample size is the number of observations, units, or items included in a sample or group being analyzed.

Which Manning books explain sample size?

Grokking Statistics, Effective Data Analysis, Evaluating AI Systems, AI Model Evaluation and Statistics Every Programmer Needs.

What should I know before learning sample size?

Manning books that teach sample size usually introduce mean, normal distribution, probability distribution and Python first.

What is the difference between sample size and accuracy?

Sample size is the number of observations, units, or items included in a sample or group being analyzed. Accuracy is the degree to which a result agrees with a specified truth, reference, or criterion, commonly measured as the proportion of evaluated predictions that are correct.

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.