Probability Theory Mohamed I. Riffi Islamic University of Gaza
Table of contents 1. Chapter 2 Discrete Distributions The binomial distribution 1
Chapter 2 Discrete Distributions
Bernoulli trials and the Bernoulli distribution A Bernoulli eperiment is a particular type of random eperiment, where there are two possible outcomes, often called success and failure. The probability of success is denoted p, and the probability of failure q or 1 p. A sequence of Bernoulli trials is the repeated performance of a Bernoulli eperiment, in such a way that the success probability remains unchanged (fied) from one trial to trial. Eample 2.4-1 Suppose that the probability of germination of a beet seed is 0.8 and the germination of a seed is called a success. If we plant 10 seeds and can assume that the germination of one seed is independent of the germination of another seed, this would correspond to 10 Bernoulli trials with p = 0.8. 2
Bernoulli trials and the Bernoulli distribution We can describe a Bernoulli eperiment in terms of a random variable X and a probability mass function f () as follows: X (s) = The pmf of X can be written as { 1 if the outcome s is success, 0 if the outcome s is failure. f () = p (1 p) 1, = 0, 1, and we say that X has a Bernoulli distribution. The epected value of X is µ = E(X ) = 1 p (1 p) 1 = (0)(1 p) + (1)(p) = p. =0 3
Bernoulli trials and the Bernoulli distribution The variance of X is σ 2 = Var(X ) = 1 ( µ) 2 p (1 p) 1 =0 = (0 p) 2 (1 p) + (1 p) 2 p = (1 p)[p 2 + (1 p)p] = p(1 p) = pq. It follows that the standard deviation of X is σ = p(1 p) = pq. An observed sequence of n Bernoulli trials will be an n-tuple of zeros and ones, and we often call this collection a random sample of size n from a Bernoulli distribution. 4
The binomial distribution Eample 2.4-4 If five beet seeds are planted in a row, a possible observed sequence would be (1, 0, 1, 0, 1) in which the first, third, and fifth seeds germinated and the other two did not. If the probability of germination is p = 0.8, the probability of this outcome is, assuming independence, (0.8)(0.2)(0.8)(0.2)(0.8) = (0.8) 3 (0.2) 2. In a sequence of n Bernoulli trials, let X be the total number of successes regardless of the order of their occurrences. The possible values of X are 0, 1, 2,..., n. If successes occur, where = 0, 1, 2,..., n, then n failures occur. The number of ways of selecting positions for the successes in the n trials is (n ) n! =!(n )! 5
The binomial distribution Since the trials are independent and since the probabilities of success and failure on each trial are, respectively, p and q = 1 p, the probability of each of these ways is p (1 p) n. Thus, f (), the pmf of X, is ( ) n f () = p (1 p) n, = 0, 1, 2,..., n. The r.v. X is said to have a binomial distribution. A binomial eperiment satisfies the following properties: 1. A Bernoulli (success-failure) eperiment is performed n times, where n is a (non-random) constant. 2. The trials are independent. 3. The probability of success on each trial is a constant p; the probability of failure is q = 1 p. 4. The r.v. X is the number of successes in the n trials. 6
The binomial distribution A binomial dist. will be denoted by the symbol b(n, p), and we say that the distribution of X is b(n, p) and write X b(n, p). The constants n and p are called the parameters of the binomial dist. Eample 2.4-7 In Eample 2.4-1, the number X of seeds that germinate in n = 10 independent trials is b(10, 0.8); that is, f () = ( 10 ) (0.8) (0.2) 10, = 0, 1, 2,..., 10. P(X 8) = 1 P(X = 9) P(X = 10) P(X 6) = = 1 10(0.8) 9 (0.2) (0.8) 10 = 0.6242. 6 =0 ( ) 10 (0.8) (0.2) 10 = 0.1209 7
The cumulative distribution function The cumulative distribution function (cdf) of X is defined by F () = P(X ), < <. If X b(n, p), then ( ) n F () = (p) y (1 p) n y. y y=0 Eample 2.4-7 cont. For the binomial distribution given in Eample 2.4-7, namely, X b(10, 0.8), the distribution function is defined by ( ) 10 F () = P(X ) = (0.8) y (0.2) 10 y, y y=0 where is the greatest integer in. 8
The cumulative distribution function Eample 2.4-9 Suppose that 65% of the American public approve the way the president is handling the job. Take a random sample of n = 8 Americans and let Y equal the number who give approval. Then, the distribution of Y is b(8, 0.65). Find P(Y 6). Solution P(Y 6) = = 8 ( 8 =6 ( ) 8 (0.65) 6 (0.35) 2 + 6 ) (0.65) (1 0.65) 8 ( ) 8 (0.65) 7 (0.35) 1 + 7 = 0.2587 + 0.1373 + 0.0319 = 0.4278 ( ) 8 (0.65) 8 (0.35) 0 8 9
The binomial distribution If n is a positive integer, then =0 (a + b) n = n =0 ( ) n b a n. If we let b = p and a = 1 p, then n ( ) n (a + b) n = p (1 p) n = [1 p + p)] n = 1, a result that had to follow from the fact that f () is a pmf. The mgf of X b(n, p) is n ( ) n M(t) = E[e t ] = e t p (1 p) n =0 n ( ) n = (pe t ) (1 p) n =0 = [ (1 p) + pe t] n, < t < 10
The binomial distribution The first two derivatives of M(t) are M (t) = n [ (1 p) + pe t] n 1 (pe t ) M (t) = n(n 1) [ (1 p) + pe t] n 2 (pe t ) 2 + n [ (1 p) + pe t] n 1 (pe t ). Thus, µ = E(X ) = M (0) = np and σ 2 = E(X 2 ) [E(X )] 2 = M (0) [M (0)] 2 = n(n 1)p 2 + np (np) 2 = np(1 p) In the special case when n = 1, X has a Bernoulli distribution and M(t) = (1 p) + pe t for all real values of t, µ = p, and σ 2 = p(1 p). 11
The cumulative distribution function Eample 2.4-10 Suppose that observation over a long period of time has disclosed that, on the average, 1 out of 10 items produced by a process is defective. Select five items independently from the production line and test them. Let X denote the number of defective items among the n = 5 items. Then X is b(5, 0.1). Furthermore, E(X ) = 5(0.1) = 0.5, Var(X ) = 5(0.1)(0.9) = 0.45. For eample, the probability of observing at most one defective item is P(X 1) = P(X = 0) + P(X = 1) ( ) ( ) 5 5 = (0.1) 0 (0.9) 5 + (0.1) 1 (0.9) 4 0 1 = 0.9185 12
The cumulative distribution function Suppose that an urn contains N 1 success balls and N 2 failure balls. Let p = N 1 /(N 1 + N 2 ), and let X equal the number of success balls in a random sample of size n that is taken from this urn. If the sampling is done one at a time with replacement, then the distribution of X is b(n, p); if the sampling is done without replacement, then X has a hypergeometric distribution with pmf ) f () = ( N1 )( N2 n ( N1+N 2 ) n where is a nonnegative integer such that n, N 1, and n N 2. When N 1 + N 2 is large and n is relatively small, it makes little difference if the sampling is done with or without replacement. HW-9: 2.4-1, 2.4-2, 2.4-3, 2.4-4, 2.4-5, 2.4-7, 2.4-9, 2.4-19, 2.4-20 13