AI Glossary / Statistics and probability / Beginner
Dichotomous variables
Definition
Dichotomous variables are variables with two possible categories or values. Examples include whether an order was returned and whether a device passed a specified test. They are also called binary variables. Coding the two states as zero and one makes them convenient for analysis, but the meaning of each code must be documented. Having two possible states does not imply that they are equally likely or that observations are independent.
What it means
A dichotomous variable records one particular distinction. Returned versus not returned describes an order under a defined observation period; it does not describe the reason, value or timing of a return. Some binary variables represent naturally two-state events, while others are created by applying a cutoff to richer measurements. Both can be useful, but creating a binary version of a continuous measurement usually discards information. The analyst should preserve the original values when possible and explain why the distinction supports the intended question.
How it works
Define mutually exclusive categories that cover the intended observed outcomes, along with a separate rule for missing or unknown information. Select which state is coded one and verify that software uses the intended reference category. Frequencies describe the two categories; the mean of a zero-one variable equals the proportion coded one. A single random zero-one outcome with event probability p has a Bernoulli distribution. Its variance is p(1-p). Summing independent Bernoulli outcomes with a common probability gives a binomial count. Repeated observations from the same customer or varying event probabilities require additional modeling considerations rather than automatic use of the simplest binomial assumptions.
Three practical examples
- Customer analytics: record whether each eligible subscription renewed within a defined period and summarize the renewal proportion.
- AI evaluation: label each assessed response as meeting or not meeting a specific rubric, retaining reviewer disagreements and detailed error notes.
- Operations: use a machine's alarm status as a predictor while preserving underlying sensor measurements for deeper investigation.
Think of it this way
Think of a switch with two labeled positions. The label tells you which state is recorded, but does not explain why the switch moved or how often it will move next. A panel of switches also does not guarantee independence: several may respond to the same power supply or operating condition.
Worked example
Suppose 40 hypothetical eligible orders have complete return information for the same observation window. Fifteen were returned and 25 were not. Code returned as one and not returned as zero. The sum is 15 and the mean is 15/40 = 0.375, so the observed return proportion is 37.5%. Under independent observations with a common event probability, a plug-in standard error for the proportion is sqrt[0.375 x 0.625/40], approximately 0.0765, or 7.65 percentage points. This is uncertainty in an estimated proportion, not the standard deviation of individual zero-one outcomes. Reversing the coding gives a mean of 0.625 for nonreturns. If five additional orders lack complete follow-up, coding them zero would silently change the meaning of the denominator and potentially bias the reported rate.
Illustrative case study
Fictional case: Rowan Subscription Services builds an AI model to predict renewal. The data team initially labels every account without a recorded renewal as zero. Review reveals that some accounts have not yet reached their renewal date. The team defines eligibility and follow-up rules, separates unknown outcomes, and checks the event coding before fitting a model. It retains payment amount and timing alongside the binary label. This invented case illustrates label construction and denominator control; it does not report a measured improvement or establish that a particular prediction algorithm is suitable.
Common misconceptions and mistakes
Do not assume that numeric codes turn category labels into measurements with substantive arithmetic distances. Zero-one coding has useful mathematical properties, but the category meaning still comes from the definition. Missing does not automatically mean no, and not observed does not always mean absent. A binary variable is not the same as a binomial count, which can take more than two values. Dichotomizing a continuous predictor can hide variation and create an artificial boundary. A binary outcome also does not justify reporting only classification accuracy when the event is rare or errors have unequal consequences.
Business use
Businesses use dichotomous variables in dashboards, experiments, risk models and operational decisions. Reliable definitions make rates comparable across teams and time. Documentation should identify the event, population, observation window, missing-data handling and any threshold used to create the label. For predictive systems, report the event prevalence and evaluate probabilities as well as chosen classification decisions. Logistic regression is one common modeling approach, but clustered data, sampling design and deployment conditions can require more specialized methods and validation.
People also ask
Must the values literally be zero and one?
No. They can be labels such as yes and no; zero-one coding is a common analytical representation.
Does binary mean a fifty-fifty probability?
No. There are two possibilities, but their probabilities may be very unequal.
Is a probability prediction binary?
The outcome can be binary while its predicted probability varies continuously between zero and one.
Check your understanding
Why is 0.375 both the mean of the coded data and the return proportion?
Answer: Each returned order contributes one and every other observed order contributes zero, so the sum counts returns. Dividing by the 40 eligible observed orders gives the proportion. This interpretation depends on the chosen coding and denominator.
Related terms
- Binary variable
- Binomial distribution
- Categorical variable
- Logistic regression
- Missing data
- Calibration
- Bernoulli distribution
- indicator variable
- event rate
- dichotomization
- class imbalance
Learn next
calculate proportions from zero-one indicators and distinguish individual outcomes from counts. Explore uncertainty intervals for proportions and the assumptions behind them. Compare modeling a continuous predictor directly with imposing a cutoff, and practice documenting the event definition and observation window before choosing a modeling algorithm.
More in Statistics and probability
- Deviance (statistics) - Deviance is a likelihood-based measure of how much a fitted statistical model falls short of a saturated model that can fit the observed responses exactly.
- Deviation scores - Deviation scores express observations as signed distances from their mean. For an observation x and arithmetic mean x-bar, its deviation score is x - x-bar.
- Dichotomous thinking - Dichotomous thinking reduces a question to two opposing categories while overlooking meaningful degrees, uncertainty or alternative interpretations.
- Difference scores - Difference scores are values obtained by subtracting one measurement from a corresponding second measurement.
- Differential entropy - Differential entropy is an information-theoretic quantity defined for a continuous probability distribution with a density.
- Digidot chart - A digidot chart combines a stem-and-leaf display with a time-order plot of the same numerical observations.
Sources
David Howell, University of Vermont, statistics glossary: https://www.uvm.edu/~statdhtx/fundamentals9/Glossary/Glossary.html Penn State, Introduction to Discrete Data: https://online.stat.psu.edu/stat504/Lesson01 R documentation, Fitting Generalized Linear Models: https://stat.ethz.ch/R-manual/R-devel/RHOME/library/stats/html/glm.html Altman and Royston, The cost of dichotomising continuous variables: https://www.bmj.com/content/332/7549/1080.1
Previous: Dichotomous thinking Next: Dichromatic model