Many probability problems ask whether a specific event occurs or does not occur. Indicator random variables encode this yes–no information numerically.
By representing events as random variables that take values 0 or 1, indicators allow probability questions to be handled using expectation and algebraic operations. This makes them a structural tool for counting and for applying linearity of expectation.
Key Terms
Random Variable— an indicator is a binary-valued random variable
A coin is tossed three times. How can "heads on toss 1" be added to "heads on toss 2"?
Events are sets of outcomes, and sets cannot be added. Yet counting the heads in three tosses is exactly a matter of adding up three such events.
Writing 1 when a toss is a head and 0 when it is not, the number of heads is simply the sum.
outcome
I₁ (head on toss 1)
I₂ (head on toss 2)
I₃ (head on toss 3)
I₁ + I₂ + I₃
HHH
1
1
1
3
HTH
1
0
1
2
TTH
0
0
1
1
TTT
0
0
0
0
Each column is a yes-or-no question answered with a number; adding the columns counts the yes answers.
Replace each event by a number: 1 when the event happens, 0 when it does not.
In probability theory, events are sets of outcomes. Sets cannot be added, averaged, or combined algebraically.
Random variables assign numerical values to outcomes. An indicator random variable assigns the value 1 to outcomes in a given event and 0 to all other outcomes.
This construction converts an event into a numerical object defined on the same sample space.
The definition
The indicator random variableIA of an event A takes the value 1 on every outcome in A and 0 on every outcome outside A.
So the number of heads in three tosses is the random variable I1+I2+I3.
An indicator is a random variable, not a probability — but its average is a probability.
E[IA]=1⋅P(A)+0⋅(1−P(A))=P(A). So for a fair coin the expected number of heads is 21+21+21=23.
Majority heads: the four sequences where the indicator equals 1
The highlighted sequences are the event, and the indicator variable is the function that assigns 1 to each of them and 0 to the other four: it turns a set of outcomes into a number that can be added and averaged. Its expected value is the count of highlighted cells over 8. Select other events and read their indicators on the coin toss sample space explorer.
The formal definition follows.
An indicator turns an event into a number, so events can be added, multiplied and averaged.
An indicator only ever takes the values 0 and 1 — never 1/2, even when its average is 1/2.
On any single toss, I1 is 0 or 1; the value 21 is its expected value, not one of its values. Treating IA as if it were P(A) mixes up a random variable with a number.
The rest of the page covers the formal definition, notation, the expected value and variance of an indicator, and counting with sums of indicators.
Definition of an Indicator Random Variable
Let A be an event in a probability experiment. The indicator random variable of A, denoted by IA, is defined by
The indicator IA is a random variable defined on the same sample space as the experiment. It represents membership in the event A numerically.
An indicator is not a probability value; it is a random variable whose value depends on the outcome.
Indicator Notation
Notation
Indicator Notation
The indicator is itself a piece of notation — a function built to turn membership into arithmetic. The marks to fix are its competing spellings, the brace form that accepts a whole condition instead of an event, and the sum that turns indicators into counts. All of them are catalogued among the probability symbols.
One function, several dresses: the roman capital IA the Definition above uses, and the bold or blackboard one — typeset 𝟙 in modern texts — a digit promoted to a letter, advertising the only two values the function ever takes. The subscript holds the event; some texts move it into parentheses as I(A).
Also writtenχA in analysis and measure theory, where the same object is called the "characteristic function" of the set — the older tradition probability walked away from.
Do not confuseThe other "characteristic function". In probability that name is already taken by E[eitX], the transform of a distribution — so a probability text saying "characteristic function" almost never means χA; same name, two objects across the fence, which is exactly why this side writes "indicator" and leaves χ alone.
1{X≤x}
one if the condition holds, zero otherwise
The brace form takes a statement where the subscript form takes an event: the braces convert a condition into the event of its truth — the same move as random variable notation's {X≤x} — and the indicator then converts that event into a number.
CasesThe CDF in one line: F(x)=E[1{X≤x}] — accumulation as the average of a condition; in code the same idiom survives as booleans-cast-to-integers, the indicator wearing syntax.
Do not confuseThe subscript form fed a set. 1A(ω) asks whether a point belongs; 1{X≤x} holds a claim — both return 0 or 1, but one's argument is an outcome and the other's content is a sentence, and swapping them writes sets where statements belong.
N=∑i=1nIAi
the count: one indicator per event, summed
The mark behind Counting with Indicator Random Variables below: each event contributes its 0-or-1, so N is exactly "how many of the Ai occurred" — a random count, not a probability.
CasesTaking E termwise turns the count into probabilities, E[N]=∑iP(Ai) — the engine of Expectation and Linearity below; and a lone indicator is the simplest named variable there is, IA∼Bern(P(A)) in the family-declaration notation.
Do not confuseA probability. N ranges over 0,1,…,n; only its expectation lands back among probabilities — keeping the random count and its average apart is the entire trick the page turns on.
The marks from the notation cards across the random-variable pages: how each is read and what it means. Every group links to the full card on its page.
• They take only two values: 0 or 1 • They are completely determined by the event they represent • They are defined on the same sample space as the underlying experiment
Simple relationships follow directly from the definition:
• The indicator of the complement event equals 1−IA • Indicators reflect set operations at the level of outcomes
Writing IA∪B=IA+IB for one die roll, with A = even and B = at least 4, gives the value 2 at ω=4 and P(A∪B)=21+21=1. The overlap comes off once: IA∪B=IA+IB−IAIB, so P(A∪B)=1−31=32.
A union is built from the two formulas above. An outcome lies outside A∪B exactly when it lies outside both events, so I(A∪B)c=(1−IA)(1−IB). Taking the complement once more writes the indicator of the union in terms of IA, IB and their product.
Because an indicator takes only the values 0 and 1, its variance is fixed by the probability of the event:
This holds because IA takes the value 1 exactly on outcomes in A and 0 otherwise. Expectation therefore counts how often the event occurs in probability terms.
This identity connects events directly to expectation without introducing a full probability distribution.
Linearity of Expectation and Indicators
RULELinearity of expectation
Expectation is linear.
For indicator random variables, this means:
• The expectation of a sum equals the sum of expectations • No independence assumptions are required
Fact: One match on average, any deck size
Shuffle n cards numbered 1 to n: card i lands in position i with probability n1, so the expected number of matches is n⋅n1=1. The answer is the same for 3 cards and for a million.
As a result, counting problems can be solved by expressing the quantity of interest as a sum of indicator variables and taking expectations term by term.
This technique avoids direct probability calculations and remains valid even when the indicators are dependent.
Matching problems are the classic test. When a deck is shuffled, the events "card i lands in position i" are dependent: if every card but one is in place, the last one is forced into place as well. The full distribution of the number of matches takes inclusion–exclusion to compute, but its expectation needs only one probability per card.
Counting with Indicator Random Variables
Many counting problems can be expressed as sums of indicator random variables.
Each object or outcome is associated with an indicator that takes the value 1 if a specified condition is met and 0 otherwise. The total count is obtained by summing these indicators.
Pitfall: Subtracting the overlap from a count
Removing the overlap as for a union gives, for the number of sixes on two dice, 61+61−361=3611, the probability of at least one six. A double six adds 2 to the count, so the expected number is 61+61=31.
This approach converts counting questions into expectation calculations and allows results to be obtained without enumerating all outcomes or computing complex probabilities.
Counting sixes with two indicators
Roll two dice and let X be the number of sixes. Write X = I + J, where I is 1 on the blue row (first die 6) and J is 1 on the amber column (second die 6). Each indicator is 1 on 6 of the 36 outcomes, so E[I] = E[J] = 6/36. The cell (6,6) lies in both and has X = 2, which the sum handles automatically: E[X] = 6/36 + 6/36 = 1/3, with no need to list the distribution of X.
With n dice the same sum of n indicators gives n/6 expected sixes.
The expected number of events that occur is the sum of their probabilities, overlaps or not.
Dependence does not affect the validity of linearity of expectation, so expectations of sums of indicators can still be computed term by term.
Pitfall: Adding variances of dependent indicators
For one coin toss with A = heads, adding Var(IA)+Var(IAc)=41+41 gives 21. But IA+IAc=1 on every outcome, so its variance is 0: the covariance −41, counted twice, cancels the sum.
• Bernoulli trials, where each trial contributes a 0 or 1 • Binomial models, where the total number of successes is a sum of indicators • Occupancy and matching problems, where indicators track whether a condition is satisfied • Random structures, where indicators isolate local events
Indicators function as a structural tool rather than as a probability model of their own.
Fact: Only about 5 records in 100 draws
The k-th value is the largest of the first k with probability k1, so the expected number of records is 1+21+⋯+1001≈5.19. A thousand draws raise it only to about 7.49.
Records are a small example of such a structure. Values are drawn one at a time from the same continuous distribution, and a value is called a record when it is larger than every value drawn before it. Whether the k-th value is a record depends only on how the first k values are ordered among themselves, so each draw carries its own record indicator. The number of records is the sum of these indicators, and its expectation is the sum of their probabilities, whatever the distribution of the values.
The total number of successes is a sum of indicators.
Occupancy and matching problems
Indicators track whether a condition is satisfied.
Random structures
Indicators isolate local events.
Records: each draw carries its own record indicator.the number of records is the sum of these indicators
Indicator random variablesa structural tool, not a model of their own
Indicators in Probability ModelsLearn Math Class
What Indicators Are Not
Indicator random variables are often misunderstood.
• They are not probabilities • They are not probability distributions • They are not limited to Bernoulli experiments
An indicator is a random variable that represents an event numerically. Its value depends on the outcome, not on the probability of the event itself.
Summary
Indicator random variables convert events into numerical random variables that take values 0 or 1.
Their expected value equals the probability of the corresponding event, and sums of indicators allow counting problems to be handled through linearity of expectation without requiring independence or full probability distributions.
Indicators function as a structural tool in probability theory, linking events, expectation, and counting within finite and discrete models.
Indicators at a Glance
The table below collects the anatomy of indicator random variables — what they are, what they aren't, the key identity that ties them to events, the algebra they support, the linearity-of-expectation property that makes them powerful, the counting technique they enable, how dependence affects them, and where they show up across probability models — into a single reference card.
This summary collects the formulas for indicator random variables on seven cards. Each card gives the name of the formula, the formula itself and a sentence on what it means, with a link to the section that explains it.
The first card defines the indicator as one on the outcomes of an event and zero elsewhere. Two cards follow that turn set operations into arithmetic, the intersection as a product and the complement as one minus the indicator. Then come the expectation, which equals the probability of the event, and the variance. The last two cards write a count as a sum of indicators and take its expectation term by term, with a badge noting that no independence is required.
The cards add up to one method: write the quantity you want as a sum of indicators, replace each indicator by the probability of its event, and add. Dependence between the events does not matter for the average, only for the variance.
Common Pitfalls
Each of the three mistakes below is marked where it happens in the sections above; here each is worked through in full, with the wrong and the right working side by side.
The indicator of A∪B is needed, and IA+IB is written for it. On outcomes that lie in both events the sum equals 2, so it is not an indicator at all, and its expectation overstates the probability of the union.
Wrong turn
Error here
For one roll of a fair die with A={2,4,6} (even) and B={4,5,6} (at least 4),
P(A∪B)=E[IA+IB]=63+63=1
Right path
The overlap is removed once, using the product rule for the intersection.
IA∪B=IA+IB−IAIB,
P(A∪B)=63+63−62=64
=32
Why it happens"or" reads like "plus", and for disjoint events the sum is correct, because IAIB=0 on every outcome there. Overlapping events break it.
How to checkEvaluate the formula at an outcome in both events. An indicator must give 1, while IA+IB gives 2 at ω=4. Or count directly: A∪B={2,4,5,6} holds 4 of the 6 outcomes.
2Subtracting the overlap from a count
The expected number of events that occur is computed like the probability of their union: the probabilities are added and the overlap is subtracted. That gives the probability that at least one event occurs, which is a different quantity.
Wrong turn
Error here
For X, the number of sixes on two fair dice,
E[X]=61+61−361=3611
Right path
X=I+J, with one indicator per die, and linearity needs no correction for the overlap.
E[X]=E[I]+E[J]=366+366
=3612=31
Why it happensThe double six looks counted twice, as in inclusion–exclusion. For a count that is right: on (6,6) there really are two sixes, and X=2.
How to checkWork out the distribution once. X=1 on 10 of the 36 outcomes and X=2 on 1, so E[X]=1⋅3610+2⋅361=3612.
3Adding variances of dependent indicators
The variance of a sum of indicators is taken as the sum of their variances, as if the rule for expectation carried over. That holds only when every covariance between the indicators is zero, for example when they are independent.
Wrong turn
Error here
For one toss of a fair coin with A = heads,
Var(IA+IAc)=21⋅21+21⋅21=21
Right path
IAIAc=0 on every outcome, so Cov(IA,IAc)=E[IAIAc]−E[IA]E[IAc]=0−41=−41, and
Var(IA+IAc)=41+41+2(−41)=0
Why it happensLinearity of expectation needs no independence, and the same habit is carried over to variance, which is not linear.
How to checkBy the complement rule, IA+IAc=IA+(1−IA)=1 on every outcome, and a constant has variance 0.
Each slip treats indicators like probabilities. IA+IB is not an indicator, since it equals 2 on the overlap; the expected number of events that occur is the plain sum of their probabilities, with no overlap subtracted; and variances add only when the covariances are 0. Evaluating at one outcome, or working out the distribution once, catches each slip.
Skills You Should Learn
Each skill opens its step-by-step method page. Skills marked "On this page" are taught above.
Find the expected value of a sumSingle ruleThe variable is a sum or a linear combination of variables whose means you know: X+Y, 3X−2Y+5, the total of n dice. It holds whether or not the variables are independent.
Do indicator random variables need to be independent?
+
No, and this is what makes them powerful. Linearity of expectation holds regardless of dependence, so the expectation of a sum of indicators is the sum of the event probabilities even when the events overlap or influence each other heavily. That is why counting arguments built from indicators need no independence assumption. Dependence only starts to matter for variance.Read more →
Is an indicator variable the same as a Bernoulli variable?
+
Yes — a lone indicator is the simplest Bernoulli variable there is: I_A ~ Bern(P(A)). It takes 1 with probability P(A) and 0 otherwise, which is exactly the Bernoulli definition. The two names differ only in emphasis: “indicator” points at the event being tracked, “Bernoulli” at the distribution being followed.Read more →
What is the difference between 1_A and 1{X ≤ x}?
+
What goes in the slot. The subscript form takes an event and asks whether a given outcome belongs to it. The brace form takes a statement and asks whether that statement is true. Both return 0 or 1, but one's argument is an outcome and the other's content is a sentence. The brace form is what makes F(x) = E[1{X ≤ x}] readable.Read more →
Why do some texts write χ_A instead of I_A?
+
Because analysis and measure theory call the same object the characteristic function of a set. Probability walked away from that name for good reason: here “characteristic function” already means E[e^{itX}], the transform of a distribution. Two different objects share one name across the fence, which is why this side writes “indicator” and leaves χ alone.Read more →
Is a sum of indicators a probability?
+
No — it is a random count. The sum ranges over 0, 1, …, n and tells you how many of the events actually occurred on this trial. Only its expectation lands back among probabilities, as the sum of the individual event probabilities. Keeping the random count apart from its average is the whole trick indicator arguments turn on.Read more →
How many cards land in their own position after a shuffle, on average?
+
One, whatever the size of the deck. Shuffle n cards numbered 1 to n and let Ii indicate that card i lands in position i, which has probability n1. The number of matches is I1+⋯+In, so its expectation is n⋅n1=1. The events are dependent, but linearity of expectation does not care; only the full distribution needs inclusion–exclusion.Read more →
Is the expected number of events the same as the probability that at least one occurs?
+
No. The expected number is the plain sum of the probabilities, with no correction for overlap; the probability of at least one is the union, which subtracts the overlap. For two dice, the expected number of sixes is 61+61=31, while the chance of at least one six is 61+61−361=3611. The gap is the double six, which counts as 2.Read more →
How many records should you expect in a sequence of random draws?
+
Very few: about 5.19 in 100 draws and only about 7.49 in 1000. Draw values one at a time from the same continuous distribution; the k-th value is a record, larger than every value before it, with probability k1. Summing one record indicator per draw gives an expected count of 1+21+⋯+n1, whatever the distribution of the values.Read more →