Probability and Statistics for Computer Science Can - - PowerPoint PPT Presentation

probability and statistics
SMART_READER_LITE
LIVE PREVIEW

Probability and Statistics for Computer Science Can - - PowerPoint PPT Presentation

Probability and Statistics for Computer Science Can we call the e exci-ng ? e n 1 + 1 e = lim n n Credit:


slide-1
SLIDE 1

ì ¡

Probability ¡and ¡Statistics ¡ for ¡Computer ¡Science ¡ ¡

Can ¡we ¡call ¡ ¡ ¡ ¡ ¡ ¡ ¡the ¡ exci-ng ¡ ¡ ¡ ¡ ¡? ¡

¡

Hongye ¡Liu, ¡Teaching ¡Assistant ¡Prof, ¡CS361, ¡UIUC, ¡10.1.2019 ¡ Credit: ¡wikipedia ¡

e = lim

n→∞

  • 1 + 1

n n

e e

slide-2
SLIDE 2

Last ¡time ¡

✺ Con-nuous ¡Random ¡Variable ¡ ¡ ✺ Useful ¡known ¡discrete ¡

probability ¡distribu-ons ¡

slide-3
SLIDE 3

Midterm ¡exam ¡1 ¡

✺ Time: ¡Oct. ¡10 ¡th, ¡Thurs. ¡2019 ¡ ✺ Place: ¡the ¡same ¡classroom-­‑ ¡ ¡1320 ¡DCL ¡ ✺ Dura-on: ¡75 ¡mins ¡ ✺ Coverage: ¡All ¡course ¡contents ¡upto ¡today’s ¡lecture, ¡and ¡the ¡

HWs ¡No.1-­‑5. ¡ ¡

✺ Notes ¡on ¡one ¡sheet ¡of ¡paper ¡of ¡the ¡size ¡8.5×11inch ¡(both ¡

sides) ¡are ¡permiZed. ¡ ¡

✺ No ¡calculator ¡or ¡other ¡electronic ¡device ¡ ✺ No ¡use ¡of ¡phone ¡

slide-4
SLIDE 4

HW5 ¡is ¡released ¡

slide-5
SLIDE 5

Content ¡

✺ Useful ¡known ¡probability ¡

distribu-ons ¡(II) ¡

✺ Poisson ¡distribu-on ¡ ✺ Uniform ¡con-nuous ¡distribu-on ¡ ✺ Exponen-al ¡distribu-on ¡ ✺ Normal ¡distribu-on ¡& ¡Central ¡Limit ¡Theorem ¡ ✺ Approximate ¡Binomial ¡with ¡Normal ¡

Distribu-on ¡

slide-6
SLIDE 6

Poisson ¡Distribution ¡

slide-7
SLIDE 7

Motivation ¡for ¡a ¡model ¡called ¡ Poisson ¡Distribution ¡ ¡

✺ What’s ¡the ¡probability ¡of ¡the ¡number ¡of ¡

incoming ¡customers ¡(k) ¡in ¡an ¡hour? ¡

✺ It’s ¡widely ¡applicable ¡in ¡physics ¡

¡ ¡ ¡and ¡engineering ¡both ¡for ¡ ¡ ¡ ¡modeling ¡of ¡-me ¡and ¡space. ¡

Simeon ¡D. ¡Poisson ¡ (1781-­‑1840) ¡ Credit: ¡wikipedia ¡

slide-8
SLIDE 8

Poisson ¡Distribution ¡

✺ A ¡discrete ¡random ¡variable ¡X ¡ ¡is ¡called ¡

Poisson ¡with ¡intensity ¡λ ¡(λ>0) ¡if ¡

¡

Simeon ¡D. ¡Poisson ¡ (1781-­‑1840) ¡

P(X = k) = e−λλk k!

for ¡integer ¡ k ≥ 0

λ is the average rate of the event′s occurrence

x ¡

slide-9
SLIDE 9

Poisson ¡Distribution ¡

✺ Poisson ¡distribu-on ¡is ¡a ¡valid ¡pdf ¡for ¡

¡

Simeon ¡D. ¡Poisson ¡ (1781-­‑1840) ¡

P(X = k) = e−λλk k!

for ¡integer ¡ k ≥ 0

λ is the average rate of the event′s occurrence

x ¡

  • i=0

λi i! = eλ ⇒

  • k=0

λke−λ k! = 1

¡ ¡ ¡ ¡ ¡

slide-10
SLIDE 10

Poisson ¡Distribution ¡

✺ Poisson ¡distribu-on ¡is ¡a ¡valid ¡pdf ¡for ¡

¡

Simeon ¡D. ¡Poisson ¡ (1781-­‑1840) ¡

P(X = k) = e−λλk k!

for ¡integer ¡ k ≥ 0

λ is the average rate of the event′s occurrence

x ¡

  • i=0

λi i! = eλ ⇒

  • k=0

λke−λ k! = 1

x ¡

slide-11
SLIDE 11

Expectations ¡of ¡Poisson ¡Distribution ¡

✺ The ¡expected ¡value ¡and ¡the ¡variance ¡are ¡

