liveBook · Manning

Binary random variable

As explained in Grokking Bayes

A binary random variable is a random variable that can take two possible values.

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

How Grokking Bayes covers it

How deep it goes
Defines two-valued outcomes and connects them to Bernoulli probabilities, while stopping short of broader model implementation.
Examples
Uses weather outcomes—rain or no rain—and contrasts them with rainfall amounts represented as categorical or continuous values.
What it assumes
Assumes only an understanding of uncertain events and introduces random variables and probability distributions through weather examples.
What you can do after
Evaluate whether an uncertain yes-or-no event can be represented with a Bernoulli probability model.
How it connects
Connects random variables, probability distributions, Bernoulli distributions, categorical variables, and continuous variables.

Also explained in

Compare how 5 books explain binary random variable →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Grokking Bayes. The section links point to the parts of the book it draws on.