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
The Discrete Uniform Distribution The Bernoulli Distribution The Binomial Distribution The Negative Binomial and Geometric Di Lecture 6: Special Probability Distributions Assist. Prof. Dr. Emel YAVUZ DUMAN MCB1007 Introduction to Probability and Statistics İstanbul Kültür University The Discrete Uniform Distribution The Bernoulli Distribution The Binomial Distribution The Negative Binomial and Geometric Di Outline 1 The Discrete Uniform Distribution 2 The Bernoulli Distribution 3 The Binomial Distribution 4 The Negative Binomial and Geometric Distribution The Discrete Uniform Distribution The Bernoulli Distribution The Binomial Distribution The Negative Binomial and Geometric Di Outline 1 The Discrete Uniform Distribution 2 The Bernoulli Distribution 3 The Binomial Distribution 4 The Negative Binomial and Geometric Distribution The Discrete Uniform Distribution The Bernoulli Distribution The Binomial Distribution The Negative Binomial and Geometric Di The Discrete Uniform Distribution If a random variable can take on k different values with equal probability, we say that it has a discrete uniform distribution; symbolically, Definition 1 A random variable X has a discrete uniform distribution and it is referred to as a discrete uniform random variable if and only if its probability distribution is given by f (x) = 1 for x = x1 , x2 , · · · , xk k where xi = xj when i = j. The Discrete Uniform Distribution The Bernoulli Distribution The Binomial Distribution The Negative Binomial and Geometric Di The mean and the variance of this distribution are Mean: μ = E [X ] = k i =1 xi f (xi ) = 1/k k xi · i =1 x1 + x2 + · · · + xk 1 = , k k Variance: σ = E [(X − μ) ] = 2 2 k i =1 (xi − μ)2 · 1 k (x1 − μ)2 + (x2 − μ)2 + · · · + (xk − μ)2 = k The Discrete Uniform Distribution The Bernoulli Distribution The Binomial Distribution The Negative Binomial and Geometric Di In the special case where xi = i , the discrete uniform distribution becomes f (x) = k1 for x = 1, 2, · · · , k, and in this from it applies, for example, to the number of points we roll with a balanced die. Example 2 If X has the discrete uniform distribution f (x) = 1/k for x = 1, 2, · · · , k, show that k+1 2 ; 2 2 σ = k 12−1 . (a) its mean is μ = (b) its variance is The Discrete Uniform Distribution The Bernoulli Distribution The Binomial Distribution The Negative Binomial and Geometric Di Solution. (a) Mean: μ = E (X ) = k if (x) = i =1 = k(k+1) 2 k = k i· i =1 1 + 2 + ···+ k 1 = k k k +1 . 2 (b) Variance: σ 2 = μ2 − μ2 = E (X 2 ) − [E (X )]2 μ2 2 = E (X ) = = k i =1 k(k+1)(2k+1) 6 2 i f (x) = k i =1 i2 · 12 + 22 + · · · + k 2 1 = k k (k + 1)(2k + 1) , k 6 2 k +1 (k + 1)(2k + 1) k2 − 1 2 σ = − . = 6 2 12 = The Discrete Uniform Distribution The Bernoulli Distribution The Binomial Distribution The Negative Binomial and Geometric Di Example 3 If X has the discrete uniform distribution f (x) = 1/k for x = 1, 2, · · · , k, show that its moment-generating function is given by e t (1 − e kt ) . MX (t) = k(1 − e t ) Also find the mean of this distribution by evaluating limt→0 MX (t), compare the results with that obtained in Example 2. The Discrete Uniform Distribution The Bernoulli Distribution The Binomial Distribution The Negative Binomial and Geometric Di Solution. We know that MX (t) = E (e tX ) = k i =1 e it e t + e 2t + · · · + e kt 1 = . k k On the other hand, since S = e t + e 2t + e 3t + · · · + e (k−1)t + e kt −e t S = −e 2t − e 3t − e 4t − · · · − e kt − e (k+1)t ⇒ S(1 − e t ) = S − e t S = e t − e (k+1)t = e t (1 − e kt ) ⇒ e t (1 − e kt ) S(1 − e t ) t 2t 3t (k−1)t kt = S = e + e + e + · · · + e + e = 1 − et 1 − et thus MX (t) = e t (1 − e kt ) e t + e 2t + · · · + e kt = . k k(1 − e t ) The Discrete Uniform Distribution The Bernoulli Distribution The Binomial Distribution The Negative Binomial and Geometric Di e t + e 2t + · · · + e kt ⇒ k e t + 2e 2t + · · · + ke kt ⇒ MX (t) = k 1 + 2 + ··· + k = μ = lim MX (t) = t→0 k MX (t) = k(k+1) 2 k = k +1 . 2 The Discrete Uniform Distribution The Bernoulli Distribution The Binomial Distribution The Negative Binomial and Geometric Di Outline 1 The Discrete Uniform Distribution 2 The Bernoulli Distribution 3 The Binomial Distribution 4 The Negative Binomial and Geometric Distribution The Discrete Uniform Distribution The Bernoulli Distribution The Binomial Distribution The Negative Binomial and Geometric Di The Bernoulli Distribution If an experiment has two possible outcomes, “success” and “failure” and their probabilities are, respectively, θ and 1 − θ, then the number of successes, 0 or 1, has a Bernoulli distribution; symbolically, Definition 4 A random variable X has a Bernoulli distribution and it is referred to as a Bernoulli random variable if and only if its probability distribution is given by f (x; θ) = θ x (1 − θ)1−x for x = 0, 1. Thus, f (0; θ) = 1 − θ and f (1; θ) = θ are combined into a single formula. Since the Bernoulli distribution is a special case of the Binomial distribution, we shall not discuss it here in any detail. The Discrete Uniform Distribution The Bernoulli Distribution The Binomial Distribution The Negative Binomial and Geometric Di In connection with the Bernoulli distribution, a success may be getting heads with a balanced coin, it may be catching pneumonia, it may be passing (or failing) an examination, and it may be losing a race. We refer to an experiment to which the Bernoulli distribution applies as a Bernoulli trial, or simply a trial, and to sequences of such experiments as repeated trials. Examples. Toss a coin: S = {H, T }. Throw a fair die: S = {face value is a six, face value is not a six }. Sent a message through a network and record whether or not it is received: S = {successful transmission, unsuccessful transmission}. Draw a part from an assembly line and record whether or not it is defective: S = {defective, good}. The Discrete Uniform Distribution The Bernoulli Distribution The Binomial Distribution The Negative Binomial and Geometric Di Example 5 If X has the Bernoulli distribution, show that (a) its mean is μ = θ; (b) its variance is σ 2 = θ(1 − θ). Solution. (a) μ = E (X ) = 1 x=0 xf (x; θ) = 1 xθx (1 − θ)1−x x=0 = 0 · θ0 (1 − θ)1−0 + 1 · θ1 (1 − θ)1−1 = θ (b) μ2 = E (X 2 ) = 1 x=0 x 2 f (x; θ) = 1 x 2 θx (1 − θ)1−x x=0 = 02 · θ0 (1 − θ)1−0 + 12 · θ1 (1 − θ)1−1 = θ ⇒ σ 2 = E (X 2 ) − [E (X )]2 = μ2 − μ2 = θ − θ2 = θ(1 − θ) The Discrete Uniform Distribution The Bernoulli Distribution The Binomial Distribution The Negative Binomial and Geometric Di Example 6 Show that for the Bernoulli distribution μr = θ for r = 1, 2, 3, · · · . Solution. MX (t) = E (e tX ) = e tx f (x; θ) = x=0 1−0 θ (1 − θ) +e t·1 1 1 x=0 e tx θ x (1 − θ)1−x θ (1 − θ)1−1 = 1 − θ + θ · e t tr t2 t3 t + + ··· + + ··· − 1 = 1 + θ(e − 1) = 1 + θ 1 + t + 2! 3! r! 2 3 r t t t = 1 + θt + θ + θ + · · · + θ + · · · ⇒ μr = θ. 2! 3! r! =e t·0 0 1 The Discrete Uniform Distribution The Bernoulli Distribution The Binomial Distribution The Negative Binomial and Geometric Di Outline 1 The Discrete Uniform Distribution 2 The Bernoulli Distribution 3 The Binomial Distribution 4 The Negative Binomial and Geometric Distribution The Discrete Uniform Distribution The Bernoulli Distribution The Binomial Distribution The Negative Binomial and Geometric Di The Binomial Distribution Repeated trials play a very important role in the probability and statistics, especially when the number of trial is fixed, the parameter θ (the probability of a success) is the same for each trial, and the trials are all independent. The theory that we shall discuss in this section has many applications; for instance, it applies if we want to know the probability of getting 5 heads in 12 flips of a coin, the probability that 7 of 10 persons will recover from a tropical disease, or the probability that 35 of 80 persons will respond to a mail-order solicitation. However, this is the case only if each of the 10 persons has the same chance of recovering from the disease and and their recoveries are independent. The Discrete Uniform Distribution The Bernoulli Distribution The Binomial Distribution The Negative Binomial and Geometric Di To derive a formula for the probability of getting “x successes in n trials” under the stated conditions, observe that the probability of getting x successes and n − x failures in a specific order is θ x (1 − θ)n−x . There is one factor θ for each success, one factor 1 − θ for each failure , and the x factors θ and n − x factors 1 − θ are all multiplied together by virtue of the assumption of independence. Since this probability applies to any sequence of n trials in which there are x successes and n − x failures, we have only to count how many sequences of this kind there are and then multiply θ x (1 − θ)n−x by that number. Clearly, number of ways in which n we can select the x trials on which there is to be a success is that the desired probability for “x successes in n x , and it n follows x trials” is x θ (1 − θ)n−x . The Discrete Uniform Distribution The Bernoulli Distribution The Binomial Distribution The Negative Binomial and Geometric Di Let θ be the probability that an event will happen in any single Bernoulli trial (called the probability of success). Then 1 − θ is the probability that the event will fail to happen in any single trial (called the probability of failure). The probability that the event will happen exactly x times in n trials (i.e., successes and n − x failures will occur) is given by the probability function n x b(x; n, θ) = θ (1 − θ)n−x x where the random variable X denotes the number of successes in n trials and x = 0, 1, · · · , n. Definition 7 A random variable X has a binomial distribution and it is referred to as a binomial random variable if and only if its probability distribution is given by n x b(x; n, θ) = θ (1 − θ)n−x for x = 0, 1, 2 · · · , n. x The Discrete Uniform Distribution The Bernoulli Distribution The Binomial Distribution The Negative Binomial and Geometric Di Example 8 Find the probability of getting five heads and seven tails in 12 flips of a balanced coin. Solution. Substituting x = 5, n = 12, and θ = for the binomial distribution, we get 1 b 5; 12, 2 1 2 into the formula 5 12 1 1 12−5 = ≈ 0.19334. 1− 5 2 2 The Discrete Uniform Distribution The Bernoulli Distribution The Binomial Distribution The Negative Binomial and Geometric Di Example 9 Find the probability that 7 of 10 persons will recover form a tropical disease if we can assume independence and the probability is 0.80 that any one of them will recover from the disease. Solution. Substituting x = 7, n = 10, and θ = 0.80 into the formula for the binomial distribution, we get 10 b (7; 10, 0.80) = (0.8)7 (1 − 0.8)10−7 ≈ 0.20133. 7 The Discrete Uniform Distribution The Bernoulli Distribution The Binomial Distribution The Negative Binomial and Geometric Di Example 10 Find the probability that in a family of 4 children there will be 1 at least one boy 2 at least one boy and at least one girl. Solution. 1 Probability of male birth is θ = 1/2 = 0.5. Then P(at least one boy) = 1 − P(no boy) = 1 − b(0; 4, 0.5) 1 15 4 =1− 0.50 0.54−0 = 1 − 4 = . 2 16 0 2 P(at least one boy and girl) = 1 − [P(no boy) + P(no girl)] 4 = 1 − [2 · b(0; 4, 0.5)] = 1 − 2 · 0.50 0.54−0 0 7 1 =1− 2· 4 = . 2 8 The Discrete Uniform Distribution The Bernoulli Distribution The Binomial Distribution The Negative Binomial and Geometric Di Example 11 Out of 2000 families with 4 children each how many would you expect to have 1 at least one boy 2 2 boys 3 1 or 2 girls 4 no girls. Solution. 1) 2000 · 15 16 = 1875. 2) 2000 · 42 212 212 = 750. 3) P(1 or 2 girls) = P(1 girl) + P(2 girls) = 41 12 213 + 42 212 212 = 2000 58 = 1250. 1 1 ⇒ 2000 16 = 125. 4) P(no girls) = 40 210 214 = 16 5 8 ⇒ The Discrete Uniform Distribution The Bernoulli Distribution The Binomial Distribution The Negative Binomial and Geometric Di Theorem 12 The moment-generating function of the binomial distribution is given by MX (t) = [1 + θ(e t − 1)]n . Proof. For a sequence of n binomial trials, define 0 if failure in jth trial Xj = 1 if success in jth trial. Then the Xj are independent and X = X1 + X2 + · · · + Xn . For the moment generating function of Xj , we have MXj (t) = E (e tXj ) = e t·0 (1 − θ) + e t·1 θ = (1 − θ) + e t θ. Since Xj are independent then MX (t) = MX1 (t) · MX2 (t) · · · MXn (t) = ((1 − θ) + e t θ)n or MX (t) = [1 + θ(e t − 1)]n . The Discrete Uniform Distribution The Bernoulli Distribution The Binomial Distribution The Negative Binomial and Geometric Di Theorem 13 The mean and the variance of the binomial distribution are μ = nθ and σ 2 = nθ(1 − θ). Proof. Proceeding as in Theorem 12, we have for j = 1, 2, · · · , n, E (Xj ) = 1 xb(x; n, θ) = 0 · (1 − θ) + 1 · θ = θ. x=0 Var (Xj ) = E [(Xj − θ)2 ] = (0 − θ)2 (1 − θ) + (1 − θ)2 θ = θ 2 − θ 3 + θ − 2θ 2 + θ 3 = θ(1 − θ). μ = E (X ) = E (X1 ) + E (X2 ) + · · · + E (Xn ) = nθ σ 2 = Var (X ) = Var (X1 ) + Var (X2 ) + · · · + Var (Xn ) = nθ(1 − θ). The Discrete Uniform Distribution The Bernoulli Distribution The Binomial Distribution The Negative Binomial and Geometric Di Example 14 In 100 tosses of a fair coin the expected (or mean) number of heads is 1 E (X ) = nθ = 100 · = 50. 2 while the standard deviation is 1 1 1− = 5. σ = nθ(1 − θ) = 100 · 2 2 The Discrete Uniform Distribution The Bernoulli Distribution The Binomial Distribution The Negative Binomial and Geometric Di Example 15 If the probability of a defective bolt is 0.1, find (a) the mean, (b) the standard deviation, for the number of defective bolts in a total of 400 bolts. Solution. (a) Mean: μ = nθ = 400(0.1) = 40, i.e., we can expect 40 bolts to be defective. (b) Variance: σ 2 = nθ(1√− θ) = 400(0.1)(0.9) = 36. Hence, the standard deviation σ = 36 = 6. The Discrete Uniform Distribution The Bernoulli Distribution The Binomial Distribution The Negative Binomial and Geometric Di Outline 1 The Discrete Uniform Distribution 2 The Bernoulli Distribution 3 The Binomial Distribution 4 The Negative Binomial and Geometric Distribution The Discrete Uniform Distribution The Bernoulli Distribution The Binomial Distribution The Negative Binomial and Geometric Di The Negative Binomial and Geometric Distribution In connection with repeated Bernoulli trials, we are sometimes interested in the number of the trial on which the kth success occurs. The negative binomial random variable and distribution are based on an experiment satisfying the following conditions: The experiment consists of x repeated trials. Each trial can result in just two possible outcomes. We call one of these outcomes a success and the other, a failure. The probability of success, denoted by θ, is the same on every trial. The trials are independent. The experiment continues until k successes are observed, where k is specified in advance. The Discrete Uniform Distribution The Bernoulli Distribution The Binomial Distribution The Negative Binomial and Geometric Di In the game of craps, you decide to play until you lose 5 games. You wonder how many games you will play with this termination rule. The probability of losing any one game is 0.5071. The games are a series of independent Bernoulli trials, and the random variable is the number of wins until the fifth loss. This is a situation described by the negative binomial distribution. For the negative binomial distribution the random variable is the number of failures before the kth success is observed. The distribution has two parameters. The parameter θ is the probability of success on any one trial and the parameter k is the number of successes to be observed before the experiment is complete. The geometric distribution is a special case with k equal to 1. The Discrete Uniform Distribution The Bernoulli Distribution The Binomial Distribution The Negative Binomial and Geometric Di If the kth success is to occur on the xth trial, there must be k − 1 successes on the first x − 1 trials, and the probability for this is x − 1 k−1 b(k − 1; x − 1, θ) = θ (1 − θ)(x−1)−(k−1) k −1 x − 1 k−1 = θ (1 − θ)x−k . k −1 The probability of a success on the xth trial is θ, and the probability that the kth success occurs on the xth trial is, therefore x − 1 k−1 θ · b(k − 1; x − 1, θ) = θ θ (1 − θ)x−k k −1 x −1 k = θ (1 − θ)x−k . k −1 The Discrete Uniform Distribution The Bernoulli Distribution The Binomial Distribution The Negative Binomial and Geometric Di Definition 16 A random variable X has negative binomial distribution and it is referred to as a negative random variable if and only if x −1 k ∗ θ (1 − θ)x−k b (x; k, θ) = k −1 for x = k, k + 1, k + 2, · · · . Thus, the number of the trial on which the kth success occurs is a random variable having a negative binomial distribution with the parameter k and θ. In the literature of statistics, negative binomial distributions are also referred to as binomial waiting-time distributions or as Pascal distributions. The Discrete Uniform Distribution The Bernoulli Distribution The Binomial Distribution The Negative Binomial and Geometric Di Example 17 If the probability is 0.40 that a child exposed to a certain contagious disease will catch it, what is the probability that the tent child exposed to the disease will be third to catch it? Solution. Substituting x = 10, k = 3, and θ = 0.40 into the formula for the negative binomial distribution, we get 10 − 1 9 ∗ 3 10−3 0.4 (1 − 0.4) = 0.43 · 0.67 b (10; 3, 0.40) = 3−1 2 9! 0.43 · 0.67 ≈ 0.0645. = 2! · 7! The Discrete Uniform Distribution The Bernoulli Distribution The Binomial Distribution The Negative Binomial and Geometric Di Example 18 Bob is a high school basketball player. He is a 70% free throw shooter. That means his probability of making a free throw is 0.70. During the season, what is the probability that Bob makes his third free throw on his fifth shot? Solution. Substituting x = 5, k = 3, and θ = 0.70 into the formula for the negative binomial distribution, we get 5−1 4 ∗ 3 5−3 0.7 (1 − 0.7) = 0.73 · 0.32 b (5; 3, 0.40) = 3−1 2 4! 0.73 · 0.32 = 0.18522. = 2! · 2! The Discrete Uniform Distribution The Bernoulli Distribution The Binomial Distribution The Negative Binomial and Geometric Di Theorem 19 b ∗ (x; k, θ) = Proof. ∗ b (x; k, θ) = = = = = = k · b(k; x, θ). x x −1 k θ (1 − θ)x−k k −1 (x − 1)! θk (1 − θ)x−k (k − 1)![(x − 1) − (k − 1)]! (x − 1)! θk (1 − θ)x−k (k − 1)!(x − k)! k x(x − 1)! · θk (1 − θ)x−k x k(k − 1)!(x − k)! x! k · θk (1 − θ)x−k x k!(x − k)! x k k k · θ (1 − θ)x−k = · b(k; x, θ). k x x The Discrete Uniform Distribution The Bernoulli Distribution The Binomial Distribution The Negative Binomial and Geometric Di Example 20 Use Theorem 19 to rework Example 17. Solution. Substituting x = 10, k = 3, and θ = 0.40 into the formula of Theorem 19, we get 3 10 3 = 10 3 = 10 3 = 10 b ∗ (10; 3, 0.40) = · b(3; 10, 0.40) 10 · 0.43 (1 − 0.4)10−3 3 10 · 0.43 · 0.67 3 10! · 0.43 · 0.67 ≈ 0.0645. 3! · 7! The Discrete Uniform Distribution The Bernoulli Distribution The Binomial Distribution The Negative Binomial and Geometric Di Theorem 21 The mean and the variance of the negative binomial distribution are k 1 k 2 −1 . μ = and σ = θ θ θ The Discrete Uniform Distribution The Bernoulli Distribution The Binomial Distribution The Negative Binomial and Geometric Di Example 22 A web site contains three identical computer servers. Only one is used to operate the site, and the other two are spares that can be activated in case the primary system fails. The probability of a failure in the primary computer (or any activated spare system) from a request for service is 0.0005. Assuming that each request represents an independent trial, what is the mean number of requests until of all three servers fail? What is the probability that all three servers fail within five requests? The Discrete Uniform Distribution The Bernoulli Distribution The Binomial Distribution The Negative Binomial and Geometric Di Solution. What is the mean number of requests until of all three servers fail? Let X denote the number of requests until all three servers fail, and let X1 , X2 and X3 denote the number of requests before a failure of the first, second, and third servers used, respectively. Now, X = X1 + X2 + X3 . Also, the requests are assumed to comprise independent trials with constant probability θ = 0.0005. Furthermore, a spare server is not effected by the number of requests before it is activated. Therefore, X has a negative binomial distribution with θ = 0.0005 and k = 3. Consequently, μX = E (X ) = 3 k = = 6000 requests. θ 0.0005 The Discrete Uniform Distribution The Bernoulli Distribution The Binomial Distribution The Negative Binomial and Geometric Di What is the probability that all three servers fail within five requests? The probability is P(X ≤ 5) and P(X ≤ 5) = P(X = 3) + P(X = 4) + P(X = 5) = b ∗ (3; 3, 0.0005) + b ∗ (4; 3, 0.0005) + b ∗ (5; 3, 0.0005) 2 = 0.00053 (1 − 0.0005)3−3 2 3 + 0.00053 (1 − 0.0005)4−3 2 4 + 0.00053 (1 − 0.0005)5−3 2 = 1.25 × 10−10 + 3.75 × 10−10 + 7.49 × 10−10 = 1.249 × 10−9 . The Discrete Uniform Distribution The Bernoulli Distribution The Binomial Distribution The Negative Binomial and Geometric Di Example 23 Pat is required to sell candy bars to raise money for the 6th grade field trip. There are thirty houses in the neighborhood, and Pat is not supposed to return home until five candy bars have been sold. So the child goes door to door, selling candy bars. At each house, there is a 0.4 probability of selling one candy bar. What’s the probability of selling the last candy bar at the 11th house? What’s the probability of Pat finishing on or before the 8th house? The Discrete Uniform Distribution The Bernoulli Distribution The Binomial Distribution The Negative Binomial and Geometric Di Solution. What’s the probability of selling the last candy bar at the 11th house? Substituting x = 11, k = 5, and θ = 0.40 into the formula for the negative binomial distribution, we get P(X = 11) = b ∗ (11; 5, 0.4) 11 − 1 = 0.45 (1 − 0.4)11−5 5−1 10 = 0.45 0.66 4 = 0.1003 The Discrete Uniform Distribution The Bernoulli Distribution The Binomial Distribution The Negative Binomial and Geometric Di What’s the probability of Pat finishing on or before the 8th house? P(X ≤ 8) = P(X = 5) + P(X = 6) + P(X = 7) + P(X = 8) = b ∗ (5; 5, 0.4) + b ∗ (6; 5, 0.4) + b ∗ (7; 5, 0.4) + b ∗ (8; 5, 0.4) 6−1 5−1 5 5−5 + 0.45 (1 − 0.4)6−5 = 0.4 (1 − 0.4) 5−1 5−1 7−1 8−1 5 7−5 + 0.4 (1 − 0.4) + 0.45 (1 − 0.4)8−5 5−1 5−1 = 0.01024 + 0.03072 + 0.055296 + 0.0774144 = 0.1736704. The Discrete Uniform Distribution The Bernoulli Distribution The Binomial Distribution The Negative Binomial and Geometric Di Since the negative binomial distribution with k = 1 has many important applications, it is given a spacial name; it is called the geometric distribution. Definition 24 A random variable X has a geometric distribution and it is referred to as a geometric random variable if and only if its probability distribution is given by g (x; θ) = θ(1 − θ)x−1 for x = 1, 2, 3, · · · . The Discrete Uniform Distribution The Bernoulli Distribution The Binomial Distribution The Negative Binomial and Geometric Di Example 25 If the probability is 0.75 that an applicant for a driver’s license will pass the road test on any given try, what is the probability that an applicant will finally pass the test on the fourth try? Solution. Substituting x = 4, and θ = 0.75 into the formula for the geometric distribution, we get g (4; 0.75) = 0.75(1 − 0.75)4−1 = 0.75 · 0.253 = 0.01171875. Of course, this result is based on the assumption that the trials are all independent, and there may be some question here about its validity. The Discrete Uniform Distribution The Bernoulli Distribution The Binomial Distribution The Negative Binomial and Geometric Di Example 26 From past experience it is known that 3% of accounts in a large accounting population are in error. (a) What is the probability that 5 accounts are audited before an account in error is found? (b) What is the probability that the first account in error occurs in the first five accounts audited? Solution. (a) Substituting x = 5, and θ = 0.03 into the formula for the geometric distribution, we get P(X = 5) = P(5th in error)P(1st four correctly stated) = g (5; 0.03) = 0.03(1 − 0.03)5−1 = 0.02656 (b) P(X ≤ 5) = 1 − P(first five are correctly stated) 5 0.975 (1 − 0.97)5−5 = 0.14127. = 1 − b(5; 5, 0.97) = 1 − 5 The Discrete Uniform Distribution The Bernoulli Distribution The Binomial Distribution The Negative Binomial and Geometric Di Theorem 27 The mean and the variance of the geometric distribution are 1−θ 1 1 1 2 −1 = . μ = and σ = θ θ θ θ2 The Discrete Uniform Distribution The Bernoulli Distribution The Binomial Distribution The Negative Binomial and Geometric Di Example 28 A rat must choose between five doors, one of which contains a chocolate. If the rat chooses the wrong door, it is returned to the starting point and chooses again, and continues until it gets the chocolate. Let X be the trial on which the chocolate is found. (a) What is the probability of the rat getting chocolate on the first attempt? 2nd attempt? (b) Find the expected value and variance of X . Solution. (a) Since there are 5 doors θ = 1/5 = 0.20. P(X = 1) = g (1; 0.2) = 0.2(1 − 0.2)1−1 = 0.2. P(X = 2) = g (2; 0.2) = 0.2(1 − 0.2)2−1 = 0.16. (b) 1 1 = = 5. θ 0.2 1−θ 1 − 0.2 = = 20. σ 2 == 2 θ 0.22 μ = E (X ) = The Discrete Uniform Distribution The Bernoulli Distribution The Binomial Distribution The Negative Binomial and Geometric Di Thank You!!!