ece108: add expected value

This commit is contained in:
eggy 2023-04-10 13:30:32 -04:00
parent b515e87977
commit ccd737b4aa

View File

@ -932,3 +932,27 @@ Formally, this can be solved without $Pr\{B\}$:
$$Pr\{A|B\}=\frac{Pr\{A\}Pr\{B|A\}}{Pr\{A\}Pr\{B|A\}+Pr\{\overline A\}Pr\{B|\overline A\}}$$
### Expected value
The **expected value**, **mean**, or **expectation of $X$** is:
$$E[X]=\sum_{x\in\mathbb R}x\cdot Pr\{X=x\}=\sum_{s\in S}X(s)\cdot Pr\{\{s\}\}$$
This operation is **linear**, but multiplies using AND:
$$
E[X+Y]=E[X}+E[Y] \\
E[XY]=\sum_{x\in X,y\in Y}xy\cdotPr\{X=x\wedge y\=y\}
$$
Thus if $X$ and $Y$ are independent:
$$E[XY]=E[X]E[Y]$$
An **indicator random variable** only has two possible outcomes: zero or one. Thus an indicator random variable $X$ has an expected value equal to its probability:
$$E[X]=Pr\{X=1\}$$
The **covariance** of $X$ and $Y$ represents the direction of difference of $X$ and $Y$ from their means.
$$Cov[X,Y]=E[XY]-E[X]E[Y]$$