wonderfully ¡the ¡same! ¡ ¡That ¡is ¡λ ¡! ¡

¡

Simeon ¡D. ¡Poisson ¡ (1781-­‑1840) ¡

P(X = k) = e−λλk k!

for ¡integer ¡ k ≥ 0

E[X] = λ var[X] = λ

x ¡

slide-12
SLIDE 12

Examples ¡of ¡Poisson ¡Distribution ¡

✺ How ¡many ¡calls ¡does ¡a ¡call ¡center ¡get ¡in ¡an ¡hour? ¡ ✺ How ¡many ¡muta-ons ¡occur ¡per ¡100k ¡

¡ ¡ ¡nucleo-des ¡in ¡an ¡DNA ¡strand? ¡

✺ How ¡many ¡independent ¡incidents ¡occur ¡in ¡an ¡

interval? ¡

¡

P(X = k) = e−λλk k!

for ¡integer ¡ k ≥ 0

slide-13
SLIDE 13

Poisson ¡Distribution: ¡call ¡center ¡

✺ If ¡a ¡call ¡center ¡receives ¡10 ¡

calls ¡per ¡hour ¡on ¡average, ¡ what ¡is ¡the ¡probability ¡that ¡it ¡ receives ¡15 ¡calls ¡in ¡a ¡given ¡ hour? ¡ ¡

✺ What ¡is ¡λ ¡here? ¡ ✺ What ¡is ¡P(k=15)? ¡

Credit: ¡wikipedia ¡

slide-14
SLIDE 14

Poisson ¡Distribution: ¡call ¡center ¡

✺ If ¡a ¡call ¡center ¡receives ¡10 ¡

calls ¡per ¡hour ¡on ¡average, ¡ what ¡is ¡the ¡probability ¡that ¡it ¡ receives ¡15 ¡calls ¡in ¡a ¡given ¡ hour? ¡ ¡

✺ What ¡is ¡λ ¡here? ¡10 ¡

For ¡the ¡expected ¡value ¡of ¡ Poisson ¡is ¡λ ¡ ¡ ✺ What ¡is ¡P(k=15)? ¡

Credit: ¡wikipedia ¡

1015e−10 15!

slide-15
SLIDE 15
  • Q. ¡Poisson ¡Distribution: ¡call ¡center ¡

If ¡a ¡call ¡center ¡receives ¡4 ¡ calls ¡per ¡hour ¡on ¡average. ¡ What ¡is ¡intensity ¡λ ¡here ¡ for ¡an ¡hour? ¡

  • A. 1 ¡
  • B. 4 ¡
  • C. 8 ¡

Credit: ¡wikipedia ¡

slide-16
SLIDE 16
slide-17
SLIDE 17
  • Q. ¡Poisson ¡Distribution: ¡call ¡center ¡

If ¡a ¡call ¡center ¡receives ¡4 ¡ calls ¡per ¡hour ¡on ¡average. ¡ What ¡is ¡the ¡intensity ¡λ ¡ here ¡for ¡an ¡hour? ¡

  • A. 1 ¡
  • B. 4 ¡
  • C. 8 ¡

Credit: ¡wikipedia ¡ x ¡

slide-18
SLIDE 18
  • Q. ¡Poisson ¡Distribution: ¡call ¡center ¡

If ¡a ¡call ¡center ¡receives ¡4 ¡ calls ¡per ¡hour ¡on ¡average. ¡ What ¡is ¡probability ¡the ¡ center ¡receives ¡0 ¡calls ¡in ¡ an ¡hour? ¡

  • A. e-­‑4 ¡
  • B. 0.5 ¡
  • C. 0.05 ¡

Credit: ¡wikipedia ¡

slide-19
SLIDE 19
slide-20
SLIDE 20
  • Q. ¡Poisson ¡Distribution: ¡call ¡center ¡

If ¡a ¡call ¡center ¡receives ¡4 ¡ calls ¡per ¡hour ¡on ¡average. ¡ What ¡is ¡probability ¡the ¡ center ¡receives ¡0 ¡calls ¡in ¡ an ¡hour? ¡

  • A. e-­‑4 ¡
  • B. 0.5 ¡
  • C. 0.05 ¡

Credit: ¡wikipedia ¡ x ¡

slide-21
SLIDE 21
  • Q. ¡Poisson ¡Distribution: ¡call ¡center ¡

Credit: ¡wikipedia ¡

✺ Given ¡a ¡call ¡center ¡receives ¡

10 ¡calls ¡per ¡hour ¡on ¡average, ¡ what ¡is ¡the ¡intensity ¡λ ¡of ¡the ¡ distribu-on ¡for ¡calls ¡in ¡Two ¡ hours? ¡ ¡

slide-22
SLIDE 22
  • Q. ¡Poisson ¡Distribution: ¡call ¡center ¡

Credit: ¡wikipedia ¡

✺ Given ¡a ¡call ¡center ¡receives ¡

10 ¡calls ¡per ¡hour ¡on ¡average, ¡ what ¡is ¡the ¡intensity ¡λ ¡of ¡the ¡ distribu-on ¡for ¡calls ¡in ¡Two ¡ hours? ¡ ¡

