Probability 3.1 Discrete Random Variables Basics 2 Anna Karlin - - PowerPoint PPT Presentation

probability
SMART_READER_LITE
LIVE PREVIEW

Probability 3.1 Discrete Random Variables Basics 2 Anna Karlin - - PowerPoint PPT Presentation

Probability 3.1 Discrete Random Variables Basics 2 Anna Karlin Most slides by Alex Tsun Agenda Recap on rvs Expectation Linearity of Expectation (LoE) Law of the Unconscious Statistician (Lotus) Random Variable Probability


slide-1
SLIDE 1

Probability

3.1 Discrete Random Variables Basics

Anna Karlin Most slides by Alex Tsun

2

slide-2
SLIDE 2

Agenda

  • Recap on rvs
  • Expectation
  • Linearity of Expectation (LoE)
  • Law of the Unconscious Statistician (Lotus)
slide-3
SLIDE 3

Random Variable

slide-4
SLIDE 4

Probability Mass Function (PMF)

slide-5
SLIDE 5

Homeworks of 3 students returned randomly

  • Each permutation equally likely
  • X: # people who get their own homework

Prob Outcome w X(w) 1/6 1 2 3 3 1/6 1 3 2 1 1/6 2 1 3 1 1/6 2 3 1 1/6 3 1 2 1/6 3 2 1 1

were

Hw

r

Ax

231

312 132

7

213

I 321

73 123

PMI

CD

qPxM

t F cxkPr Xex

slide-6
SLIDE 6

Expectation

slide-7
SLIDE 7

Homeworks of 3 students returned randomly

  • Each permutation equally likely
  • X: # people who get their own homework
  • What is E(X)?

Prob Outcome w X(w) 1/6 1 2 3 3 1/6 1 3 2 1 1/6 2 1 3 1 1/6 2 3 1 1/6 3 1 2 1/6 3 2 1 1

r

PMI

23

NX

E

k o

go

plH

ta

213

1

wise

321

73

123

F X

pCk

O zt

to'zt3 to

Hw Pfw

wer

slide-8
SLIDE 8

Repeated coin flipping

Flip a biased coin with probability p of coming up Heads n

  • times. Each flip independent of all others.

X is number of Heads. What is E(X)?

P X k7 p Ckf

EIxt E.d.FI

dy

pii.n

E

pIPogqyu

p5

n 5

pram

1417410445

HTTHTT

slide-9
SLIDE 9

Repeated coin flipping

Flip a biased coin with probability p of coming up Heads n times. X is number of Heads. What is E(X)?

slide-10
SLIDE 10

Linearity of Expectation (Idea)

Let’s say you and your friend sell fish for a living.

  • Every day you catch X fish, with E[X] = 3.
  • Every day your friend catches Y fish, with E[Y] = 7.

how many fish do the two of you bring in (Z = X + Y) on an average day? E[Z] = E[X + Y] = e[X] + E[Y] = 3 + 7 = 10 You can sell each fish for $5 at a store, but you need to pay $20 in rent. How much profit do you expect to make? E[5Z - 20] = 5E[Z] - 20 = 5 x 10 - 20 = 30

F X

1 ELY

3

7

10

slide-11
SLIDE 11

Linearity of Expectation (Idea)

Let’s say you and your friend sell fish for a living.

  • Every day you catch X fish, with E[X] = 3.
  • Every day your friend catches Y fish, with E[Y] = 7.

how many fish do the two of you bring in (Z = X + Y) on an average day? E[Z] = E[X + Y] = You can sell each fish for $5 at a store, but you need to pay $20 in rent. How much profit do you expect to make? E[5Z - 20] = 5E[Z] - 20 = 5 x 10 - 20 = 30

slide-12
SLIDE 12

Linearity of Expectation (Idea)

Let’s say you and your friend sell fish for a living.

  • Every day you catch X fish, with E[X] = 3.
  • Every day your friend catches Y fish, with E[Y] = 7.

how many fish do the two of you bring in (Z = X + Y) on an average day? E[Z] = E[X + Y] = e[X] + E[Y] = 3 + 7 = 10 You can sell each fish for $5 at a store, but you need to pay $20 in rent. How much profit do you expect to make? E[5Z - 20] = 5E[Z] - 20 = 5 x 10 - 20 = 30

SECY

20

5

lo

20

30

slide-13
SLIDE 13

Linearity of Expectation (Idea)

Let’s say you and your friend sell fish for a living.

  • Every day you catch X fish, with E[X] = 3.
  • Every day your friend catches Y fish, with E[Y] = 7.

