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

probability
SMART_READER_LITE
LIVE PREVIEW

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

Probability 3.1 Discrete Random Variables Basics Anna Karlin Most slides by Alex Tsun Agenda Intro to Discrete Random Variables Probability Mass Functions Cumulative Distribution function Expectation Flipping two coins Random


slide-1
SLIDE 1

Probability

3.1 Discrete Random Variables Basics

Anna Karlin Most slides by Alex Tsun

slide-2
SLIDE 2

Agenda

  • Intro to Discrete Random Variables
  • Probability Mass Functions
  • Cumulative Distribution function
  • Expectation
slide-3
SLIDE 3

Flipping two coins

slide-4
SLIDE 4

Random Variable

slide-5
SLIDE 5

20 balls numbered 1..20

  • Draw a subset of 3 uniformly at random.
  • Let X = maximum of the numbers on the 3 balls.

Isupport

91

111

a

203 b 20

c

18

d F

slide-6
SLIDE 6

Random Variable

slide-7
SLIDE 7

Identify those RVs

a

b

c

d Which cont

Whichhas Range

42,3

a a

b

b

c

4

d

d

slide-8
SLIDE 8

Random Picture

slide-9
SLIDE 9

Flipping two coins

slide-10
SLIDE 10

Flipping two coins

i

slide-11
SLIDE 11

Flipping two coins

slide-12
SLIDE 12

Probability Mass Function (PMF)

slide-13
SLIDE 13

Probability Mass Function (PMF)

slide-14
SLIDE 14

20 balls numbered 1..20

  • Draw a subset of 3 uniformly at random.
  • Let X = maximum of the numbers on the 3 balls.
slide-15
SLIDE 15

Probability Mass Function (PMF)

slide-16
SLIDE 16

20 balls numbered 1..20

  • Draw a subset of 3 uniformly at random.
  • Let X = maximum of the numbers on the 3 balls.
  • Pr (X = 20)
  • Pr (X = 18)

a Kaka

b Ypg

c Ma

d

ag

slide-17
SLIDE 17

Cumulative distribution function(CDF)

The cumulative distribution function (CDF) of a random variable specifies for each possible real number , the probability that , that is

FX(x)

<latexit sha1_base64="sRHOyOvZfuCwr5D5z+nUz+WLjz4=">AB7nicbVDLSgNBEOz1GeMr6tHLYBDiJex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8A8POrIKBGYtHEIuH4SBJGOWkrqhxYkFQ6DPS9c3M7/7SISkEX9QaUzcEA05DShGSkueWb71nOqkBq9gq+rAPiNwUvPMilW35oCrxM5JBeRoeZXfxDhJCRcYak7NlWrNwMCUxI9NSP5EkRniMhqSnKUchkW42P34KT7UygEkdHEF5+rviQyFUqahrztDpEZy2ZuJ/3m9RAWXbkZ5nCjC8WJRkDCoIjhLAg6oIFixVBOEBdW3QjxCAmGl8yrpEOzl1dJp1G3z+qN+/NK8zqPowiOwQmoAhtcgCa4Ay3QBhik4Bm8gjfjyXgx3o2PRWvByGfK4A+Mzx83bZKO</latexit>

X ≤ x

<latexit sha1_base64="v7SPDaFpFd5Ee6fK5tkbtZs9vpE=">AB7nicbVBNS8NAEJ3Ur1q/qh69LBbBU0mqoMeiF48V7Ae0oWy2k3bpZhN2N2IJ/RFePCji1d/jzX/jts1BWx8MPN6bYWZekAiujet+O4W19Y3NreJ2aWd3b/+gfHjU0nGqGDZLGLVCahGwSU2DTcCO4lCGgUC28H4dua3H1FpHsHM0nQj+hQ8pAzaqzU7pCeQPLUL1fcqjsHWSVeTiqQo9Evf/UGMUsjlIYJqnXcxPjZ1QZzgROS71UY0LZmA6xa6mkEWo/m587JWdWGZAwVrakIXP190RGI60nUWA7I2pGetmbif953dSE137GZIalGyxKEwFMTGZ/U4GXCEzYmIJZYrbWwkbUWZsQmVbAje8surpFWrehfV2v1lpX6Tx1GEziFc/DgCupwBw1oAoMxPMrvDmJ8+K8Ox+L1oKTzxzDHzifP3objwE=</latexit>
slide-18
SLIDE 18

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

I

pmf

43

ko

g

L's

slide-19
SLIDE 19

Probability

Alex Tsun Joshua Fan

slide-20
SLIDE 20

Flipping two coins

slide-21
SLIDE 21

Expectation

slide-22
SLIDE 22

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

X

nXHP

w

X123P123

X 132P 132

t X 2B P 2B

tX 321 P321

X231 P231

t X 312 P 312

slide-23
SLIDE 23

Flip a biased coin until get heads (flips independent)

With probability p of coming up heads Keep flipping until the first Heads observed. Let X be the number of flips until done.

  • Pr(X = 1)
  • Pr(X = 2)
  • Pr(X = k)

a pk

b

fl p

k c

tp

p

d p

u p

slide-24
SLIDE 24

Flip a biased coin until get heads (flips independent)

With probability p of coming up heads Keep flipping until the first Heads observed. Let X be the number of flips until done. What is E(X)?

A

x'I

k

  • sx

at

slide-25
SLIDE 25

Flip a biased coin independently

Probability p of coming up heads, n coin flips X: number of Heads observed.

  • Pr(X = k)

a K p

b pkapy

k

c

E a pj

d 2 pkap'T

slide-26
SLIDE 26

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)? A 20

p

a

I

b

4

c

5 d

10

slide-27
SLIDE 27

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-28
SLIDE 28

Flip a Fair coin independently

  • Probability p of coming up heads, n coin flips
  • X: number of Heads observed.
slide-29
SLIDE 29

Probability

3.2 More on Expectation

Alex Tsun

slide-30
SLIDE 30

Agenda

  • Linearity of Expectation (LoE)
  • Law of the Unconscious Statistician (Lotus)
slide-31
SLIDE 31

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-32
SLIDE 32

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-33
SLIDE 33

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-34
SLIDE 34

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-35
SLIDE 35

Linearity of Expectation (LoE)

slide-36
SLIDE 36

Linearity of Expectation (Proof)