From ccd737b4aac6d4ac3a0775b6aacd60bd6fd38c86 Mon Sep 17 00:00:00 2001 From: eggy Date: Mon, 10 Apr 2023 13:30:32 -0400 Subject: [PATCH] ece108: add expected value --- docs/1b/ece108.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/docs/1b/ece108.md b/docs/1b/ece108.md index 76467e2..85fb09e 100644 --- a/docs/1b/ece108.md +++ b/docs/1b/ece108.md @@ -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]$$