Probability Probability Random variables Atomic events Sample - - PowerPoint PPT Presentation

probability probability
SMART_READER_LITE
LIVE PREVIEW

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.:


slide-1
SLIDE 1

Probability

slide-2
SLIDE 2

Probability

  • Random variables
  • Atomic events
  • Sample space
slide-3
SLIDE 3

Probability

  • Events
  • Combining events
slide-4
SLIDE 4

Probability

  • Measure:
  • disjoint union:
  • e.g.:
  • interpretation:
  • Distribution:
  • interpretation:
  • e.g.:
slide-5
SLIDE 5

Example

Weather AAPL price

up same down sun rain

0.09 0.15 0.06 0.21 0.35 0.14

slide-6
SLIDE 6

Bigger example

Weather AAPL price

up same down sun rain

0.03 0.05 0.02 0.07 0.12 0.05

Weather

up same down sun rain

0.14 0.23 0.09 0.06 0.10 0.04

slide-7
SLIDE 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, Yy)
  • P(X) means a function: x P(X=x)
slide-8
SLIDE 8

Functions of RVs

  • Extend definition: any deterministic

function of RVs is also an RV

  • E.g.,

Weather AAPL price

up same down sun rain

3 8 3 5

slide-9
SLIDE 9

Sample v. population

  • Suppose we

watch for 100 days and count up our

  • bservations

Weather AAPL price

up same do sun rain

0.09 0.15 0.06 0.21 0.35 0.14

Weather AAPL price

up same do sun rain

slide-10
SLIDE 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

~ ~

slide-11
SLIDE 11

Working w/ distributions

  • Marginals
  • Joint
slide-12
SLIDE 12

Marginals

Weather AAPL price

up same down sun rain

0.09 0.15 0.06 0.21 0.35 0.14

slide-13
SLIDE 13

Marginals

Weather AAPL price

up same down sun rain

0.03 0.05 0.02 0.07 0.12 0.05

Weather

up same down sun rain

0.14 0.23 0.09 0.06 0.10 0.04

slide-14
SLIDE 14

Law of total probability

  • Two RVs, X and Y
  • Y has values y1, y2, …, yk
  • P(X) =
slide-15
SLIDE 15

Working w/ distributions

  • Conditional:
  • Observation
  • Consistency
  • Renormalization
  • Notation:

Weather Coin

H sun rain

0.15 0.15 0.35 0.35

slide-16
SLIDE 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

slide-17
SLIDE 17

Conditionals

Weather AAPL price

up same down sun rain

0.03 0.05 0.02 0.07 0.12 0.05

Weather

up same down sun rain

0.14 0.23 0.09 0.06 0.10 0.04

slide-18
SLIDE 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)
slide-19
SLIDE 19

Conditionals

  • Thought experiment: what happens if we

condition on an event of zero probability?

slide-20
SLIDE 20
  • 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

Notation

slide-21
SLIDE 21

Exercise

slide-22
SLIDE 22
  • 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

Independence

slide-23
SLIDE 23

Weather AAPL price

up same down sun rain

0.09 0.15 0.06 0.21 0.35 0.14

0.3 0.7 0.3 0.5 0.2

Independence: probability = product of marginals

slide-24
SLIDE 24

Expectations

  • How much should we

expect to earn from

  • ur AAPL stock?

Weather

up same do sun rain

+1 +1

Weather AAPL price

up same do sun rain

0.09 0.15 0.06 0.21 0.35 0.14

slide-25
SLIDE 25

Linearity of expectation

  • Expectation is a

linear function of numbers in bottom table

  • E.g., change -1s to

0s or to -2s Weather

up same do sun rain

+1 +1

Weather AAPL price

up same do sun rain

0.09 0.15 0.06 0.21 0.35 0.14

slide-26
SLIDE 26

Conditional expectation

  • What if we know it’s

sunny? Weather

up same do sun rain

+1 +1

Weather AAPL price

up same do sun rain

0.09 0.15 0.06 0.21 0.35 0.14

slide-27
SLIDE 27

Independence and expectation

  • If X and Y are independent, then:
  • Proof:
slide-28
SLIDE 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
slide-29
SLIDE 29

Variance

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

Exercise: simplify the expression for variance

  • E((X – E(X))2)
slide-31
SLIDE 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
slide-32
SLIDE 32

Covariance

  • cov(X, Y) =
  • Is this a good measure of dependence?
  • Suppose we scale X by 10:
slide-33
SLIDE 33

Correlation

  • Like covariance, but control for variance of

individual r.v.s

  • cor(X, Y) =
slide-34
SLIDE 34

Correlation v. independence

  • Equal probability
  • n each point
  • Are X and Y

independent?

  • Are X and Y

uncorrelated? X Y

!! " ! !# !! !$ " $ ! #

slide-35
SLIDE 35

Correlation v. independence

  • Equal probability
  • n each point
  • Are X and Y

independent?

  • Are X and Y

uncorrelated?

!! " ! !# !! !$ " $ ! #

X Y

slide-36
SLIDE 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

~ ~

slide-37
SLIDE 37

CLT

  • Central limit theorem: for a sample of

size N, population mean , population variance 2, the sample average has

  • mean
  • variance
slide-38
SLIDE 38

CLT proof

  • Assume mu = 0 for simplicity
slide-39
SLIDE 39
  • 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

Bayes Rule

  • Rev. Thomas Bay

1702–1761

slide-40
SLIDE 40

Bayes rule: usual form

  • Take symmetric form
  • P(X | Y) P(Y) = P(Y | X) P(X)
  • Divide by P(Y)
slide-41
SLIDE 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?