Why the Bernoulli PMF and CDF Matter
A Bernoulli random variable describes one trial with two possible outcomes. Examples include whether a hypothetical item passes a test, whether a randomly selected record meets a criterion, or whether a single event occurs. Once the outcome has been encoded as 0 or 1, the probability mass function (PMF) gives the probability at each possible value, while the cumulative distribution function (CDF) gives the probability of being at or below a chosen value.
The distinction between these functions is important. A PMF answers a point question such as “What is the probability of success?” A CDF answers a threshold question such as “What is the probability that the encoded outcome is at most 0?” Because a Bernoulli variable has only two possible values, the CDF is a step function with jumps at 0 and 1.
This model concerns one binary outcome. It does not require multiple trials, and it does not by itself specify a distribution for a count across trials. Those are separate modeling questions. The meaning of “success” is chosen for the application; it need not mean a favorable or desirable outcome.
The Probability Mass Function
For a discrete random variable, the PMF gives the probability of each possible value. For a Bernoulli variable, the two masses are \(1-p\) at zero and \(p\) at one. Values outside the possible outcomes have probability zero.
An equivalent compact expression, valid when \(x\) is restricted to 0 or 1, is \(P(X=x)=p^x(1-p)^{1-x}\). The piecewise form is often safer when evaluating a probability because it makes the support explicit. At \(x=0\), the expression gives \(p^0(1-p)^1=1-p\); at \(x=1\), it gives \(p^1(1-p)^0=p\).
The support is the set of values with positive probability. When \(0<p<1\), the support is \(\{0,1\}\). If \(p=0\), only 0 has positive probability; if \(p=1\), only 1 has positive probability. The possible value set remains \(\{0,1\}\), but the support is smaller at these boundary parameter values.
Worked Example: A Single Hypothetical Quality Check
A hypothetical quality check records \(X=1\) if one selected component fails a specified test and \(X=0\) if it passes. The model is \(X\sim\operatorname{Bernoulli}(0.12)\). Find the probability of a pass, the point probabilities, \(F_X(0)\), and \(P(X<1)\). Then verify that the two possible outcome probabilities sum to 1.
Method. Use the Bernoulli PMF with \(p=0.12\), and use \(F_X(x)=P(X\leq x)\) for cumulative probabilities. Here failure is designated as success in the Bernoulli coding, even though it is not a favorable result.
Pass probability. A pass is \(X=0\), so \(P(X=0)=1-p=1-0.12=0.88\).
Point probabilities. The probability of failure is \(P(X=1)=p=0.12\), and the probability of passing is \(P(X=0)=0.88\).
Cumulative probability at zero. Since \(X\leq0\) includes the value 0 but not 1, \(F_X(0)=P(X\leq0)=P(X=0)=0.88\).
Strict inequality. The event \(X<1\) also includes only \(X=0\), so \(P(X<1)=0.88\).
Check. The probabilities of the two possible outcomes sum to \(0.88+0.12=1.00\), as required.
The Cumulative Distribution Function
The cumulative distribution function is defined for every real number \(x\), not only for values in the support. For a Bernoulli variable, compare \(x\) with 0 and 1. Below 0, neither possible value is at or below \(x\). From 0 up to, but not including, 1, only the value 0 is included. At or above 1, both possible values are included.
The value at each boundary follows from the “less than or equal to” in the definition. At \(x=0\), \(X=0\) is included, so \(F_X(0)=1-p\). At \(x=1\), both 0 and 1 are included, so \(F_X(1)=1\). The CDF is right-continuous: its value at a jump is the value after including the point at which the jump occurs.
For Bernoulli probabilities, the CDF’s flat sections and jumps make inequality events especially manageable. An interval can contain neither support value, just 0, just 1, or both. Identify which of 0 and 1 satisfy the inequality before calculating.
Worked Example: Recovering a Success Probability From a CDF Value
A hypothetical screening process has a binary indicator \(X\), where \(X=1\) means the selected record meets a specified screening criterion. Assume \(X\sim\operatorname{Bernoulli}(p)\), with unknown \(p\), and suppose \(F_X(0.4)=0.64\). Find \(p\), then calculate \(P(X>0.4)\), \(P(X<1)\), and \(P(0<X\leq1)\).
Method. Since \(0\leq0.4<1\), the Bernoulli CDF gives \(F_X(0.4)=1-p\). The supplied CDF value determines the parameter.
Find \(p\). Set \(1-p=0.64\). Therefore \(p=1-0.64=0.36\). Thus the fitted model is \(X\sim\operatorname{Bernoulli}(0.36)\).
Calculate \(P(X>0.4)\). Among the possible values 0 and 1, only 1 is greater than 0.4. Hence \(P(X>0.4)=P(X=1)=0.36\). Equivalently, \(1-F_X(0.4)=1-0.64=0.36\).
Calculate \(P(X<1)\). Only 0 is strictly less than 1. Thus \(P(X<1)=P(X=0)=1-p=0.64\).
Calculate \(P(0<X\leq1)\). The only possible value in this interval is 1, so \(P(0<X\leq1)=P(X=1)=0.36\). The CDF identity gives the same result: \(F_X(1)-F_X(0)=1-0.64=0.36\).
Check. The recovered masses are \(P(X=0)=0.64\) and \(P(X=1)=0.36\), which sum to 1.00.
Translating Inequalities Into Outcomes
For a Bernoulli variable, the most reliable way to evaluate an inequality is to test 0 and 1 directly. This prevents errors involving strict and non-strict inequalities at the jump locations. For example, \(X<1\) includes 0 but excludes 1, whereas \(X\leq1\) includes both possible values. Similarly, \(X>0\) includes 1 but excludes 0, while \(X\geq0\) includes both.
| Event | Included Bernoulli values | Probability |
|---|---|---|
| \(X<0\) | Neither 0 nor 1 | 0 |
| \(X\leq0\) | 0 | \(1-p\) |
| \(0<X<1\) | Neither 0 nor 1 | 0 |
| \(X<1\) | 0 | \(1-p\) |
| \(X\geq1\) | 1 | \(p\) |
| \(X\leq1\) | 0 and 1 | 1 |
The row for \(0<X<1\) is a useful reminder that an interval can have positive length and still have probability zero: there are no Bernoulli outcomes strictly between 0 and 1. More generally, probability is assigned to the support values, not spread continuously over the interval between them.
Worked Example: Evaluating Several Threshold Events
A hypothetical alert system assigns \(X=1\) if a single observation triggers an alert and \(X=0\) otherwise. Assume \(X\sim\operatorname{Bernoulli}(0.70)\). Calculate \(P(-0.2\leq X<1)\), \(P(0<X\leq1)\), and \(F_X(0.8)\). Use the CDF to verify one of the event probabilities.
Method. The parameter is \(p=0.70\), so \(P(X=1)=0.70\) and \(P(X=0)=1-0.70=0.30\). Check which possible outcomes satisfy each event.
First event. For \(-0.2\leq X<1\), the value 0 is included because \(-0.2\leq0<1\). The value 1 is excluded because the upper bound is strict. Therefore \(P(-0.2\leq X<1)=P(X=0)=0.30\).
Second event. For \(0<X\leq1\), the value 0 is excluded and the value 1 is included. Therefore \(P(0<X\leq1)=P(X=1)=0.70\).
CDF value. Since \(0\leq0.8<1\), \(F_X(0.8)=1-p=0.30\).
Verification. The first event is exactly \(X<1\) for this support, and \(P(X<1)=F_X(1)-P(X=1)=1-0.70=0.30\). Equivalently, direct inspection shows it contains only \(X=0\), whose probability is 0.30. The outcomes in the first and second events partition \(\{0,1\}\), and their probabilities sum to \(0.30+0.70=1.00\).
Deriving the CDF From the PMF
The CDF formula is not a separate probability model: it follows by adding the PMF masses for the support values at or below the selected threshold. This is the discrete cumulative-probability rule applied to the two possible Bernoulli outcomes.
\(F_X(x)=P(X\leq x)\). Only the values 0 and 1 can contribute to this probability.
Neither support value satisfies \(X\leq x\), so \(F_X(x)=0\).
The value 0 satisfies \(X\leq x\), but 1 does not. Therefore \(F_X(x)=P(X=0)=1-p\).
Both support values satisfy \(X\leq x\). Thus \(F_X(x)=P(X=0)+P(X=1)=(1-p)+p=1\).
Common Mistake: Confusing \(F_X(0)\) With \(p\)
A frequent error is to treat \(F_X(0)\) as the probability of success. Under the usual Bernoulli coding, success is \(X=1\), but the CDF at zero is \(P(X\leq0)\), which includes only \(X=0\). Therefore \(F_X(0)=1-p\), not \(p\).
Wrong calculation: If \(p=0.27\), writing \(F_X(0)=P(X=1)=0.27\) confuses a point probability with the cumulative probability at zero.
Correction: The CDF definition gives \(F_X(0)=P(X\leq0)=P(X=0)=1-0.27=0.73\). The success probability is instead the PMF value \(P(X=1)=0.27\). A quick check is that \(F_X(0)+P(X=1)=0.73+0.27=1\).
Another trap is to use the interval length as though probability were distributed continuously. For a Bernoulli variable, \(P(0<X<1)=0\), regardless of \(p\), because neither 0 nor 1 lies strictly between the bounds.
Check Your Understanding
For each problem, use the Bernoulli PMF or CDF and pay attention to the endpoints of the stated event.
- A hypothetical sensor records \(X=1\) when a specified condition is detected, with \(X\sim\operatorname{Bernoulli}(0.18)\). Find \(P(X=0)\), \(P(X=1)\), and \(F_X(0.5)\). (Answer: \(0.82,\ 0.18,\ 0.82\))
- Let \(X\sim\operatorname{Bernoulli}(0.42)\). Find \(F_X(-0.1)\), \(F_X(0)\), \(F_X(0.99)\), and \(F_X(1)\). (Answer: \(0,\ 0.58,\ 0.58,\ 1\))
- For a Bernoulli variable \(X\), suppose \(F_X(0.3)=0.71\). Find \(p\), \(P(X>0.3)\), and \(P(X<1)\). (Answer: \(p=0.29,\ 0.29,\ 0.71\))
- A hypothetical one-record indicator satisfies \(X\sim\operatorname{Bernoulli}(0.25)\). Find \(P(-0.4<X\leq0.6)\), identifying which support value is included. (Answer: \(0.75\), from \(X=0\) only)
- Let \(X\sim\operatorname{Bernoulli}(0.63)\). Find \(P(0\leq X<1)\), \(P(X=1)\), and \(F_X(0.9)\). (Answer: \(0.37,\ 0.63,\ 0.37\))