Discrete variable
A discrete variable is a variable whose possible values belong to a finite or countable set of distinct alternatives rather than a continuous range.
D3.js in Action, Third Edition
A discrete value belongs to a predetermined finite or otherwise distinct set of possible values.
- How it is used
- Guides data classification, visual encoding, and D3 scale selection for charts.
- How deep it goes
- Defines countable whole numbers, contrasts them with continuous measurements, and extends the idea to discrete scale inputs and outputs.
- Examples
- Uses employee counts, coffee sizes, TV genres, and gender categories as discrete values in charts and scales.
- What you can do after
- Apply it via D3 scales to choose discrete domains, categorical outputs, or continuous positions for chart variables.
Read how D3.js in Action, Third Edition explains discrete variable →
Everyday Data Visualization
A data dimension whose values are separate, distinct, and individually identifiable rather than varying continuously across a range.
- How it is used
- Guides visualization choices by distinguishing separate values from values that vary along a continuum.
- How deep it goes
- Explains definitions, scale-dependent dates, perceptual rationale, and chart choices without formal mathematical treatment.
- Examples
- Uses fruit identifiers, taste scores, seasonal dates, and a line-versus-bar chart comparison.
- What you can do after
- Apply chart-selection guidance by recognizing discrete values and choosing bar charts when separated categories need comparison.
Read how Everyday Data Visualization explains discrete variable →
Causal AI
A discrete outcome is one of a finite or countable set of distinct values that a discrete random variable can take.
- How it is used
- Frames finite-outcome uncertainty for probability models and causal reasoning without depending on discrete or continuous parameterization.
- How deep it goes
- Defines outcomes, notation, probability masses, and distribution classes, but stops short of deeper distribution theory.
- Examples
- Uses three-sided dice, coin flips, categorical food choices, and indexed categories as concrete discrete outcomes.
- What you can do after
- Apply discrete variables by specifying outcomes, assigning probability masses, and selecting categorical or Bernoulli distributions.
Data Without Labels
Discrete data consists of distinct countable values, typically represented as integers.
- How it is used
- Classifies count-based measurements before analysis and model building.
- How deep it goes
- Defines integer-valued counts and contrasts them with continuous, nominal, and ordinal data without developing modeling procedures.
- Examples
- Uses passengers, city populations, customers, demand quantity, and transaction item counts as integer-valued examples.
- What you can do after
- Evaluate whether a measured field represents an integer-valued count or a continuous quantity.
Statistics Every Programmer Needs
Discrete data are observations whose possible values are separate, countable outcomes rather than values throughout a continuous interval.
- How it is used
- Models countable uncertainty in Monte Carlo scenarios such as employee absenteeism and staffing.
- How deep it goes
- Defines countable outcomes and applies them in simulation, but stops short of formal probability derivations.
- Examples
- Uses employee absenteeism and call-center staffing as concrete examples of countable outcomes.
- What you can do after
- Apply it via Monte Carlo simulations to model absenteeism and compare staffing scenarios under uncertainty.
Read how Statistics Every Programmer Needs explains discrete variable →
Related concepts
- continuous datacontrasts with · Continuous data consists of numerical measurements that can take arbitrarily fine-grained values across a range or interval.
- categorical dataequivalent to · Categorical data consists of values representing membership in a discrete set of named or ordered categories rather than measured numerical magnitudes.
- quantitative datakind of · Quantitative data is information represented numerically as quantities, measurements, counts, or other values suitable for numerical interpretation or analysis.
- bar chartused by · A bar chart is a visualization that compares quantitative values for discrete categories using rectangular bars whose lengths or heights encode magnitude.
- integerincludes · An integer is a whole number with no fractional part, including negative numbers, zero, and positive numbers.
- random variablekind of · A random variable is a function that assigns numerical values to outcomes of a random process and is characterized by a probability distribution.
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.




