A binary random variable represents an uncertain outcome with exactly two possible values. A weather forecast can use 0 for no rain and 1 for rain. section 1.2
Binary variables simplify reality by asking a focused question, such as whether it will rain, instead of measuring how much rain will fall. This makes models practical while retaining useful information about uncertainty. section 1.3
A binary random variable has three central features:
- Takes only two values, commonly labeled 0 and 1. section 1.2
- Represents the outcome of a probabilistic experiment whose result is currently unknown. section 1.2
- Can express belief with a Bernoulli distribution, using p for the probability of 1 and 1 − p for the probability of 0. section 1.5
Rain today
Let the variable indicate whether rain occurs today. If p = 0.3, the model assigns probability 0.3 to rain, represented by 1, and probability 0.7 to no rain, represented by 0. The two probabilities sum to 1 because these outcomes cover every possibility. section 1.5




