----- > [!proposition] Proposition. ([[probability is a special case of expectation]]) > Let $X$ be a [[random variable]]. If $g$ is a zero-or-one valued function (e.g., an [[indicator random variable]]), then $\E[g(X)]=\P(g(X)=1).$ > [!proof]- Proof. ([[probability is a special case of expectation]]) > Let $X$ and $g$ be as described. Then using [[total expectation]], $\E(g(X))=1 \cdot \P(g(X)=1) + 0\cdot \P(g(X)=0)=\P(g(X)=1),$ as claimed. ----- #### ---- #### References > [!backlink] > ```dataview > TABLE rows.file.link as "Further Reading" > FROM [[]] > FLATTEN file.tags as Tag > WHERE Tag = "#definition" OR Tag = "#theorem" OR Tag = "#MOC" OR Tag = "#proposition" OR Tag = "#axiom" > GROUP BY Tag > ``` > [!frontlink] > ```dataview > TABLE rows.file.link as "Further Reading" > FROM outgoing([[]]) > FLATTEN file.tags as Tag > WHERE Tag = "#definition" OR Tag = "#theorem" OR Tag = "#MOC" OR Tag = "#proposition" OR Tag = "#axiom" > GROUP BY Tag > ```