✺ If ¡we ¡scale ¡the ¡interval, ¡then ¡

the ¡intensity ¡of ¡the ¡ distribu-on ¡scales ¡by ¡the ¡ same ¡amount. ¡ ¡ ¡λ=20 ¡

slide-23
SLIDE 23

Qs ¡for ¡discrete ¡distributions ¡

slide-24
SLIDE 24
  • Q. ¡

✺ A ¡store ¡staff ¡mixed ¡their ¡fuji ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡and ¡gala ¡

apples ¡and ¡they ¡were ¡individually ¡wrapped, ¡so ¡ they ¡are ¡indis-nguishable. ¡Given ¡there ¡are ¡ 70% ¡of ¡fuji, ¡ ¡if ¡I ¡want ¡to ¡know ¡what ¡is ¡the ¡ probability ¡I ¡get ¡7 ¡fuji ¡in ¡20 ¡apples? ¡What ¡is ¡the ¡ distribu-on ¡I ¡should ¡use? ¡

  • A. ¡Bernoulli

¡ ¡ ¡B. ¡Binomial ¡ ¡ ¡ ¡C. ¡Geometric ¡ ¡ ¡ ¡ ¡

  • D. ¡Poisson ¡ ¡ ¡ ¡ ¡

¡ ¡ ¡E. ¡Uniform ¡ ¡

slide-25
SLIDE 25
slide-26
SLIDE 26
  • Q. ¡

✺ A ¡store ¡staff ¡mixed ¡their ¡fuji ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡and ¡gala ¡

apples ¡and ¡they ¡were ¡individually ¡wrapped, ¡so ¡ they ¡are ¡indis-nguishable. ¡Given ¡there ¡are ¡ 70% ¡of ¡fuji, ¡ ¡if ¡I ¡want ¡to ¡know ¡what ¡is ¡the ¡ probability ¡I ¡get ¡7 ¡fuji ¡in ¡20 ¡apples? ¡What ¡is ¡the ¡ distribu-on ¡I ¡should ¡use? ¡

  • A. ¡Bernoulli

¡ ¡ ¡B. ¡Binomial ¡ ¡ ¡ ¡C. ¡Geometric ¡ ¡ ¡ ¡ ¡

  • D. ¡Poisson ¡ ¡ ¡ ¡ ¡

¡ ¡ ¡E. ¡Uniform ¡ ¡

x ¡

slide-27
SLIDE 27
  • Q. ¡

✺ A ¡store ¡staff ¡mixed ¡their ¡fuji ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡and ¡gala ¡

apples ¡and ¡they ¡were ¡individually ¡wrapped, ¡so ¡ they ¡are ¡indis-nguishable. ¡Given ¡there ¡are ¡ 70% ¡of ¡fuji, ¡ ¡if ¡I ¡want ¡to ¡know ¡what ¡is ¡the ¡ probability ¡I ¡get ¡7 ¡fuji ¡in ¡20 ¡apples? ¡What ¡is ¡the ¡ distribu-on ¡I ¡should ¡use? ¡What ¡is ¡the ¡ probability? ¡

slide-28
SLIDE 28
slide-29
SLIDE 29
  • Q. ¡

✺ A ¡store ¡staff ¡mixed ¡their ¡fuji ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡and ¡gala ¡

apples ¡and ¡they ¡were ¡individually ¡wrapped, ¡so ¡ they ¡are ¡indis-nguishable. ¡Given ¡there ¡are ¡ 70% ¡of ¡fuji, ¡ ¡if ¡I ¡want ¡to ¡know ¡what ¡is ¡the ¡ probability ¡I ¡get ¡7 ¡fuji ¡in ¡20 ¡apples? ¡What ¡is ¡the ¡ distribu-on ¡I ¡should ¡use? ¡What ¡is ¡the ¡ probability? ¡

20 7

  • (0.7)7(0.3)13
slide-30
SLIDE 30
  • Q. ¡

✺ A ¡store ¡staff ¡mixed ¡their ¡fuji ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡and ¡gala ¡

apples ¡and ¡they ¡were ¡individually ¡wrapped, ¡so ¡ they ¡are ¡indis-nguishable. ¡Given ¡there ¡are ¡ 70% ¡of ¡fuji, ¡ ¡if ¡I ¡want ¡to ¡know ¡the ¡probability ¡of ¡ picking ¡the ¡first ¡gala ¡on ¡the ¡7th ¡-me ¡(I ¡can ¡put ¡ back ¡aker ¡each ¡pick). ¡What ¡is ¡the ¡distribu-on ¡I ¡ should ¡use? ¡

  • A. ¡Bernoulli

¡ ¡ ¡B. ¡Binomial ¡ ¡ ¡ ¡C. ¡Geometric ¡ ¡ ¡ ¡ ¡

  • D. ¡Poisson ¡ ¡ ¡ ¡ ¡

¡ ¡ ¡E. ¡Uniform ¡

slide-31
SLIDE 31
slide-32
SLIDE 32
  • Q. ¡

✺ A ¡store ¡staff ¡mixed ¡their ¡fuji ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡and ¡gala ¡

