Discrete Data
Some data come in neat, countable steps: 0, 1, 2, 3… You can list the possible values without needing “in-between” numbers, and that simple fact changes how you summarize, model, and predict with it.
What discrete data is
Discrete data is data that takes values from a set of distinct, separate points—typically integers that arise from counting. There are gaps between allowed values: if you’re counting the number of customer complaints, 2.5 complaints doesn’t make sense. Discrete data can be:
- Finite (e.g., number of bedrooms: 0–10 in a dataset)
- Countably infinite (e.g., number of website visits could, in principle, keep increasing)
Everyday examples
Common discrete variables include:
- Number of items sold in a day
- Number of missed payments on a loan
- Defects found in a manufactured batch
- Goals scored in a match
- Star ratings (1–5) are discrete too, though they’re also ordinal (ordered categories)
Why it matters in AI/ML
Discrete data affects both preprocessing and model choice:
- Loss functions & likelihoods: count targets often fit Poisson or negative binomial models; binary outcomes use Bernoulli (logistic regression).
- Evaluation: predicting counts may use MAE/RMSE, but also deviance or calibration depending on the distribution.
- Encoding: discrete inputs like categories may need one-hot encoding or embeddings; treating them as continuous can mislead models.
Discrete Data are values that take distinct, countable levels rather than any value on a continuum. They often arise from counting (e.g., number of clicks, defects, or purchases) or from finite categories encoded as integers. Discrete data matter in AI/ML because they influence feature encoding and model choice, such as using Poisson or categorical likelihoods instead of Gaussian assumptions. Example: modeling daily support-ticket counts with a Poisson regression.
Think of counting things in whole pieces: 0, 1, 2, 3 apples in a basket. You can’t have 2.6 apples in this count, because apples are counted as separate items. That’s the idea behind discrete data: values come in distinct steps, usually whole numbers, with gaps between possible values.
In statistics and machine learning, discrete data often shows up as counts (number of clicks, purchases, or messages) or categories that can be listed (like star ratings: 1–5). Models treat this kind of data differently from measurements like height or temperature, which can vary smoothly.