Skip to content

Commit

Permalink
Merge pull request #4794 from HaccerKat/combinatorics
Browse files Browse the repository at this point in the history
Expected Products
  • Loading branch information
SansPapyrus683 committed Sep 21, 2024
2 parents 5b2edd7 + 93df66c commit 2652a1f
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions content/4_Gold/Combinatorics.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -1107,6 +1107,19 @@ print(expected_ops)
</PySection>
</LanguageSection>
## Expected Products
Linearity of expectation deals with $E[X + Y]$, but what about $E[X \cdot Y]$?
$E[X \cdot Y] = E[X] \cdot E[Y]$ if $X$ and $Y$ are independent from each other.
We can reconsider the example of a fair 6-sided die to show that $E[X^2] \neq E[X]^2$.
We know that $E[X] = \frac{7}{2}$, so $E[X]^2 = \frac{7}{2} \cdot \frac{7}{2} = \frac{49}{4}$.
On the other hand,
$$
E[X^2] = \sum_x x^2 \cdot P(X = x) = \frac{1 + 4 + 9 + 16 + 25 + 36}{6} = \frac{91}{6}.
$$
## Problems
<Problems problems="general" />

0 comments on commit 2652a1f

Please sign in to comment.