Indicator Random Variables in Interviews
Indicator random variables interview prep for expected counts, linearity of expectation, matches, collisions, and probability setup.
Candidates who know expected value but need a reusable interview method.
What an indicator is
An indicator random variable is 1 if an event happens and 0 if it does not. Its expected value is the probability of the event.
Why indicators are useful
They turn a complicated count into a sum of simple yes-or-no pieces. Once the count is written as a sum, linearity of expectation does the rest.
Concrete example
If five dice are rolled, define one indicator for each die showing a six. Each indicator has expectation 1/6, so the expected number of sixes is 5/6.
Dependence is allowed
The indicators do not need to be independent for their expectations to add. This is why the method is powerful for matches, collisions, and sampling without replacement.
How to explain it live
Name the event, define the indicator, compute its probability, then sum over all possible positions, pairs, boxes, or objects.
Common mistakes
Candidates often define indicators vaguely. Make the indexed object clear, such as pair i,j matches or box k is empty, before adding expectations.
Practice the pattern
Use the LeetQuidity curriculum and calibration to turn this topic into a focused practice plan.