Visual Tools
Calculators
Tables
Mathematical Keyboard
Converters
Other Tools


Indicators in Probability






Why Indicators Exist


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 00 or 11, 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
Bernoulli Distribution— an indicator follows a Bernoulli distribution
Expected Value— E[1A]=P(A)E[\mathbf{1}_A] = P(A)
Event— the event AA that the indicator tracks

See All Probability Definitions →


From Events to Random Variables

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.
outcomeI₁ (head on toss 1)I₂ (head on toss 2)I₃ (head on toss 3)I₁ + I₂ + I₃
HHH1113
HTH1012
TTH0011
TTT0000
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 11 to outcomes in a given event and 00 to all other outcomes.
This construction converts an event into a numerical object defined on the same sample space.
The definition
The indicator random variable IAI_A of an event AA takes the value 11 on every outcome in AA and 00 on every outcome outside AA.
The formal statement, with its notation, is given in the next section, definition of an indicator random variable.
So the number of heads in three tosses is the random variable I1+I2+I3I_1 + I_2 + I_3.
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)E[I_A] = 1 \cdot P(A) + 0 \cdot (1 - P(A)) = P(A). So for a fair coin the expected number of heads is 12+12+12=32\frac{1}{2} + \frac{1}{2} + \frac{1}{2} = \frac{3}{2}.
TTTH: 0, T: 3P = 1/8TTHH: 1, T: 2P = 1/8THTH: 1, T: 2P = 1/8THHH: 2, T: 1P = 1/8HTTH: 1, T: 2P = 1/8HTHH: 2, T: 1P = 1/8HHTH: 2, T: 1P = 1/8HHHH: 3, T: 0P = 1/8
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, I1I_1 is 00 or 11; the value 12\frac{1}{2} is its expected value, not one of its values. Treating IAI_A as if it were P(A)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 AA be an event in a probability experiment.
The indicator random variable of AA, denoted by IAI_A, is defined by