apples ¡and ¡they ¡were ¡individually ¡wrapped, ¡so ¡ they ¡are ¡indis-nguishable. ¡Given ¡there ¡are ¡ 70% ¡of ¡fuji, ¡ ¡if ¡I ¡want ¡to ¡know ¡the ¡probability ¡of ¡ picking ¡the ¡first ¡gala ¡on ¡the ¡7th ¡-me ¡(I ¡can ¡put ¡ back ¡aker ¡each ¡pick). ¡What ¡is ¡the ¡distribu-on ¡I ¡ should ¡use? ¡

  • A. ¡Bernoulli

¡ ¡ ¡B. ¡Binomial ¡ ¡ ¡ ¡C. ¡Geometric ¡ ¡ ¡ ¡ ¡

  • D. ¡Poisson ¡ ¡ ¡ ¡ ¡

¡ ¡ ¡E. ¡Uniform ¡

slide-33
SLIDE 33
  • Q. ¡

✺ A ¡store ¡staff ¡mixed ¡their ¡fuji ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡and ¡gala ¡

apples ¡and ¡they ¡were ¡individually ¡wrapped, ¡so ¡ they ¡are ¡indis-nguishable. ¡Given ¡there ¡are ¡ 70% ¡of ¡fuji, ¡ ¡if ¡I ¡want ¡to ¡know ¡the ¡probability ¡of ¡ picking ¡the ¡first ¡gala ¡on ¡the ¡7th ¡-me ¡(I ¡can ¡put ¡ back ¡aker ¡one ¡pick). ¡What’s ¡the ¡probability? ¡ ¡

slide-34
SLIDE 34
  • Q. ¡

✺ A ¡store ¡staff ¡mixed ¡their ¡fuji ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡and ¡gala ¡

apples ¡and ¡they ¡were ¡individually ¡wrapped, ¡so ¡ they ¡are ¡indis-nguishable. ¡Given ¡there ¡are ¡ 70% ¡of ¡fuji, ¡ ¡if ¡I ¡want ¡to ¡know ¡the ¡probability ¡of ¡ picking ¡the ¡first ¡gala ¡on ¡the ¡7th ¡-me ¡(I ¡can ¡put ¡ back ¡aker ¡one ¡pick). ¡What’s ¡the ¡probability? ¡ ¡

(0.7)6(0.3)

slide-35
SLIDE 35
  • Q. ¡

✺ A ¡store ¡staff ¡mixed ¡their ¡fuji ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡and ¡gala ¡

apples ¡and ¡they ¡were ¡individually ¡wrapped, ¡so ¡ they ¡are ¡indis-nguishable. ¡Given ¡there ¡are ¡ 70% ¡of ¡fuji, ¡what’s ¡the ¡average ¡Hmes ¡of ¡ picking ¡to ¡get ¡the ¡first ¡gala? ¡

slide-36
SLIDE 36
  • Q. ¡

✺ A ¡store ¡staff ¡mixed ¡their ¡fuji ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡and ¡gala ¡

apples ¡and ¡they ¡were ¡individually ¡wrapped, ¡so ¡ they ¡are ¡indis-nguishable. ¡Given ¡there ¡are ¡ 70% ¡of ¡fuji, ¡what’s ¡the ¡average ¡Hmes ¡of ¡ picking ¡to ¡get ¡the ¡first ¡gala? ¡

1 0.3

slide-37
SLIDE 37

Review: ¡Probability ¡density ¡function ¡ (pdf) ¡of ¡continuous ¡random ¡variable ¡

✺ For ¡a ¡con-nuous ¡random ¡variable ¡X, ¡the ¡

probability ¡that ¡X=x ¡is ¡essen-ally ¡zero ¡for ¡all ¡ (or ¡most) ¡x, ¡so ¡we ¡can’t ¡define ¡ ¡

✺ Instead, ¡we ¡define ¡the ¡probability ¡density ¡

funcHon ¡(pdf) ¡over ¡an ¡infinitesimally ¡small ¡ interval ¡dx,

✺ For a < b

¡

p(x)dx = P(X ∈ [x, x + dx])

b

a

p(x)dx = P(X ∈ [a, b])

P(X = x)

slide-38
SLIDE 38

Properties ¡of ¡the ¡probability ¡density ¡ function ¡ ¡

✺ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡resembles ¡the ¡probability ¡func-on ¡

  • f ¡discrete ¡random ¡variables ¡in ¡that ¡

✺ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡for ¡all ¡x ✺ The ¡probability ¡of ¡X ¡taking ¡all ¡possible ¡

values ¡is ¡1. ¡

¡

p(x) p(x) ≥ 0

−∞

p(x)dx = 1

slide-39
SLIDE 39

Properties ¡of ¡ ¡the ¡probability ¡density ¡ function ¡ ¡

✺ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡differs ¡from ¡the ¡probability ¡

distribu-on ¡func-on ¡for ¡a ¡discrete ¡ random ¡variable ¡in ¡that ¡

✺ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡is ¡not ¡the ¡probability ¡that ¡X ¡= ¡x ¡ ¡ ✺ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡can ¡exceed ¡1 ¡

