# Explain why $E(1_A)=P(A)$

in my homework i have the following excercise:

May A and B be events. May there be a probability space $(\Omega, \mathcal{F}, P)$. Show that $E(1_A) = P(A)$. Show that A and B are independent exactly when $E(1_A \cdot 1_B) = E(1_A) \cdot E(1_B)$.

A random variable $1_A$ is $1_A: \Omega \rightarrow \{0, 1\}$.

My question for the the question in general: The definition of $E(X)$ is $\int^{\infty}_{-\infty} x \cdot f(x) dx$. Now i don´t have any f here. Or do i have to extract the f from the definition of $1_A$? Like $f: \Omega \rightarrow \{0, 1\}$ and $x \rightarrow \{0, 1\}$? If yes, how do i go about this?

For the second part i can imagine, if i can show that $E(1_A) = P(A)$ i can insert this in the definition of normal independence which is $P(A\cap B) = P(A) \cdot P(B)$.

Would be cool if you could give me a tip how to get the f. Maybe i´m thinking too complicated.

• Your definition of $E$ is not the best one for this context. Are you aware what the constituents $\Omega$, $\mathcal F$ and $P$ of your probability space are? – Hagen von Eitzen May 27 '17 at 9:48
• $\Omega, \mathcal{F}$ and P are not given, though i know what they are in general. But what role do they play here? – Nu Ta May 27 '17 at 9:51
• The definition you refer to holds when $X$ has a PDF $f$ but here, $X=\mathbf 1_A$ is a discrete random variable, and then $$E(X)=\sum_xx\cdot P(X=x)$$ where the sum is over the values of $x$ such that $P(X=x)\ne0$. Can you list these values of $x$ when $X=\mathbf 1_A$, and the associated probabilities $P(X=x)$? Then $E(X)=E(\mathbf 1_A)$ would follow... – Did May 27 '17 at 10:43
• @HagenvonEitzen These are not useful, are they? – Did May 27 '17 at 10:45
• It should be x = 0 and x = 1 right? So that i get the sum $E(1_A) = \sum_{x \in A} x \cdot P(X = A)$ which results in: $0 \cdot P(X = 0) + 1 \cdot P(X = 1)$ right? – Nu Ta May 27 '17 at 10:49

1) If $\Omega$ is a probability space with probability measure $\mathbb{P}$, the expected value of $1_A$ is defined as the integral of $1_A$ with respect to $\mathbb{P}$:
$E(1_A) = \int_\Omega 1_A(\omega) d\mathbb{P}(\omega) = \int_A d\mathbb{P}$ = P(A)
($\to$) Suppose that A and B are independent. Then $E(1_A 1_B)$ = $E(1_{A\cap B}$) = $P(A\cap B)$ = $P(A)P(B)$ = $E(1_A)E(1_B)$
($\leftarrow$) We know that $E(1_A 1_B)$ = $E(1_A)E(1_B)$ holds. Then $P(A\cap B)$ = $E(1_{A\cap B})$ = $E(1_A 1_B)$ = $E(1_A)E(1_B)$ = $P(A)P(B)$.
• Please replace every $=$ by =. Additionally, my guess is that the OP's problem is with your step (1), which you basically take for granted. – Did May 27 '17 at 11:36