Probability & Statistics

Expected Value & Bayes' Theorem

๐ŸŽฒ Probability & Statistics
๐Ÿ’ฐ

Expected Value & Bayes' Theorem

Compute expected outcomes and update probabilities with new evidence.

Expected value E(X) is the long-run average outcome of a random variable โ€” the probability-weighted average of all possible values. Bayes' Theorem provides a framework to update the probability of a hypothesis given new evidence.

E(X)=โˆ‘ixiโ‹…P(X=xi)E(X) = \sum_{i} x_i \cdot P(X = x_i)
P(AโˆฃB)=P(BโˆฃA)โ‹…P(A)P(B)=P(BโˆฃA)โ‹…P(A)P(BโˆฃA)P(A)+P(BโˆฃAc)P(Ac)P(A \mid B) = \frac{P(B \mid A)\cdot P(A)}{P(B)} = \frac{P(B \mid A)\cdot P(A)}{P(B \mid A)P(A) + P(B \mid A^c)P(A^c)}
๐ŸŽฒExpected Value of a Die Roll
For a fair six-sided die: E(X) = 1ยท(1/6) + 2ยท(1/6) + 3ยท(1/6) + 4ยท(1/6) + 5ยท(1/6) + 6ยท(1/6) = 21/6 = 3.5.
E(X)=1+2+3+4+5+66=216=3.5E(X) = \frac{1+2+3+4+5+6}{6} = \frac{21}{6} = 3.5
๐ŸฉบBayes' Theorem โ€” Medical Test
Disease prevalence: 1%. Test sensitivity: 90%. Specificity: 95%. P(disease|positive) = (0.9ยท0.01)/[(0.9ยท0.01)+(0.05ยท0.99)] = 0.009/0.0585 โ‰ˆ 15.4%. Even a positive test may not mean disease!
๐Ÿ’ก

Remember This!

A game is "fair" if E(X) = 0 (you expect to neither gain nor lose in the long run). If E(X) < 0, the house has the advantage. Always compute expected value before gambling!

โœ๏ธ Try It!

A game pays $5 with probability 0.3 and costs $2 with probability 0.7. What is the expected value?

Practice with CalcVerse
Take Quiz ๐Ÿ“ โ€” 25 Questions