¡ ¡

p(x) p(x) p(x)

slide-40
SLIDE 40

Expectation ¡of ¡continuous ¡ variables ¡

✺ Expected ¡value ¡of ¡a ¡con-nuous ¡random ¡

variable ¡X

✺ Expected ¡value ¡of ¡func-on ¡of ¡con-nuous ¡

random ¡variable ¡ ¡

E[X] = ∞

−∞

xp(x)dx E[Y ] = E[f(X)] = ∞

−∞

f(x)p(x)dx

Y = f(X)

x ¡

weight ¡

slide-41
SLIDE 41

Properties ¡of ¡expectation ¡of ¡ continuous ¡random ¡variables ¡

✺ The ¡linearity ¡of ¡expected ¡value ¡is ¡true ¡for ¡

con-nuous ¡random ¡variables.

✺ And ¡the ¡other ¡proper-es ¡that ¡we ¡derived ¡

for ¡variance ¡and ¡covariance ¡also ¡hold ¡for ¡ con-nuous ¡random ¡variable ¡ ¡

slide-42
SLIDE 42

Continuous ¡Uniform ¡Distribution ¡

slide-43
SLIDE 43

Continuous ¡uniform ¡distribution ¡

✺ A ¡con-nuous ¡random ¡variable ¡X ¡is ¡

uniform ¡if ¡ ¡

X

b ¡ 0 ¡ a ¡ 1 ¡ 1 b − a

p(x)

slide-44
SLIDE 44

Continuous ¡uniform ¡distribution ¡

✺ A ¡con-nuous ¡random ¡variable ¡X ¡is ¡

uniform ¡if ¡ ¡

p(x) =

  • 1

b−a

for x ∈ [a, b]

  • therwise

E[X] = a + b 2 & var[X] = (b − a)2 12

X

b ¡ 0 ¡ a ¡ 1 ¡

p(x)

1 b − a

slide-45
SLIDE 45

Continuous ¡uniform ¡distribution ¡

✺ A ¡con-nuous ¡random ¡variable ¡X ¡is ¡

uniform ¡if ¡ ¡

✺ Examples: ¡1) ¡A ¡dart’s ¡posi-on ¡thrown ¡on ¡the ¡

target ¡

p(x) =

  • 1

b−a

for x ∈ [a, b]

  • therwise

E[X] = a + b 2 & var[X] = (b − a)2 12

X

b ¡ 0 ¡ a ¡ 1 ¡

p(x)

1 b − a

slide-46
SLIDE 46

Continuous ¡uniform ¡distribution ¡

✺ A ¡con-nuous ¡random ¡variable ¡X ¡is ¡

uniform ¡if ¡ ¡

✺ Examples: ¡1) ¡A ¡dart’s ¡posi-on ¡thrown ¡on ¡the ¡

target ¡2) ¡Oken ¡associated ¡with ¡random ¡sampling ¡

p(x) =

  • 1

b−a

for x ∈ [a, b]

  • therwise

E[X] = a + b 2 & var[X] = (b − a)2 12

X

b ¡ 0 ¡ a ¡ 1 ¡

p(x)

1 b − a

slide-47
SLIDE 47

Cumulative ¡distribution ¡of ¡ continuous ¡uniform ¡distribution ¡

✺ Cumula-ve ¡distribu-on ¡func-on ¡(CDF) ¡ ¡

¡ ¡of ¡a ¡uniform ¡random ¡variable ¡X is: ¡ ¡ ¡ X

b ¡ 0 ¡ a ¡ 1 ¡

p(x)

1 b − a

X

b ¡ 0 ¡ a ¡

CDF ¡ P(X ≤ x) = x

−∞

p(x)dx

1 ¡

slide-48
SLIDE 48

Exponential ¡Distribution ¡

slide-49
SLIDE 49

Exponential ¡distribution ¡

✺ Common ¡

Model ¡for ¡ wai-ng ¡-me ¡

✺ Associated ¡

with ¡the ¡ Poisson ¡ distribu-on ¡ with ¡the ¡ same ¡λ ¡ ¡

p(x) = λe−λx for x ≥ 0

Credit: ¡wikipedia ¡

slide-50
SLIDE 50

Exponential ¡distribution ¡

✺ A ¡con-nuous ¡random ¡variable ¡X ¡is ¡exponen-al ¡

if ¡it ¡represent ¡the ¡“-me” ¡un-l ¡next ¡incident ¡in ¡ a ¡Poisson ¡distribu-on ¡with ¡intensity ¡λ. ¡Proof ¡ See ¡Morris ¡et ¡al ¡Pg ¡324. ¡

✺ It’s ¡similar ¡to ¡Geometric ¡distribuHon ¡– ¡the ¡

discrete ¡version ¡of ¡wai-ng ¡in ¡queue ¡

✺ Both ¡are ¡memory-­‑less. ¡See ¡Morris ¡et ¡al ¡Pg ¡322 ¡

¡ ¡

p(x) = λe−λx for x ≥ 0

slide-51
SLIDE 51

Exponential ¡distribution ¡

