25
Introduction to Probability Theory ‧3-1‧ Speaker: Chuang-Chieh Lin Advisor: Professor Maw-Shang Chang National Chung Cheng University Dept. CSIE, Computation Theory Laboratory January 25, 2006 - Preliminaries for Randomized Algorithms

Introduction to Probability Theory ‧ 3- 1 ‧ Speaker: Chuang-Chieh Lin Advisor: Professor Maw-Shang Chang National Chung Cheng University Dept. CSIE, Computation

Embed Size (px)

Citation preview

Page 1: Introduction to Probability Theory ‧ 3- 1 ‧ Speaker: Chuang-Chieh Lin Advisor: Professor Maw-Shang Chang National Chung Cheng University Dept. CSIE, Computation

Introduction to Probability Theory ‧3-1‧

Speaker: Chuang-Chieh LinAdvisor: Professor Maw-Shang Chang

National Chung Cheng University

Dept. CSIE, Computation Theory Laboratory

January 25, 2006

- Preliminaries for Randomized Algorithms

Page 2: Introduction to Probability Theory ‧ 3- 1 ‧ Speaker: Chuang-Chieh Lin Advisor: Professor Maw-Shang Chang National Chung Cheng University Dept. CSIE, Computation

Computation Theory Lab., Dept. CSIE, CCU, TaiwanComputation Theory Lab., Dept. CSIE, CCU, Taiwan 22

Outline

• Chapter 3: Discrete random variables– Bernoulli and binomial distributions

– Geometric distribution

– Negative binomial distribution

Page 3: Introduction to Probability Theory ‧ 3- 1 ‧ Speaker: Chuang-Chieh Lin Advisor: Professor Maw-Shang Chang National Chung Cheng University Dept. CSIE, Computation

Computation Theory Lab., Dept. CSIE, CCU, TaiwanComputation Theory Lab., Dept. CSIE, CCU, Taiwan 33

Bernoulli trials ( 伯努利試驗 )

• A Bernoulli trial is an experiment with two different possible outcomes, labeled successsuccess and failurefailure. The sample space for a single Bernoulli trial is defined as T = {s, f}, where s represents the outcome success and f represents the outcome failure.

Page 4: Introduction to Probability Theory ‧ 3- 1 ‧ Speaker: Chuang-Chieh Lin Advisor: Professor Maw-Shang Chang National Chung Cheng University Dept. CSIE, Computation

Computation Theory Lab., Dept. CSIE, CCU, TaiwanComputation Theory Lab., Dept. CSIE, CCU, Taiwan 44

Bernoulli random variable

• If an experiment consists of a single Bernoulli trial with parameter p (so that P({s}) = p, and we denote q = 1 – p) and we let X be the number of successes to occur, then X is called a Bernoulli random variable with parameter p.

• Its probability function is very simple:

otherwise ,0