Indicator Random Variable Definition
IA(ω)={1,if ω∈A0,if ω∉AI_A(\omega)=\begin{cases}1, & \text{if } \omega \in A \\ 0, & \text{if } \omega \notin A\end{cases}
Learn more about this formula: Indicator Random Variable Definition →



The indicator IAI_A is a random variable defined on the same sample space as the experiment.
It represents membership in the event AA 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.
P(⋅)P(\cdot) and the event letters come from the probability function; ω\omega and the membership sign from sample space notation and set membership; E[⋅]E[\cdot] from expected value notation; the summation sign from sequence notation.
IAI_A, 1A\mathbf{1}_A
the indicator of A
One function, several dresses: the roman capital IAI_A 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)I(A).
Also writtenχA\chi_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]E[e^{itX}], the transform of a distribution — so a probability text saying "characteristic function" almost never means χA\chi_A; same name, two objects across the fence, which is exactly why this side writes "indicator" and leaves χ alone.
1{X≤x}\mathbf{1}\{X \le 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}\{X \le x\} — and the indicator then converts that event into a number.
CasesThe CDF in one line: F(x)=E[1{X≤x}]F(x) = E[\mathbf{1}\{X \le 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(ω)\mathbf{1}_A(\omega) asks whether a point belongs; 1{X≤x}\mathbf{1}\{X \le 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=1nIAiN = \sum_{i=1}^{n} I_{A_i}
the count: one indicator per event, summed
The mark behind Counting with Indicator Random Variables below: each event contributes its 0-or-1, so NN is exactly "how many of the AiA_i occurred" — a random count, not a probability.
CasesTaking EE termwise turns the count into probabilities, E[N]=∑iP(Ai)E[N] = \sum_i P(A_i) — the engine of Expectation and Linearity below; and a lone indicator is the simplest named variable there is, IA∼Bern⁡(P(A))I_A \sim \operatorname{Bern}(P(A)) in the family-declaration notation.
Do not confuseA probability. NN ranges over 0,1,…,n0, 1, \dots, n; only its expectation lands back among probabilities — keeping the random count and its average apart is the entire trick the page turns on.
DownloadPNG2×PDF
Notation · Cheat sheet
Random Variable Notation at a Glance
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.
Random variables
X:Ω→RX : \Omega \to \mathbb{R}
X maps outcomes to numbers
A random variable is a function, not a variable.
{X≤x}\{X \le x\}
the event that X is at most x
Braces turn a condition into an event.
X∼Bin(n,p)X \sim \text{Bin}(n, p)
X is distributed as
Names the distribution and its parameters.
Probability functions
XX vs xx
the variable; a value
Capital for the random variable, lowercase for a number it takes.
P(⋅)P(\cdot)
the probability of
Takes an event, returns a number in [0,1][0, 1].
p(x)p(x) vs f(x)f(x)
mass; density
pp is a chance (discrete); ff is a rate (continuous).
PMF
{x:pX(x)>0}\{x : p_X(x) > 0\}
the support of X
Every value that carries probability.
∑xpX(x)=1\sum_{x} p_X(x) = 1
the masses add to one
The sum runs over the support, not from a start to an end.
PDF
fX(x)f_X(x)
the density of X at x
A density, not a probability; it can exceed 11.
P(a≤X≤b)P(a \le X \le b)
X between a and b
The integral ∫abfX(x) dx\int_a^b f_X(x)\,dx.
P(X=a)=0P(X = a) = 0
a single point
For a continuous variable, always zero.
CDF
FX(x)F_X(x)
the CDF of X at x
Equals P(X≤x)P(X \le x): everything up to and including xx.
F(b)−F(a)F(b) - F(a)
F of b minus F of a
Equals P(a<X≤b)P(a < X \le b).
IndicatorsThis page
IA,  1AI_A, \; \mathbf{1}_A
the indicator of A
11 if AA happens, 00 if not.
1{X≤x}\mathbf{1}\{X \le x\}
one if the condition holds
The brace form takes a statement instead of an event.
N=∑IAiN = \sum I_{A_i}
a count of events
How many of the AiA_i happened.
Same marks, different job
PP vs ppCapital PP takes an event; lowercase pp is a mass function of a value.
FF vs ffCapital FF accumulates (the CDF); lowercase ff is the density.
∼\simIs distributed as; in linear algebra, row-equivalent or similar.
{X≤x}\{X \le x\}An event, not a set of numbers.
Random Variable Notation at a Glance·/probability/random-variablesLearn Math Class

Basic Properties of Indicator Random Variables


Indicator random variables have a simple structure.

• They take only two values: 00 or 11
• 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−IA1 - I_A
• Indicators reflect set operations at the level of outcomes

Stated formally, for events AA and BB:

Indicator of Intersection
IA∩B=IA⋅IBI_{A \cap B} = I_A \cdot I_B
Learn more about this formula: Indicator of Intersection →

Indicator of Complement
IAc=1−IAI_{A^c} = 1 - I_A
Learn more about this formula: Indicator of Complement →


Pitfall: Adding indicators for a union
Writing IA∪B=IA+IBI_{A \cup B} = I_A + I_B for one die roll, with AA = even and BB = at least 4, gives the value 22 at ω=4\omega = 4 and P(A∪B)=12+12=1P(A \cup B) = \frac{1}{2} + \frac{1}{2} = 1. The overlap comes off once: IA∪B=IA+IB−IAIBI_{A \cup B} = I_A + I_B - I_A I_B, so P(A∪B)=1−13=23P(A \cup B) = 1 - \frac{1}{3} = \frac{2}{3}.

A union is built from the two formulas above. An outcome lies outside A∪BA \cup B exactly when it lies outside both events, so I(A∪B)c=(1−IA)(1−IB)I_{(A \cup B)^c} = (1 - I_A)(1 - I_B). Taking the complement once more writes the indicator of the union in terms of IAI_A, IBI_B and their product.

Because an indicator takes only the values 00 and 11, its variance is fixed by the probability of the event:

Variance of Indicator
Var⁡(IA)=P(A)(1−P(A))\operatorname{Var}(I_A) = P(A)\bigl(1 - P(A)\bigr)
Learn more about this formula: Variance of Indicator →


These properties allow indicators to be combined and manipulated algebraically without introducing new probability assumptions.
The die example as a picture. Pick an operation: the shaded outcomes are exactly those where its indicator equals 11.
DownloadPNG2×PDF
AB132546
UnionA∪BA \cup B
Indicator is 1 for outcomes thatlie in AA or BB
IndicatorIA∪B=IA+IB−IAIBI_{A \cup B} = I_A + I_B - I_A I_B
Result{2,4,5,6}\{2, 4, 5, 6\}
ProbabilityP(A∪B)P(A \cup B) =0.6667
CalculationP(A∪B)=12+12−13=23P(A \cup B) = \frac{1}{2} + \frac{1}{2} - \frac{1}{3} = \frac{2}{3}
IA+IBI_A + I_B alone gives the value 22 at the outcomes 44 and 66; the overlap comes off once.
One die roll: A={2,4,6}A = \{2, 4, 6\} (even), B={4,5,6}B = \{4, 5, 6\} (at least 4)Click a region of the diagram to add or remove it.
Indicators of set operations on one dieLearn Math Class

Expectation of an Indicator Random Variable


The expected value of an indicator random variable equals the probability of its event.

For an event AA with indicator IAI_A,

Expectation of Indicator
E[IA]=P(A)E[I_A]=P(A)
Learn more about this formula: Expectation of Indicator →


This holds because IAI_A takes the value 11 exactly on outcomes in AA and 00 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 nn cards numbered 11 to nn: card ii lands in position ii with probability 1n\frac{1}{n}, so the expected number of matches is n⋅1n=1n \cdot \frac{1}{n} = 1. The answer is the same for 33 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 ii lands in position ii" 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 11 if a specified condition is met and 00 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, 16+16−136=1136\frac{1}{6} + \frac{1}{6} - \frac{1}{36} = \frac{11}{36}, the probability of at least one six. A double six adds 22 to the count, so the expected number is 16+16=13\frac{1}{6} + \frac{1}{6} = \frac{1}{3}.

This approach converts counting questions into expectation calculations and allows results to be obtained without enumerating all outcomes or computing complex probabilities.
Two dice: the number of sixes is the indicator of a six on the first die plus the indicator of a six on the second; (6,6) counts twice; expected count 12/36 = 1/3second diefirst die1122334455661,11,21,31,41,51,62,12,22,32,42,52,63,13,23,33,43,53,64,14,24,34,44,54,65,15,25,35,45,55,66,16,26,36,46,56,6first die 6: I = 16 of 36 outcomessecond die 6: J = 16 of 36 outcomessixes: X = I + JE[I] = E[J] = 6/36(6,6): X = 2E[X] = 12/36 = 1/3Count with indicators: add their expectations
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.

Indicators and Dependence


Indicator random variables may be dependent.

RULE
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 AA = heads, adding Var⁡(IA)+Var⁡(IAc)=14+14\operatorname{Var}(I_A) + \operatorname{Var}(I_{A^c}) = \frac{1}{4} + \frac{1}{4} gives 12\frac{1}{2}. But IA+IAc=1I_A + I_{A^c} = 1 on every outcome, so its variance is 00: the covariance −14-\frac{1}{4}, counted twice, cancels the sum.

However, dependence becomes important when higher-order quantities such as variance are considered.

This distinction explains why indicators are effective for expectation-based counting but require additional care in variance calculations.

Indicators in Probability Models


Indicator random variables are used across many probability models.

They commonly appear in:

• Bernoulli trials, where each trial contributes a 00 or 11
• 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 kk-th value is the largest of the first kk with probability 1k\frac{1}{k}, so the expected number of records is 1+12+⋯+1100≈5.191 + \frac{1}{2} + \dots + \frac{1}{100} \approx 5.19. A thousand draws raise it only to about 7.497.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 kk-th value is a record depends only on how the first kk 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.
DownloadPNG2×PDF
Bernoulli trials
  • Each trial contributes a 00 or 11.
Binomial models
  • 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 00 or 11.

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.
DownloadPNG2×PDF
Layout
AspectStatementNote / example
What it isa random variable assigning 1 to outcomes in A and 0 to all othersIA_{A} : Ω → {0, 1}; follows a Bernoulli distribution with parameter P(A)
What it is NOTnot a probability value, not a distribution, not exclusive to Bernoulli trialsits value depends on the outcome, not on P(A)
Key identityE[IA_{A}] = P(A)the bridge between events and expectation
ComplementIAc_{Aᶜ} = 1 − IA_{A}indicator algebra mirrors set operations
LinearityE[∑ IAi_{Aᵢ}] = ∑ P(Aᵢ)no independence assumption required
Counting techniqueexpress the count N = ∑ IAi_{Aᵢ}, then take expectation termwiseconverts counting into a sum of probabilities, avoiding enumeration
Dependenceallowed and harmless for expectationbecomes essential when computing variance
Typical usesBernoulli / binomial models, matching, occupancy, random structuresa structural tool across probability models, not a model of its own
Indicators at a GlanceLearn Math Class

Formula Summary

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.
DownloadPNG2×PDF
Definition
IA(ω)={1,if ω∈A0,if ω∉AI_A(\omega)=\begin{cases}1, & \text{if } \omega \in A \\ 0, & \text{if } \omega \notin A\end{cases}
A random variable that records membership in the event AA as 11 or 00, as the definition sets out.
Intersection
IA∩B=IA⋅IBI_{A \cap B} = I_A \cdot I_B
The product is 11 only when both events occur, one of the basic properties.
Complement
IAc=1−IAI_{A^c} = 1 - I_A
Subtracting from 11 swaps the two values, so the indicator of not-AA follows from the basic properties.
Expectation
E[IA]=P(A)E[I_A]=P(A)
The average of an indicator is the probability of its event, which expectation of an indicator shows from the two values.
Variance
Var⁡(IA)=P(A)(1−P(A))\operatorname{Var}(I_A) = P(A)\bigl(1 - P(A)\bigr)
Because only 00 and 11 occur, the probability of the event fixes the spread (basic properties).
Counting with indicators
N=∑i=1nIAi\displaystyle N = \sum_{i=1}^{n} I_{A_i}
One indicator per event, summed, gives how many of the events occurred: a random count, not a probability (counting with indicators).
Expected count
E[∑IAi]=∑P(Ai)\displaystyle E\left[\sum I_{A_i}\right] = \sum P(A_i)
Taking expectations term by term turns the count into a sum of probabilities, by linearity of expectation.
!no independence needed
Indicator variable formulas·All probability formulasLearn Math Class
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.
DownloadPNG2×PDF
1Adding indicators for a union
The indicator of A∪BA \cup B is needed, and IA+IBI_A + I_B is written for it. On outcomes that lie in both events the sum equals 22, 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}A = \{2, 4, 6\} (even) and B={4,5,6}B = \{4, 5, 6\} (at least 4),
P(A∪B)=E[IA+IB]=36+36=1P(A \cup B) = E[I_A + I_B] = \frac{3}{6} + \frac{3}{6} = 1
Right path
The overlap is removed once, using the product rule for the intersection.
IA∪B=IA+IB−IAIB,I_{A \cup B} = I_A + I_B - I_A I_B,

P(A∪B)=36+36−26=46P(A \cup B) = \frac{3}{6} + \frac{3}{6} - \frac{2}{6} = \frac{4}{6}

=23= \frac{2}{3}
Why it happens"or" reads like "plus", and for disjoint events the sum is correct, because IAIB=0I_A I_B = 0 on every outcome there. Overlapping events break it.
How to checkEvaluate the formula at an outcome in both events. An indicator must give 11, while IA+IBI_A + I_B gives 22 at ω=4\omega = 4. Or count directly: A∪B={2,4,5,6}A \cup B = \{2, 4, 5, 6\} holds 44 of the 66 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 XX, the number of sixes on two fair dice,
E[X]=16+16−136=1136E[X] = \frac{1}{6} + \frac{1}{6} - \frac{1}{36} = \frac{11}{36}
Right path
X=I+JX = I + J, with one indicator per die, and linearity needs no correction for the overlap.
E[X]=E[I]+E[J]=636+636E[X] = E[I] + E[J] = \frac{6}{36} + \frac{6}{36}

=1236=13= \frac{12}{36} = \frac{1}{3}
Why it happensThe double six looks counted twice, as in inclusion–exclusion. For a count that is right: on (6,6)(6, 6) there really are two sixes, and X=2X = 2.
How to checkWork out the distribution once. X=1X = 1 on 1010 of the 3636 outcomes and X=2X = 2 on 11, so E[X]=1⋅1036+2⋅136=1236E[X] = 1 \cdot \frac{10}{36} + 2 \cdot \frac{1}{36} = \frac{12}{36}.
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 AA = heads,
Var⁡(IA+IAc)=12⋅12+12⋅12=12\operatorname{Var}(I_A + I_{A^c}) = \frac{1}{2} \cdot \frac{1}{2} + \frac{1}{2} \cdot \frac{1}{2} = \frac{1}{2}
Right path
IAIAc=0I_A I_{A^c} = 0 on every outcome, so Cov⁡(IA,IAc)=E[IAIAc]−E[IA]E[IAc]=0−14=−14\operatorname{Cov}(I_A, I_{A^c}) = E[I_A I_{A^c}] - E[I_A]E[I_{A^c}] = 0 - \frac{1}{4} = -\frac{1}{4}, and
Var⁡(IA+IAc)=14+14+2(−14)=0\operatorname{Var}(I_A + I_{A^c}) = \frac{1}{4} + \frac{1}{4} + 2\left(-\frac{1}{4}\right) = 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)=1I_A + I_{A^c} = I_A + (1 - I_A) = 1 on every outcome, and a constant has variance 00.
Common pitfalls with indicator variables·/probability/indicatorsLearn Math Class
Each slip treats indicators like probabilities. IA+IBI_A + I_B is not an indicator, since it equals 22 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 00. 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.
Taught on this page
Random variable methods

Indicator Variables FAQ

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 nn cards numbered 11 to nn and let IiI_i indicate that card ii lands in position ii, which has probability 1n\frac{1}{n}. The number of matches is I1+⋯+InI_1 + \cdots + I_n, so its expectation is n⋅1n=1n \cdot \frac{1}{n} = 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 16+16=13\frac{1}{6} + \frac{1}{6} = \frac{1}{3}, while the chance of at least one six is 16+16−136=1136\frac{1}{6} + \frac{1}{6} - \frac{1}{36} = \frac{11}{36}. The gap is the double six, which counts as 22.Read more →

How many records should you expect in a sequence of random draws?

+
Very few: about 5.195.19 in 100100 draws and only about 7.497.49 in 10001000. Draw values one at a time from the same continuous distribution; the kk-th value is a record, larger than every value before it, with probability 1k\frac{1}{k}. Summing one record indicator per draw gives an expected count of 1+12+⋯+1n1 + \frac{1}{2} + \cdots + \frac{1}{n}, whatever the distribution of the values.Read more →