✺ A ¡con-nuous ¡random ¡variable ¡X ¡is ¡exponen-al ¡

if ¡it ¡represent ¡the ¡“-me” ¡un-l ¡next ¡incident ¡in ¡ a ¡Poisson ¡distribu-on ¡with ¡intensity ¡λ. ¡Proof ¡ See ¡Morris ¡et ¡al ¡Pg ¡324. ¡

✺ It’s ¡similar ¡to ¡Geometric ¡distribuHon ¡– ¡the ¡

discrete ¡version ¡of ¡wai-ng ¡in ¡queue ¡ ¡

p(x) = λe−λx for x ≥ 0

slide-52
SLIDE 52

Expectations ¡of ¡Exponential ¡distribution ¡

✺ A ¡con-nuous ¡random ¡variable ¡X ¡is ¡exponen-al ¡

if ¡it ¡represent ¡the ¡“-me” ¡un-l ¡next ¡incident ¡in ¡ a ¡Poisson ¡distribu-on ¡with ¡intensity ¡λ. ¡ ¡

p(x) = λe−λx for x ≥ 0

E[X] = 1 λ & var[X] = 1 λ2

x ¡

slide-53
SLIDE 53

Example ¡of ¡exponential ¡distribution ¡

✺ How ¡long ¡will ¡it ¡take ¡un-l ¡the ¡next ¡call ¡to ¡be ¡

received ¡by ¡a ¡call ¡center? ¡Suppose ¡it’s ¡a ¡ random ¡variable ¡T. ¡If ¡the ¡number ¡of ¡incoming ¡ call ¡is ¡a ¡Poisson ¡distribu-on ¡with ¡intensity ¡λ ¡= ¡ 20 ¡in ¡an ¡hour. ¡What ¡is ¡the ¡expected ¡-me ¡for ¡ T? ¡

slide-54
SLIDE 54

Example ¡of ¡exponential ¡distribution ¡

✺ How ¡long ¡will ¡it ¡take ¡un-l ¡the ¡next ¡call ¡to ¡be ¡

received ¡by ¡a ¡call ¡center? ¡Suppose ¡it’s ¡a ¡ random ¡variable ¡T. ¡If ¡the ¡number ¡of ¡incoming ¡ call ¡is ¡a ¡Poisson ¡distribu-on ¡with ¡intensity ¡λ ¡= ¡ 20 ¡in ¡an ¡hour. ¡What ¡is ¡the ¡expected ¡-me ¡for ¡ T? ¡

E[T] = 1 λ = 1 20

slide-55
SLIDE 55

Q: ¡

✺ A ¡store ¡has ¡a ¡number ¡of ¡customers ¡coming ¡on ¡

  • Sat. ¡that ¡can ¡be ¡modeled ¡as ¡a ¡Poisson ¡

distribu-on. ¡In ¡order ¡to ¡measure ¡the ¡average ¡ rate ¡of ¡customers ¡in ¡the ¡day, ¡the ¡staff ¡ recorded ¡the ¡-me ¡between ¡the ¡arrival ¡of ¡ customers, ¡can ¡he ¡reach ¡the ¡same ¡goal? ¡ ¡A. ¡ ¡Yes ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡B. ¡No ¡

slide-56
SLIDE 56
slide-57
SLIDE 57

Q: ¡

✺ A ¡store ¡has ¡a ¡number ¡of ¡customers ¡coming ¡on ¡

  • Sat. ¡that ¡can ¡be ¡modeled ¡as ¡a ¡Poisson ¡

distribu-on. ¡In ¡order ¡to ¡measure ¡the ¡average ¡ rate ¡of ¡customers ¡in ¡the ¡day, ¡the ¡staff ¡ recorded ¡the ¡-me ¡between ¡the ¡arrival ¡of ¡ customers, ¡can ¡he ¡reach ¡the ¡same ¡goal? ¡ ¡A. ¡ ¡Yes ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡B. ¡No ¡

x ¡

slide-58
SLIDE 58

Normal ¡Distribution ¡

slide-59
SLIDE 59

Normal ¡(Gaussian) ¡distribution ¡

✺ The ¡most ¡famous ¡con-nuous ¡random ¡variable ¡

distribu-on. ¡The ¡probability ¡density ¡is ¡this: ¡ ¡ ¡ ¡ ¡

Carl ¡F. ¡Gauss ¡ (1777-­‑1855) ¡ Credit: ¡wikipedia ¡

p(x) = 1 σ √ 2π exp(−(x − µ)2 2σ2 )

E[X] = µ & var[X] = σ2

slide-60
SLIDE 60

Normal ¡(Gaussian) ¡distribution ¡

✺ The ¡most ¡famous ¡con-nuous ¡random ¡variable ¡

distribu-on. ¡ ¡ ¡ ¡ ¡ p(x) = 1 σ √ 2π exp(−(x − µ)2 2σ2 )

E[X] = µ & var[X] = σ2

? ¡

Carl ¡F. ¡Gauss ¡ (1777-­‑1855) ¡ Credit: ¡wikipedia ¡

slide-61
SLIDE 61

Normal ¡(Gaussian) ¡distribution ¡