1,0for ,)(

1 xqpxp

xx

X

Page 5: Introduction to Probability Theory ‧ 3- 1 ‧ Speaker: Chuang-Chieh Lin Advisor: Professor Maw-Shang Chang National Chung Cheng University Dept. CSIE, Computation

Computation Theory Lab., Dept. CSIE, CCU, TaiwanComputation Theory Lab., Dept. CSIE, CCU, Taiwan 55

Bernoulli random variable (contd.)

• Mean and variance for a Bernoulli random variable X with parameter p:

pqppppXX

XpppX

X

XX

)1(])[E(][E

][E)1(1)0(0][E2222

2

Page 6: Introduction to Probability Theory ‧ 3- 1 ‧ Speaker: Chuang-Chieh Lin Advisor: Professor Maw-Shang Chang National Chung Cheng University Dept. CSIE, Computation

Computation Theory Lab., Dept. CSIE, CCU, TaiwanComputation Theory Lab., Dept. CSIE, CCU, Taiwan 66

• Many experiments can be modeled as a sequence of independent Bernoulli trials.

• For example,– Ten scratch-off lottery tickets are purchased; each ticket

either will or will not win some prize, where p is the probability of a success occurring for each.

– Each of 100 patients with the same affliction is given medication A ; each patient will either be cured or not, with the same success probability p.

Page 7: Introduction to Probability Theory ‧ 3- 1 ‧ Speaker: Chuang-Chieh Lin Advisor: Professor Maw-Shang Chang National Chung Cheng University Dept. CSIE, Computation

Computation Theory Lab., Dept. CSIE, CCU, TaiwanComputation Theory Lab., Dept. CSIE, CCU, Taiwan 77

Binomial random variable( 二項隨機變數 )

• If Y is the number of success to occur in n repeated, independent Bernoulli trials, each with probability of success p, then Y is a binomial random variable with parameter n and p. The range for Y is RY = {0, 1, 2,…, n}, and its probability function is

where q = 1 – p

otherwise. ,0

.for ,)( Y

yny

Y

Ryqpy

nyp

Page 8: Introduction to Probability Theory ‧ 3- 1 ‧ Speaker: Chuang-Chieh Lin Advisor: Professor Maw-Shang Chang National Chung Cheng University Dept. CSIE, Computation

Computation Theory Lab., Dept. CSIE, CCU, TaiwanComputation Theory Lab., Dept. CSIE, CCU, Taiwan 88

• 假設老王買了 10 張刮刮樂彩券。假設每張彩券贏得某個獎項的機會是 1/9 ,而彩券彼此互相獨立。因此每張彩券可視為一次 Bernoulli trial ;若令 X 代表會中獎的彩券張數,則 X 具有 n = 10, p = 1/9 的binomial distribution 。

• 則

• 老王的彩券至少有三張會中獎的機率,便是

.10,,2,1,0 ,9

8

9

110)(

10

xx

xpxx

X

0906.09

8

9

110)()3(

1010

3

10

3

xx

xxX x

xpXP

Page 9: Introduction to Probability Theory ‧ 3- 1 ‧ Speaker: Chuang-Chieh Lin Advisor: Professor Maw-Shang Chang National Chung Cheng University Dept. CSIE, Computation

Computation Theory Lab., Dept. CSIE, CCU, TaiwanComputation Theory Lab., Dept. CSIE, CCU, Taiwan 99

Means and variances for binomial random variables

np

qpnp

qpx

nnp

qpx

nxX

n

n

x

xnx

n

x

xnxX

)(

1

1

][E

1

1

)1()1(1

0

Page 10: Introduction to Probability Theory ‧ 3- 1 ‧ Speaker: Chuang-Chieh Lin Advisor: Professor Maw-Shang Chang National Chung Cheng University Dept. CSIE, Computation

Computation Theory Lab., Dept. CSIE, CCU, TaiwanComputation Theory Lab., Dept. CSIE, CCU, Taiwan 1010

Means and variances for binomial random variables (contd.)

)1()]1([E)]1([E

have we

)]1([E][E)]1([E][E Since

22

2

XXXXX

X

XXXX

XXXXXX

2

22

2

22

20

)1(

)()1(

)!()!2(

)!2()1(

)!(!

!)1()1()]1([E

pnn

qppnn

qpxnx

npnn

qpxnx

nxxqp

x

nxxXX

n

n

x

xnx

n

x

xnxn

x

xnx

Page 11: Introduction to Probability Theory ‧ 3- 1 ‧ Speaker: Chuang-Chieh Lin Advisor: Professor Maw-Shang Chang National Chung Cheng University Dept. CSIE, Computation

Computation Theory Lab., Dept. CSIE, CCU, TaiwanComputation Theory Lab., Dept. CSIE, CCU, Taiwan 1111

Means and variances for binomial random variables (contd.)

• Thus

npq

pnp

npnppnn

XX XXX

)1(

)1()1(

)1()]1([E2

2

Page 12: Introduction to Probability Theory ‧ 3- 1 ‧ Speaker: Chuang-Chieh Lin Advisor: Professor Maw-Shang Chang National Chung Cheng University Dept. CSIE, Computation

Computation Theory Lab., Dept. CSIE, CCU, TaiwanComputation Theory Lab., Dept. CSIE, CCU, Taiwan 1212

• Before introducing the other probability distribution, we have to be familiar to infinite geometric series first.

Page 13: Introduction to Probability Theory ‧ 3- 1 ‧ Speaker: Chuang-Chieh Lin Advisor: Professor Maw-Shang Chang National Chung Cheng University Dept. CSIE, Computation

Computation Theory Lab., Dept. CSIE, CCU, TaiwanComputation Theory Lab., Dept. CSIE, CCU, Taiwan 1313

Infinite geometric series

• When | q | < 1,

1

1

1

1 limlim

1

0 qq

qq

n

n

n

i

i

n

)1(

1

1

12

0 qqdq

dq

dq

d

i

i

)1(

2

)1(

132

0

2

qqdq

dq

dq

d

i

i

Page 14: Introduction to Probability Theory ‧ 3- 1 ‧ Speaker: Chuang-Chieh Lin Advisor: Professor Maw-Shang Chang National Chung Cheng University Dept. CSIE, Computation

Computation Theory Lab., Dept. CSIE, CCU, TaiwanComputation Theory Lab., Dept. CSIE, CCU, Taiwan 1414

Infinite geometric series (contd.)

• Then we will obtain that

• An exercise.

10 )1(

1

k

kj

kj

i

i

qq

k

jq

i

ik

Page 15: Introduction to Probability Theory ‧ 3- 1 ‧ Speaker: Chuang-Chieh Lin Advisor: Professor Maw-Shang Chang National Chung Cheng University Dept. CSIE, Computation

Computation Theory Lab., Dept. CSIE, CCU, TaiwanComputation Theory Lab., Dept. CSIE, CCU, Taiwan 1515

Geometric distribution ( 幾何分佈 )

• Let N be the trial number of the first successthe first success in a sequence of independent Bernoulli trials, each with parameter p. The probability function for N is

N is called a geometric random variable with parameter p.

otherwise. ,0

},3,2,1{for ,)(

1 Nn

N

Rnpqnp

Page 16: Introduction to Probability Theory ‧ 3- 1 ‧ Speaker: Chuang-Chieh Lin Advisor: Professor Maw-Shang Chang National Chung Cheng University Dept. CSIE, Computation

Computation Theory Lab., Dept. CSIE, CCU, TaiwanComputation Theory Lab., Dept. CSIE, CCU, Taiwan 1616

Memoryless property ( 失憶性 )

• If N is a geometric random variable with parameter p, then

where a and b are any positive integers. This is the only discrete probability law to have this memoryless property.

).()|( aNPbNbaNP

Page 17: Introduction to Probability Theory ‧ 3- 1 ‧ Speaker: Chuang-Chieh Lin Advisor: Professor Maw-Shang Chang National Chung Cheng University Dept. CSIE, Computation

Computation Theory Lab., Dept. CSIE, CCU, TaiwanComputation Theory Lab., Dept. CSIE, CCU, Taiwan 1717

• 舉例來說:

• 假設我們現在要搜尋一個得 SARS 的病患,而當我們找到第一個病患就停止搜尋。不同的人之間為互相獨立的 Bernoulli trials , p = 0.1 。

• 假設我們已經檢查了 8 個人,都還沒出現成功的試驗 ( 找到一個得SARS 的病患 ) ,則下一個人是 SARS 病患的機率並不會因此改變。這即為失憶性 (memoryless property) 。

Page 18: Introduction to Probability Theory ‧ 3- 1 ‧ Speaker: Chuang-Chieh Lin Advisor: Professor Maw-Shang Chang National Chung Cheng University Dept. CSIE, Computation

Computation Theory Lab., Dept. CSIE, CCU, TaiwanComputation Theory Lab., Dept. CSIE, CCU, Taiwan 1818

Means and variances for geometric random variables

p

qp

qqp

pqnnpnNn

n

nNN

1

)1(

1

)321(

)(][E

2

2

1

1

1

Page 19: Introduction to Probability Theory ‧ 3- 1 ‧ Speaker: Chuang-Chieh Lin Advisor: Professor Maw-Shang Chang National Chung Cheng University Dept. CSIE, Computation

Computation Theory Lab., Dept. CSIE, CCU, TaiwanComputation Theory Lab., Dept. CSIE, CCU, Taiwan 1919

Means and variances for geometric random variables (contd.)

• Since

We have

23

2

2

1

1

2

)1(

2

)1262(

)1(

)()1()]1([E

p

q

qpq

qqpq

pqnn

npnnNN

n

n

nN

22 1

112

)1()]1([E][Var

p

q

ppp

q

NNN NN

Page 20: Introduction to Probability Theory ‧ 3- 1 ‧ Speaker: Chuang-Chieh Lin Advisor: Professor Maw-Shang Chang National Chung Cheng University Dept. CSIE, Computation

Computation Theory Lab., Dept. CSIE, CCU, TaiwanComputation Theory Lab., Dept. CSIE, CCU, Taiwan 2020

Negative binomial distribution ( 負二項分佈 )

• Independent Bernoulli trials, each with probability of success p, are performed until the rth success occurs. The number of trials required, Nr , is called a negative binomial random variable with parameter r, p; its probability function is as follows:

otherwise. ,0

},2,1,{ ,1

1)(

rrrRnqpr

nnp N

rnr

Nr

Page 21: Introduction to Probability Theory ‧ 3- 1 ‧ Speaker: Chuang-Chieh Lin Advisor: Professor Maw-Shang Chang National Chung Cheng University Dept. CSIE, Computation

Computation Theory Lab., Dept. CSIE, CCU, TaiwanComputation Theory Lab., Dept. CSIE, CCU, Taiwan 2121

Means and variances for negative binomial random variables

2

,

p

rq

p

r

r

r

N

N

Page 22: Introduction to Probability Theory ‧ 3- 1 ‧ Speaker: Chuang-Chieh Lin Advisor: Professor Maw-Shang Chang National Chung Cheng University Dept. CSIE, Computation

Computation Theory Lab., Dept. CSIE, CCU, TaiwanComputation Theory Lab., Dept. CSIE, CCU, Taiwan 2222

Means and variances for negative binomial random variables (contd.)

p

r

qrpq

r

nnpN

rnr

rrnrr

1)1(

1

1

1][E

2

1,1 where,2)1(

2)!(!

)!1(

)!(!

!)21(

)!()!1(

)!1()1()]1([E

p

qprr

rrnnqr

nrpq

r

nprr

qr

nrpq

rnr

nrp

qrnr

nnrp

qprnr

nnnNN

rn

rnr

rn

rnr

rn

rnr

rn

rnr

rn

rnr

rn

rnrrr

Page 23: Introduction to Probability Theory ‧ 3- 1 ‧ Speaker: Chuang-Chieh Lin Advisor: Professor Maw-Shang Chang National Chung Cheng University Dept. CSIE, Computation

Computation Theory Lab., Dept. CSIE, CCU, TaiwanComputation Theory Lab., Dept. CSIE, CCU, Taiwan 2323

Means and variances for negative binomial random variables (contd.)

• Thus

2

22

1

p

rq

p

r

p

r

p

qprr

rN

Page 24: Introduction to Probability Theory ‧ 3- 1 ‧ Speaker: Chuang-Chieh Lin Advisor: Professor Maw-Shang Chang National Chung Cheng University Dept. CSIE, Computation

Thank you.

Page 25: Introduction to Probability Theory ‧ 3- 1 ‧ Speaker: Chuang-Chieh Lin Advisor: Professor Maw-Shang Chang National Chung Cheng University Dept. CSIE, Computation

Computation Theory Lab., Dept. CSIE, CCU, TaiwanComputation Theory Lab., Dept. CSIE, CCU, Taiwan 2525

References

• [H01] 黃文典教授 , 機率導論講義 , 成大數學系 , 2001.

• [L94] H. J. Larson, Introduction to Probability, Addison-Wesley Advanced Series in Statistics, 1994; 機率學的世界, 鄭惟厚譯, 天下文化出版。

• [M97] Statistics: Concepts and Controversies, David S. Moore, 1997; 統計,讓數字說話, 鄭惟厚譯 , 天下文化出版。

• [MR95] R. Motwani and P. Raghavan, Randomized Algorithms, Cambridge University Press, 1995.