Textbook
For a proposition $P$, the indicator $\mathbf1\{P\}$ equals 1 when $P$ is true and 0 when it is false. Other notations include $\mathbb I(P)$ and the Iverson bracket $[P]$. The set indicator $\mathbf1_A(x)$ equals $\mathbf1\{x\in A\}$.
Indicators can be added: $\sum_{i=1}^n\mathbf1\{P_i\}$ counts satisfied conditions, and division by $n\ge1$ gives their proportion. In convex optimization, “indicator function” may instead mean zero inside a set and $+\infty$ outside. That is a different definition and cannot replace a zero–one indicator.
For a sum of indicators to count objects, each object must contribute exactly one term for the same condition. Including an observation twice counts it twice. Strict versus non-strict comparison belongs to the condition: $\mathbf1\{x>3\}$ and $\mathbf1\{x\ge3\}$ differ at $x=3$. An indicator converts an already determined truth value into a number; it does not remove ambiguity from the underlying check.
Definitions and further reading: Mathematics for Computer Science.
In plain language
An indicator resembles a turnstile that records only whether a condition holds. Success becomes one and failure becomes zero. Adding these marks counts successes, while averaging them gives their proportion. This accountant reports no margin of success: a spectacular pass and a narrow pass receive the same one.
Example
The example tests whether the original illustrative measurements 2, 4, and 6 exceed 3. The conditions become 0, 1, 1, totaling 2 and giving proportion $2/3$.
Indicators: Turning Conditions Into Zero or One
Checks
Two fails; four and six pass.
Step 1 of 3: Checks
Read all steps
Checks
Two fails; four and six pass.
- State
- 2: falsecurrent4: truecurrent6: truecurrent
Numerical tokens
Each false result becomes zero and each true result becomes one.
- State
- 0current1current1current
Success count and proportion
Two successful checks out of three give proportion 2/3.
- State
- 0 + 1 + 1 = 2current2/3current
The entries $0,1,1$ correspond to measurements 2, 4, and 6 in the original order. The comparisons precede the addition of their numerical results. The measurements themselves average to 4, but that does not answer the question about the fraction exceeding a threshold. Adding a measurement of 3 would change the fraction to $2/4$: under the strict condition, the boundary value receives no token.
Related concepts: Finite sums, Classification error.