✺ The ¡most ¡famous ¡con-nuous ¡random ¡variable ¡

distribu-on. ¡ ¡ ¡ ¡ ¡ p(x) = 1 σ √ 2π exp(−(x − µ)2 2σ2 )

E[X] = µ & var[X] = σ2

? ¡ +∞

−∞

p(x)dx = 1

Carl ¡F. ¡Gauss ¡ (1777-­‑1855) ¡ Credit: ¡wikipedia ¡

slide-62
SLIDE 62

Normal ¡(Gaussian) ¡distribution ¡

✺ A ¡lot ¡of ¡data ¡in ¡nature ¡are ¡approximately ¡

normally ¡distributed, ¡ie. ¡Adult ¡height, ¡etc. ¡ ¡ p(x) = 1 σ √ 2π exp(−(x − µ)2 2σ2 )

E[X] = µ & var[X] = σ2

Carl ¡F. ¡Gauss ¡ (1777-­‑1855) ¡ Credit: ¡wikipedia ¡

slide-63
SLIDE 63

Spread ¡of ¡normal ¡(Gaussian) ¡distributed ¡ data ¡

Credit: ¡ ¡ wikipedia ¡

99.7% ¡ 95% ¡ 68% ¡

slide-64
SLIDE 64

Standard ¡normal ¡distribution ¡

✺ If ¡we ¡standardize ¡the ¡normal ¡distribu-on ¡(by ¡

subtrac-ng ¡μ ¡and ¡dividing ¡by ¡σ), ¡we ¡get ¡a ¡ random ¡variable ¡that ¡has ¡standard ¡normal ¡ distribu-on. ¡ ¡

✺ A ¡con-nuous ¡random ¡variable ¡X ¡is ¡standard ¡

normal ¡if ¡ ¡ ¡ ¡ ¡

p(x) = 1 √ 2π exp(−x2 2 )

slide-65
SLIDE 65

Derivation ¡of ¡standard ¡normal ¡distribution ¡

p(x) = 1 √ 2π exp(−x2 2 )

+∞

−∞

p(x) dx = +∞

−∞

1 σ √ 2π exp(−(x − µ)2 2σ2 ) dx = +∞

−∞

1 σ √ 2π exp(− ˆ x2 2 )σ dˆ x = +∞

−∞

1 √ 2π exp(− ˆ x2 2 ) dˆ x = +∞

−∞

p(ˆ x) dx

Call ¡this ¡standard ¡and ¡omit ¡ using ¡a ¡hat ¡ ˆ x = x − µ σ

slide-66
SLIDE 66
  • Q. ¡What ¡is ¡the ¡mean ¡of ¡standard ¡normal? ¡
  • A. ¡0 ¡
  • B. ¡1 ¡

¡

slide-67
SLIDE 67
slide-68
SLIDE 68
  • Q. ¡What ¡is ¡the ¡mean ¡of ¡standard ¡normal? ¡
  • A. ¡0 ¡
  • B. ¡1 ¡

¡

slide-69
SLIDE 69
slide-70
SLIDE 70
  • Q. ¡What ¡is ¡the ¡standard ¡deviation ¡of ¡

standard ¡normal? ¡

  • A. ¡0 ¡
  • B. ¡1 ¡

¡

slide-71
SLIDE 71
  • Q. ¡What ¡is ¡the ¡standard ¡deviation ¡of ¡

standard ¡normal? ¡

  • A. ¡0 ¡
  • B. ¡1 ¡

¡

slide-72
SLIDE 72

Standard ¡normal ¡distribution ¡

✺ If ¡we ¡standardize ¡the ¡normal ¡distribu-on ¡(by ¡

subtrac-ng ¡μ ¡and ¡dividing ¡by ¡σ), ¡we ¡get ¡a ¡ random ¡variable ¡that ¡has ¡standard ¡normal ¡ distribu-on. ¡ ¡

✺ A ¡con-nuous ¡random ¡variable ¡X ¡is ¡standard ¡

normal ¡if ¡ ¡ ¡ ¡ ¡

p(x) = 1 √ 2π exp(−x2 2 )

E[X] = 0 & var[X] = 1

slide-73
SLIDE 73

Another ¡way ¡to ¡check ¡the ¡spread ¡of ¡ normal ¡distributed ¡data ¡

✺ Frac-on ¡of ¡normal ¡data ¡within ¡1 ¡standard ¡

devia-on ¡from ¡the ¡mean. ¡ ¡

✺ Frac-on ¡of ¡normal ¡data ¡within ¡k ¡standard ¡

devia-ons ¡from ¡the ¡mean. ¡

1 √ 2π 1

−1

exp(−x2 2 )dx ≃ 0.68

1 √ 2π k

−k

exp(−x2 2 )dx

slide-74
SLIDE 74

Using ¡the ¡standard ¡normal’s ¡table ¡to ¡calculate ¡for ¡ a ¡normal ¡distribution’s ¡probability ¡

✺ If ¡X ¡~ ¡N ¡(μ=3, ¡σ2 ¡=16) ¡(normal ¡distribu-on) ¡

¡

P(X ≤ 4) = P(X − 3 4 ≤ 4 − 3 4 ) = CDF(0.25)

slide-75
SLIDE 75
  • Q. ¡Is ¡the ¡table ¡with ¡only ¡positive ¡x ¡

values ¡enough? ¡

  • A. Yes ¡ ¡ ¡ ¡ ¡ ¡ ¡B. ¡ ¡No. ¡
slide-76
SLIDE 76
slide-77
SLIDE 77
  • Q. ¡Is ¡the ¡table ¡with ¡only ¡positive ¡x ¡

values ¡enough? ¡

  • A. Yes ¡ ¡ ¡ ¡ ¡ ¡ ¡B. ¡ ¡No. ¡

x ¡

slide-78
SLIDE 78

Central ¡limit ¡theorem ¡(CLT) ¡

✺ The ¡distribu-on ¡of ¡the ¡sum ¡of ¡N ¡independent ¡

iden-cal ¡(IID) ¡random ¡variables ¡tends ¡toward ¡a ¡ normal ¡distribu-on ¡as ¡N ¡ ¡ ¡

✺ Even ¡when ¡the ¡component ¡random ¡variables ¡

are ¡not ¡exactly ¡IID, ¡the ¡result ¡is ¡approximately ¡ true ¡and ¡very ¡useful ¡in ¡prac-ce ¡

slide-79
SLIDE 79

Central ¡limit ¡theorem ¡(CLT) ¡

✺ CLT ¡helps ¡explain ¡the ¡prevalence ¡of ¡normal ¡

distribu-ons ¡in ¡nature ¡

✺ A ¡binomial ¡random ¡variable ¡tends ¡toward ¡a ¡

normal ¡distribu-on ¡when ¡N ¡is ¡large ¡due ¡to ¡the ¡ fact ¡it ¡is ¡the ¡sum ¡of ¡IID ¡Bernoulli ¡random ¡ variables ¡

slide-80
SLIDE 80

Binomial ¡approximation ¡with ¡Normal ¡

  • ● ● ●
  • ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

10 20 30 40 0.00 0.05 0.10 0.15 0.20

Binomial

k probability

  • ● ● ● ● ● ● ● ●
  • ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●
  • ● ● ● ● ● ● ● ● ● ● ● ●
  • ● ● ● ● ● ● ● ● ● ● ● ●

n=20,p=0.5 n=20,p=0.7 n=40,p=0.5

¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡

Binomial ¡distribu-on ¡

μ ¡= ¡20, ¡ ¡ ¡σ2 ¡= ¡10 ¡ n= ¡40, ¡p=0.5 ¡

  • ● ● ● ● ● ● ● ● ● ● ● ●
  • ● ● ● ● ● ● ● ● ● ● ● ●

10 20 30 40 0.00 0.05 0.10 0.15 0.20

Normal

k probability

¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡

Approxima-on ¡with ¡Normal ¡

slide-81
SLIDE 81

Binomial ¡approximation ¡with ¡Normal ¡

E[k] = np = 40 · 0.5 = 20 P(10 ≤ k ≤ 25) =

25

  • k=10

40 k

  • 0.5k0.540−k

=

25

  • k=10

40 k

  • 0.540 ≃ 0.96

std[k] =

  • np(1 − p)

= √ 40 · 0.5 · 0.5 = √ 10 ✺ Let ¡k ¡be ¡the ¡number ¡of ¡heads ¡appeared ¡in ¡40 ¡

tosses ¡of ¡fair ¡coin ¡

✺ Goal ¡is ¡to ¡es-mate ¡the ¡following ¡with ¡normal ¡

slide-82
SLIDE 82

Binomial ¡approximation ¡with ¡Normal ¡

P(10 ≤ k ≤ 25) ≃ 1 σ √ 2π 25

10

exp(−(x − µ)2 2σ2 )dx = 1 √ 2π

  • 25−20

3.16 10−20 3.16

exp(−x2 2 )dx ≃ 0.94

✺ Use ¡the ¡same ¡mean ¡and ¡standard ¡devia-on ¡of ¡

the ¡original ¡binomial ¡distribu-on. ¡

✺ Then ¡standardize ¡the ¡normal ¡

σ = √ 10 ≃ 3.16 µ = 20

slide-83
SLIDE 83

Assignments ¡

✺ Finish ¡Chapter ¡5 ¡of ¡the ¡textbook ¡ ✺ Next ¡-me: ¡ ¡Sta-s-cal ¡Inference, ¡

popula-on, ¡sample ¡and ¡confidence ¡ interval ¡

¡

slide-84
SLIDE 84

Additional ¡References ¡

✺ Peter ¡Dalgaard ¡"Introductory ¡Sta-s-cs" ¡

with ¡R ¡

✺ Charles ¡M. ¡Grinstead ¡and ¡J. ¡Laurie ¡Snell ¡

"Introduc-on ¡to ¡Probability” ¡ ¡

✺ Morris ¡H. ¡Degroot ¡and ¡Mark ¡J. ¡Schervish ¡

"Probability ¡and ¡Sta-s-cs” ¡

slide-85
SLIDE 85

Acknowledgement ¡

Thank You!