probability probability
play

Probability Probability Random variables Atomic events Sample - PowerPoint PPT Presentation

Probability Probability Random variables Atomic events Sample space Probability Events Combining events Probability Measure: disjoint union: e.g.: interpretation: Distribution: interpretation: e.g.:


  1. Probability

  2. Probability • Random variables • Atomic events • Sample space

  3. Probability • Events • Combining events

  4. Probability • Measure: • disjoint union: • e.g.: • interpretation: • Distribution: • interpretation: • e.g.:

  5. Example AAPL price up same down Weather sun 0.09 0.15 0.06 rain 0.21 0.35 0.14

  6. Bigger example AAPL price up same down Weather sun 0.03 0.05 0.02 rain 0.07 0.12 0.05 up same down Weather sun 0.14 0.23 0.09 rain 0.06 0.10 0.04

  7. Notation • X=x: event that r.v. X is realized as value x • P(X=x) means probability of event X=x • if clear from context, may omit “X=” • instead of P(Weather=rain), just P(rain) • complex events too: e.g., P(X=x, Y � y) • P(X) means a function: x � P(X=x)

  8. Functions of RVs • Extend definition: any deterministic function of RVs is also an RV • E.g., AAPL price up same down Weather sun 3 8 3 rain 0 5 0

  9. Sample v. population AAPL price up same do Weather sun 0.09 0.15 0.06 • Suppose we rain 0.21 0.35 0.14 watch for 100 days and count up our AAPL price observations up same do Weather sun rain

  10. Law of large numbers • If we take a sample of size N from distribution P, count up frequencies of atomic events, and normalize (divide by N) ~ to get a distribution P ~ • Then P � P as N � �

  11. Working w/ distributions • Marginals • Joint

  12. Marginals AAPL price up same down Weather sun 0.09 0.15 0.06 rain 0.21 0.35 0.14

  13. Marginals AAPL price up same down Weather sun 0.03 0.05 0.02 rain 0.07 0.12 0.05 up same down Weather sun 0.14 0.23 0.09 rain 0.06 0.10 0.04

  14. Law of total probability • Two RVs, X and Y • Y has values y 1 , y 2 , …, y k • P(X) =

  15. Working w/ distributions Coin H Weather • Conditional: sun 0.15 0.15 • Observation rain 0.35 0.35 • Consistency • Renormalization • Notation:

  16. Conditionals in the literature When you have eliminated the impossible, whatever remains, however improbable, must be the truth. —Sir Arthur Conan Doyle, as Sherlock Holmes

  17. Conditionals AAPL price up same down Weather sun 0.03 0.05 0.02 rain 0.07 0.12 0.05 up same down Weather sun 0.14 0.23 0.09 rain 0.06 0.10 0.04

  18. In general • Zero out all but some slice of high-D table • or an irregular set of entries • Throw away zeros • unless irregular structure makes it inconvenient • Renormalize • normalizer for P(. | event) is P(event)

  19. Conditionals • Thought experiment: what happens if we condition on an event of zero probability?

  20. Notation • P(X | Y) is a function: x, y � P(X=x | Y=y) • As is standard, expressions are evaluated separately for each realization: • P(X | Y) P(Y) means the function x, y �

  21. Exercise

  22. Independence • X and Y are independent if, for all possible values of y, P(X) = P(X | Y=y) • equivalently, for all possible values of x, P(Y) = P(Y | X=x) • equivalently, P(X, Y) = P(X) P(Y) • Knowing X or Y gives us no information about the other

  23. Independence: probability = product of marginals AAPL price up same down Weather sun 0.3 0.09 0.15 0.06 0.7 rain 0.21 0.35 0.14 0.3 0.5 0.2

  24. Expectations AAPL price up same do • How much should we Weather sun 0.09 0.15 0.06 expect to earn from our AAPL stock? rain 0.21 0.35 0.14 up same do Weather sun +1 0 rain +1 0

  25. Linearity of expectation AAPL price up same do Weather • Expectation is a sun 0.09 0.15 0.06 linear function of rain 0.21 0.35 0.14 numbers in bottom table up same do Weather • E.g., change -1s to sun +1 0 0s or to -2s rain +1 0

  26. Conditional expectation AAPL price up same do Weather • What if we know it’s sun 0.09 0.15 0.06 sunny? rain 0.21 0.35 0.14 up same do Weather sun +1 0 rain +1 0

  27. Independence and expectation • If X and Y are independent, then: • Proof:

  28. Variance • Two stocks: one as above, other always earns 0.1 each day • Same expectation, but one is much more variable • Measure of variability: variance

  29. Variance • If zero-mean: variance = E(X 2 ) • Ex: constant 0 v. coin-flip ±1 • In general: E((X – E(X)) 2 )

  30. Exercise: simplify the expression for variance • E((X – E(X)) 2 )

  31. Covariance • Suppose we want an approximate numeric measure of (in)dependence • Consider the r.v. XY • if X, Y are typically both +ve or both -ve • if X, Y are independent

  32. Covariance • cov(X, Y) = • Is this a good measure of dependence? • Suppose we scale X by 10:

  33. Correlation • Like covariance, but control for variance of individual r.v.s • cor(X, Y) =

  34. Correlation v. independence # • Equal probability ! on each point $ • Are X and Y Y " independent? ! $ • Are X and Y ! ! uncorrelated? ! # ! ! " ! X

  35. Correlation v. independence # • Equal probability ! on each point $ • Are X and Y Y " independent? ! $ • Are X and Y ! ! uncorrelated? ! # ! ! " ! X

  36. Law of large numbers • Sample mean = expectation calculated from a sample = • More general form of law: • If we take a sample of size N from distribution P with mean � and compute ~ sample mean � • Then � � � as N � � ~

  37. CLT • Central limit theorem : for a sample of size N, population mean � , population variance � 2 , the sample average has • mean • variance

  38. CLT proof • Assume mu = 0 for simplicity

  39. Bayes Rule Rev. Thomas Bay 1702–1761 • For any X, Y, C • P(X | Y, C) P(Y | C) = P(Y | X, C) P(X | C) • Simple version (without context) • P(X | Y) P(Y) = P(Y | X) P(X) • Can be taken as definition of conditioning

  40. Bayes rule: usual form • Take symmetric form • P(X | Y) P(Y) = P(Y | X) P(X) • Divide by P(Y)

  41. Exercise • You are tested for a rare disease, emacsitis—prevalence 3 in 100,000 • Your receive a test that is 99% sensitive and 99% specific • sensitivity = P(yes | emacsitis) • specificity = P(no | ~emacsitis) • The test comes out positive • Do you have emacsitis?

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend