Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Introduction to Probability Theory ‧31‧ - Preliminaries for Randomized Algorithms Speaker: Chuang-Chieh Lin Advisor: Professor Maw-Shang Chang National Chung Cheng University Dept. CSIE, Computation Theory Laboratory January 25, 2006 Outline • Chapter 3: Discrete random variables – Bernoulli and binomial distributions – Geometric distribution – Negative binomial distribution Computation Theory Lab., Dept. CSIE, CCU, Taiwan 2 Bernoulli trials (伯努利試驗) • A Bernoulli trial is an experiment with two different possible outcomes, labeled success and failure. 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. Computation Theory Lab., Dept. CSIE, CCU, Taiwan 3 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: p x q1 x , for x 0, 1 p X ( x) otherwise 0, Computation Theory Lab., Dept. CSIE, CCU, Taiwan 4 Bernoulli random variable (contd.) • Mean and variance for a Bernoulli random variable X with parameter p: E[ X ] 0 p X (0) 1 p X (1) p E[ X 2 ] X2 E[ X 2 ] (E[ X ]) 2 p p 2 p(1 p) pq Computation Theory Lab., Dept. CSIE, CCU, Taiwan 5 • 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. Computation Theory Lab., Dept. CSIE, CCU, Taiwan 6 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 n y n y p q , pY ( y ) y 0, for y RY . otherwise. where q = 1 – p Computation Theory Lab., Dept. CSIE, CCU, Taiwan 7 • 假設老王買了 10 張刮刮樂彩券。假設每張彩券贏得某個獎項的機會 是1/9,而彩券彼此互相獨立。因此每張彩券可視為一次Bernoulli trial; 若令 X 代表會中獎的彩券張數,則 X 具有 n = 10, p = 1/9 的binomial distribution。 • 則 10 1 p X ( x) x 9 x 10 x 8 9 , x 0,1, 2,,10. • 老王的彩券至少有三張會中獎的機率,便是 10 1 P( X 3) p X ( x) x 3 x 3 x 9 10 10 x 10 x 8 9 Computation Theory Lab., Dept. CSIE, CCU, Taiwan 0.0906 8 Means and variances for binomial random variables n x n x X E[ X ] x p q x 0 x n n 1 x 1 ( n 1) ( x 1) p q np x 1 x 1 np ( p q ) n 1 n np Computation Theory Lab., Dept. CSIE, CCU, Taiwan 9 Means and variances for binomial random variables (contd.) • Since E[ X 2 ] E[ X ( X 1)] E[ X ] E[ X ( X 1)] X we have X2 E[ X ( X 1)] X X2 E[ X ( X 1)] X ( X 1) • n n x n x n! E[ X ( X 1)] x( x 1) p q x( x 1) p x q n x x!( n x)! x 0 x2 x n (n 2)! 2 n(n 1) p p x2 q n x x 2 ( x 2)! ( n x )! n n(n 1) p 2 ( p q ) n 2 n(n 1) p 2 Computation Theory Lab., Dept. CSIE, CCU, Taiwan 10 Means and variances for binomial random variables (contd.) • Thus X2 E[ X ( X 1)] X ( X 1) n(n 1) p 2 np(np 1) np(1 p) npq Computation Theory Lab., Dept. CSIE, CCU, Taiwan 11 • Before introducing the other probability distribution, we have to be familiar to infinite geometric series first. Computation Theory Lab., Dept. CSIE, CCU, Taiwan 12 Infinite geometric series • When | q | < 1, n lim n i q lim i 0 n 1 q n1 1 1 q 1 q d i d 1 q dq i 0 dq 1 q d2 i d 1 q dq i 0 dq (1 q) 2 1 2 ( 1 q ) 2 3 ( 1 q ) Computation Theory Lab., Dept. CSIE, CCU, Taiwan 13 Infinite geometric series (contd.) • Then we will obtain that k i i j j k 1 q q k 1 i k ( 1 q ) i 0 j k • An exercise. Computation Theory Lab., Dept. CSIE, CCU, Taiwan 14 Geometric distribution (幾何分佈) • Let N be the trial number of the first success in a sequence of independent Bernoulli trials, each with parameter p. The probability function for N is pq n 1 , p N ( n) 0, for n RN {1, 2, 3,} otherwise. N is called a geometric random variable with parameter p. Computation Theory Lab., Dept. CSIE, CCU, Taiwan 15 Memoryless property (失憶性) • If N is a geometric random variable with parameter p, then P( N a b | N b) P( N a). where a and b are any positive integers. This is the only discrete probability law to have this memoryless property. Computation Theory Lab., Dept. CSIE, CCU, Taiwan 16 • 舉例來說: • 假設我們現在要搜尋一個得SARS的病患,而當我們找到第一個病患 就停止搜尋。不同的人之間為互相獨立的Bernoulli trials,p = 0.1。 • 假設我們已經檢查了 8 個人,都還沒出現成功的試驗 (找到一個得 SARS的病患),則下一個人是SARS病患的機率並不會因此改變。這 即為失憶性(memoryless property)。 Computation Theory Lab., Dept. CSIE, CCU, Taiwan 17 Means and variances for geometric random variables • n 1 n 1 N E[ N ] n p N (n) n pq n 1 p (1 2q 3q 2 ) 1 p (1 q ) 2 1 p Computation Theory Lab., Dept. CSIE, CCU, Taiwan 18 Means and variances for geometric random variables (contd.) • Since E[ N ( N 1)] n(n 1) p N (n) n 1 n( n 1) pq n 1 n2 pq ( 2 6q 12q 2 ) 2 2q pq 2 3 (1 q ) p We have Var[ N ] E[ N ( N 1)] N ( N 1) 2q 1 1 q 2 1 2 p p p p Computation Theory Lab., Dept. CSIE, CCU, Taiwan 19 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: n 1 r n r p q , n RN {r , r 1, r 2,} p N r (n) r 1 0, otherwise. Computation Theory Lab., Dept. CSIE, CCU, Taiwan 20 Means and variances for negative binomial random variables • N r N r r , p rq 2 p Computation Theory Lab., Dept. CSIE, CCU, Taiwan 21 Means and variances for negative binomial random variables (contd.) n 1 n r 1 r r q rp • E[ N r ] np r 1 (1 q) p nr r 1 r • E[ N r ( N r 1)] n(n 1) nr rp r (n 1 2) nr (n 1)! p r q nr (r 1)!(n r )! n! q nr r!(n r )! n (n 1)! n r r rp q 2rp q n r n r r!( n r )! nr r r n n r n r r (r 1) p q 2rp q n r , where n n 1, r r 1 n r r nr r r pq r p2 r Computation Theory Lab., Dept. CSIE, CCU, Taiwan 22 Means and variances for negative binomial random variables (contd.) • Thus 2 Nr r pq r r r 1 2 p p p rq 2 p Computation Theory Lab., Dept. CSIE, CCU, Taiwan 23 Thank you. 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. Computation Theory Lab., Dept. CSIE, CCU, Taiwan 25