how many fish do the two of you bring in (Z = X + Y) on an average day? E[Z] = E[X + Y] = e[X] + E[Y] = 3 + 7 = 10 You can sell each fish for $5 at a store, but you need to pay $20 in rent. How much profit do you expect to make? E[5Z - 20] = 5E[Z] - 20 = 5 x 10 - 20 = 30

slide-14
SLIDE 14

Linearity of Expectation (LoE)

i

slide-15
SLIDE 15

Linearity of Expectation (Proof)

slide-16
SLIDE 16

Corollary: linearity for sum of lots of r.v.s

E(X1 + X2 + . . . + Xn) = E(X1) + E(X2) + . . . + E(Xn)

<latexit sha1_base64="CxIQlQmNr6yr2qKRf1V6LcRsARQ=">ACKHicbVBdS8MwFE39nPOr6qMvwSGsCKOdgr6IQxF8nOC2wlZKmVbWJqWJBVG2c/xb/i4gie/WXmHZ7mJsXEs4951ySe4KYUalse2KsrK6tb2wWtorbO7t7+bBYVNGicCkgSMWCTdAkjDKSUNRxYgbC4LCgJFWMLzL9NYzEZJG/EmNYuKFqM9pj2KkNOWbN/dl13fgGXT9qr47rBspmbfcgte5aOk2A1VozTsyilu+WbIrdl5wGTgzUAKzqvmR6cb4SQkXGpGw7dqy8FAlFMSPjYieRJEZ4iPqkrSFHIZFemi86hqea6cJeJPThCubs/ESKQilHYaCdIVIDuahl5H9aO1G9Ky+lPE4U4Xj6UC9hUEUwSw12qSBYsZEGCAuq/wrxAmElc62qENwFldeBs1qxTmvVB8vSrXbWRwFcAxOQBk4BLUwAOogwbA4AW8gU/wZbwa78a3MZlaV4zZzBH4U8bPL02Kn2w=</latexit>

Proof by induction!

slide-17
SLIDE 17

Homeworks of students returned randomly

  • Each permutation equally likely
  • X: # people who get their own homework
  • What is E(X) when there are n students?

Prob Outcome w X 1/6 1 2 3 3 1/6 1 3 2 1 1/6 2 1 3 1 1/6 2 3 1 1/6 3 1 2 1/6 3 2 1 1

EH

EEkPCx

X X 2

3

II

Xi

is EtE e

I

O

  • therwise

O O

I

O

O

O

O

O

O

I

X

tX

F Xi

O prfxi

  • tzprlx.at

F xt ECX.tlatXs

Pr Xi 1

I

E X

tE XDtEH3

slide-18
SLIDE 18

Indicator random variable

  • For any event A, can define the indicator random variable

for A

O Prf E H PRCA

F XA

prfA

Xi

Ai event that

studenti

got

  • wn

HW

back

slide-19
SLIDE 19

Computing complicated expectations

  • Often boils down to finding the right way to decompose

the random variable into simple random variables (often indicator random variables) and then applying linearity

  • f expectation.
slide-20
SLIDE 20

Repeated coin flipping

Flip a biased coin with probability p of coming up Heads n times. X is number of Heads. What is E(X)?

slide-21
SLIDE 21

Repeated coin flipping

Flip a biased coin with probability p of coming up Heads n times. X is number of Heads. What is E(X)?

n

times independently

X

X that

tXn

Sd

ng

Ind

T

Eui Pr inflipisA

p

Xi

I

Y

n

Pds

  • therwise

F X

_E X that.tl

n

ECXDtECxa

t

tECXn

p

p

p

np

slide-22
SLIDE 22

Pairs with same birthday

  • In a class of m students, on average how many pairs of

people have the same birthday?

I

m

d

365

euhstudent

uniform samplespace

indep

hasrandom

bday

X

pairs of

peoplewith same

bday

F X

E

k Prix_k

k o

IT

1,2

m

namesof

people

Xii

I

EKE Eas

ki

are snm s

same

bday

  • w

IEDxt EEE.gl

ii

p

345 127345

E j Prf

students students

havesambday

E prfshdntnistafdubdaydahbdayondayl

3

GS

65

6503165

ITS

slide-23
SLIDE 23

Rotating the table

n people are sitting around a circular table. There is a nametag in each place Nobody is sitting in front of their own nametag. Rotate the table by a random number k of positions between 1 and n-1 (equally likely). X is the number of people that end up front of their own nametag. What is E(X)?

F

G

I

B

F B

E

G

C

A

ra

D

t

X

X tXat

tX

EHHEH.lt

x4Xi

YingsgyEginatum's t

t

E Xn O

  • w

ECXif prfpusmiwp.ee'Entytheanae

IF

slide-24
SLIDE 24

r

Ux

231 312

132

213

I 321

7 3

123