Indicator variables
An event indicator equals one when its event occurs and zero otherwise.
On this page 7 sections
01Turn a count into a sum#
An event indicator equals one when its event occurs and zero otherwise. Its expectation is the probability of that event, because .
A count of events can be written as a sum of indicators. Linearity of expectation then adds their individual probabilities. It does not require the events to be independent.
02Count expected errors#
Suppose three predictions have error probabilities . Let indicate an error on prediction . The total error count is .
The observed count is an integer, but its expectation can be fractional. Correlated errors can change the distribution and variance of the count without changing this sum of marginal probabilities.
Three event indicators have expectations 0.2,0.3,0.4. Find the expected sum.
Show answer and explanation
Linearity adds the expectations.
03Dependence does not block the mean#
Imagine two checks that always fail together, with failure probability . Their failure count is either zero or two. Its expectation is , also obtained by adding the two indicator expectations.
You would need dependence information to compute the chance that at least one check fails from marginal probabilities alone. For the expected number of failures, the marginals suffice.
A draft multiplies error probabilities 0.2 and 0.5 to find the expected count of errors. Correct result?
Show answer and explanation
The expected count is the sum of the two probabilities.
Define the counted event carefully so each indicator adds exactly one when it occurs. Repeated events, overlapping events, and unequal probabilities can all be handled when the intended count is specified clearly.
Use an event indicator's expectation to compute a count's expected value.
- Use an event indicator's expectation to compute a count's expected value.
Sources & further reading
- [1]Dive into Deep Learning, §2.6 Probability and Statistics ↗d2l.ai · Article
- [2]Harvard Stat 110, Strategic Practice and Homework 9 (2011) ↗stat110.hsites.harvard.edu · Article