Discrete Random Variables and Probability Distributions MATH30-6 Probability and Statistics Objectives At the end of the lesson, the students are expected to • Determine probabilities from the probability mass functions and the reverse; • Determine probabilities from cumulative distribution functions and cumulative distribution functions from probability mass functions, and the reverse; • Calculate the means and variances for discrete random variables; • Understand the assumptions for some common discrete probability distributions; Objectives At the end of the lesson, the students are expected to • Select an appropriate discrete probability distribution to calculate probabilities in specific applications; and • Calculate probabilities, determine means and variances for some common discrete probability distributions. Probability Mass Function For a discrete random variable X with possible values π₯1 , π₯2 , … , π₯π , a probability mass function is a function such that (1) π π₯π ≥ 0 (2) ππ=1 π π₯π = 1 (3) π π₯π = π π = π₯π (3-1) Probability Mass Function Examples: 3-4/68 Digital Channel There is a chance that a bit transmitted through a digital transmission channel is received in error. Let X equal the number of bits in error in the next four bits transmitted. The possible values for X are {0, 1, 2, 3, 4}. Based on a model for errors that is presented in the following section, probabilities for these values will be determined. Suppose that the probabilities are π π = 0 = 0.6561 π π = 1 = 0.2916 π π = 2 = 0.0486 π π = 3 = 0.0036 π π = 4 = 0.0001 Probability Mass Function The probability distribution of X is specified by the possible values along with the probability of each. A graphical description of the probability distribution of X is shown on Fig. 3-1. Practical Interpretation: A random experiment can often be summarized with a random variable and its distribution. The details of the sample space can often be omitted. Probability Mass Function Probability Mass Function 3-5/69 Wafer Contamination Let the random variable X denote the number of semiconductor wafers that need to be analyzed in order to detect a large particle of contamination. Assume that the probability that a wafer contains a large particle is 0.01 and that the wafers are independent. Determine the probability distribution of X. Probability Mass Function 3-14/69 The sample space of a random experiment is {a, b, c, d, e, f}, and each outcome is equally likely. A random variable is defined as follows: outcome x a 0 Determine the probability probability mass function probabilities: (a) π π = 2 (b) π (c) π π > 3 (d) π (e) π π = 0 or π = 2 b 0 c 1.5 d 1.5 e 2 f 3 mass function of X. Use the to determine the following 0.6 < π < 2.7 0≤π<2 Probability Mass Function For Exercises 3-15 to 3-18, verify that the following functions are probability mass functions, and determine the requested probabilities. 3-15/70 x β2 β1 0 1 2 f(x) 1/8 2/8 2/8 2/8 1/8 (a) π π ≤ 1 (c) π −1 ≤ π ≤ 1 (b) π π > −1 (d) π π ≤ −1 or π = 2 Probability Mass Function 3-16/70 π π₯ = 8 7 1 2 π₯ , π₯ = 1, 2, 3 (a) π π ≤ 1 (b) π π > 2 (c) π 2 < π < 6 (d) π π ≤ 1 or π > 1 3-17/70 π π₯ = (a) π π = 1 (c) π 2 ≤ π < 4 2π₯+1 ,π₯ 25 = 0, 1, 2, 3, 4 (b) π π, = 2 (d) π π > −10 3-18/70 π π₯ = 3 4 1 4 π₯ , π₯ = 0, 1, 2, … (a) π π = 2 (b) π π ≤ 2 (c) π π > 2 (d) π π ≥ 1 Probability Mass Function 3-21/70 In a semiconductor manufacturing process, three wafers from a lot are tested. Each wafer is classified as pass or fail. Assume that the probability that a wafer passes the test is 0.7 and that wafers are independent. Determine the probability mass function of the number of wafers from a lot that pass the test. Probability Mass Function 3-23/70 A disk drive manufacturer sells storage devices with capacities of one terabyte, 500 gigabytes, and 100 gigabytes with probabilities 0.5, 0.3, and 0.2, respectively. The revenues associated with the sales in that year are estimated to be $50 million, $25 million, and $10 million, respectively. Let X denote the revenue of storage devices during that year. Determine the probability mass function of X. Cumulative Distribution Function The cumulative distribution function of a discrete random variable X, denoted as πΉ π₯ , is πΉ π₯ =π π≤π₯ = π π₯π π₯π ≤π₯ For discrete random variable X, πΉ π₯ following properties. (1) πΉ π₯ = π π ≤ π₯ = π₯π ≤π₯ π π₯π (2) 0 ≤ πΉ π₯ ≤ 1 (3) If π₯ ≤ π¦, then πΉ π₯ ≤ πΉ π¦ (3-2) satisfies the Cumulative Distribution Function Examples: 3-7/72 Determine the probability mass function of X from the following cumulative distribution function: 0, < −2 0.2, −2 ≤ π₯ < 0 πΉ π₯ = 0.7, 0 ≤ π₯ < 2 1, 2 ≤ π₯ Cumulative Distribution Function Cumulative Distribution Function 3-8/72 Sampling without Replacement Suppose that a day’s production of 850 manufactured parts contains 50 parts that do not conform to customers requirements. Two parts are selected at random, without replacement, from the batch. Let the random variable X equal the number of nonconforming parts in the sample. What is the cumulative distribution function of X? Cumulative Distribution Function Cumulative Distribution Function 3-32/73 Determine the cumulative distribution function of the random variable in Exercise 3-14. outcome x a 0 b 0 c 1.5 d 1.5 e 2 f 3 3-33/73 Determine the cumulative distribution function for random variable in Exercise 3-15; also determine the following probabilities: (a) π π ≤ 1.25 (b) π π ≤ 2.2 (c) π −1.1 < π ≤ 1 (d) π π > 0 x f(x) β2 1/8 β1 2/8 0 2/8 1 2/8 2 1/8 Cumulative Distribution Function 3-34/73 Determine the cumulative distribution function for the random variable in Exercise 3-16; also determine the following probabilities: (a) π π < 2 (b) π π ≤ 3 (c) π π > 2 (d) π 1 < π ≤ 2 π π₯ = 8 7 1 2 π₯ , π₯ = 1, 2, 3 Cumulative Distribution Function 3-40/73 Errors in an experimental transmission channel are found when the transmission is checked by a certifier that detects missing pulses. The number of errors found in an eight-bit byte is a random variable with the following distribution: 0, π₯ < 1 0.7, 1 ≤ π₯ < 4 πΉ π₯ = 0.9, 4 ≤ π₯ < 7 1, 7 ≤ π₯ Determine each of the following probabilities: (a) π π ≤ 4 (b) π π > 5 (c) π π ≤ 5 (d) π π > 7 (e) π π ≤ 2 Mean and Variance of a Discrete Random Variable The mean or expected value of the discrete random variable X, denoted as μ or E(X), is π=πΈ π = π₯π π₯ π₯ (3-3) The variance of X, denoted as σ2 or V(X), is π2 = π π = πΈ π − π 2 π₯ − π 2π π₯ = π₯ π₯ 2 π π₯ − π2 = π₯ The standard deviation of X is π = π 2 . Mean and Variance of a Discrete Random Variable Examples: 3-11/76 Messages The number of messages sent per hour over a computer network has the following distribution: x = number of messages 10 11 12 f(x) 0.08 0.15 0.30 13 0.20 14 15 0.20 0.07 Determine the mean and standard deviation of the number of messages sent per hour. Mean and Variance of a Discrete Random Variable 3-47/76 If the range of X is the set {1, 2, 3, 4, 5} and π π = π₯ = 0.2, determine the mean and variance of the random variable. 3-48/76 Determine the mean and variance of the random variable in Exercise 3-14. outcome x a 0 b 0 c 1.5 d 1.5 e 2 f 3 Mean and Variance of a Discrete Random Variable 3-49/76 Determine the mean and variance of the random variable in Exercise 3-15. x f(x) β2 1/8 β1 2/8 0 2/8 1 2/8 2 1/8 3-50/76 Determine the mean and variance of the random variable in Exercise 3-16. π π₯ = 8 7 1 2 π₯ , π₯ = 1, 2, 3 Mean and Variance of a Discrete Random Variable 3-51/76 Determine the mean and variance of the random variable in Exercise 3-17. 2π₯ + 1 π π₯ = , π₯ = 0, 1, 2, 3, 4 25 3-52/76 Determine the mean and variance of the random variable in Exercise 3-18. π π₯ = 3 4 1 4 π₯ , π₯ = 0, 1, 2, … Mean and Variance of a Discrete Random Variable Expected Value of a Function of a Discrete Random Variable If X is a discrete random variable with probability mass function π π₯ , πΈβ π = β π₯ π π₯ π₯ (3-4) Mean and Variance of a Discrete Random Variable Examples: 4.17/118 Let π be a random variable with the following probability distribution: π₯ −3 6 9 π π₯ 1/6 1/2 1/3 Find ππ π , where π π = 2π + 1 2 . 4.18/118 Find the expected value of the random variable π π = π 2 , where π has the probability distribution of Exercise 4.2. π π₯ = 3 π₯ 1 4 π₯ 3 4 3−π₯ , π₯ = 0,1,2,3 Discrete Uniform Distribution A random variable X has a discrete uniform distribution if each of the n values in its range, say, π₯1 , π₯2 , … , π₯π , has equal probability. Then, π π₯π = 1 π (3-5) Mean and Variance Suppose X is a discrete uniform random variable on the consecutive integers a, a + 1, a + 2, …, b, for a ≤ b. Then mean of X is π+π π=πΈ π = 2 Discrete Uniform Distribution Mean and Variance The variance of X is π−π+1 2 π = 12 (3-6) 2 −1 Discrete Uniform Distribution Discrete Uniform Distribution Examples: 3-65/79 Let the random variable X have a discrete uniform distribution on the integers 1 ≤ π₯ ≤ 5 . Determine the mean and variance of X. 3-69/79 Assume that the wavelengths of photosynthetically active radiations (PAR) are uniformly distributed at integer nanometers in the red spectrum from 657 to 700 nm. (a) What is the mean and variance of the wavelength distribution for this radiation? Discrete Uniform Distribution 3-69/79 (b) If the wavelengths are uniformly distributed at integer nanometers from 75 to 100 nanometers, how does the mean and variance of the wavelength distribution compare to the previous part? Explain. Binomial Distribution Consider the following random experiments and random variables: 1. Flip a coin 10 times. Let X = number of heads obtained. 2. A worn machine tool produces 1% defective parts. Let X = number of defective parts in the next 25 parts produced. 3. Each sample of air has a 10% chance of containing a particular rare molecule. Let X = the number of air samples that contain the rare molecule in the next 19 samples analyzed. Binomial Distribution 4. Of all bits transmitted through a digital transmission channel, 10% are received in error. Let X = the number of bits in error in the next five bits transmitted. 5. A multiple-choice test contains 10 questions, each with four choices, and you guess at each question. Let X = the number of questions answered correctly. 6. In the next 20 births at a hospital, let X = the number of female births. 7. Of all patients suffering a particular illness, 35% experience improvement from a particular medication. In the next 100 patients administered the medication, let X = the number of patients who experience improvement. Binomial Distribution • The terms success and failure are just labels. We can just as well use A and B or 0 or 1. Unfortunately, the usual labels can sometimes be misleading. In experiment 2, because X counts defective parts, the production of a defective part is called a success. • Bernoulli trial has only two possible outcomes used so frequently as a building block of a random experiment. Binomial Distribution A random experiment consists of n Bernoulli trials such that (1) The trials are independent. (2) Each trial results in only two possible outcomes, labeled as “success” and “failure”. (3) The probability of a success in each trial, denoted as p, remains constant. Binomial Distribution The random variable X that equals the number of trials that result in a success has a binomial random variable with parameters 0 < p < 1 and n = 1, 2, ... . The probability mass function of X is π π₯ π π₯ = π 1 − π π−π₯ , π₯ = 0, 1, … , π π₯ (3-7) Binomial Distribution Mean and Variance If X is a binomial random variable with parameters p and n, π = πΈ π = ππ and π 2 = π π = ππ 1 − π (3-8) Binomial Distribution Binomial Distribution Examples: 3-79/84 The random variable X has a binomial distribution with n = 10 and p = 0.01. Determine the following probabilities. (a) π π = 5 (b) π π ≤ 3 (c) π π ≥ 9 (d) π 3 ≤ π < 5 3-81/84 Sketch the probability mass function of a binomial distribution with n = 10 and p = 0.01 and comment on the shape of the distribution. (a) What value of X is most likely? (b) What value of X is least likely? Binomial Distribution 3-83/84 Determine the cumulative distribution function of a binomial random variable with n = 5 and p = 1/4. 3-84/84 An electronic product contains 40 integrated circuits. The probability that any integrated circuit is defective is 0.02, and the integrated circuits are independent. The product operates only if there are no defective circuits. What is the probability that the product operates? Binomial Distribution 3-85/84 The phone lines to an airline reservation system are occupied 50% of the time. Assume that the events that the lines are occupied on successive calls are independent. Assume that 10 calls are placed to the airline. (a) What is the probability that for exactly three calls the lines are occupied? (b) What is the probability that for at least one call the lines are not occupied? (c) What is the expected number of calls in which the lines are all occupied? Poisson Distribution A widely-used distribution emerges as the number of trials in a binomial experiment increases to infinity while the mean of the distribution remains constant. Consider the following example. 3-30/97 Consider the transmission of n bits over a digital communication channel. Let the random variable X equal the number of bits in error. When the probability that a bit is in error is constant and the transmissions are independent, X has a binomial distribution. Poisson Distribution Let p denote the probability that a bit is in error. Let λ = pn. Then E(X) = pn = λ and π₯ π−π₯ π π₯ π π π π₯ π π=π₯ = π 1−π = 1− π₯ π₯ π π Now, suppose that the number of bits transmitted increases and the probability of an error decreases exactly enough that pn remains equal to a constant. That is, n increases and p decreases accordingly, such as E(X) = λ remains constant. Poisson Distribution Then, with some work, it can be shown that π π₯ 1 π₯ π → 1 π₯! 1 π −π₯ − π →1 1 π π − π → π −π so that, π −π ππ₯ lim π π = π₯ = , π→∞ π₯! π₯ = 0, 1, 2, … Also, because the number of bits transmitted tends to infinity, the number of errors can equal any nonnegative integer. Therefore, the range of X is the integers from zero to infinity. Poisson Distribution 3-31/97 Wire Flaws Flaws occur at random along the length of a thin copper wire. Let X denote the random variable that counts the number of flaws in a length of L millimeters of wire and suppose that the average number of flaws in L in millimeters is λ. For the probability distribution of X: • Partition the length of wire into n subintervals of small length, say, 1 micrometer each. • Small subinterval results to negligible probability that more than one flaw occurs for such subinterval. • The probability of containing a flaw for a subinterval is p. Poisson Distribution • We can model the distribution of X as approximately a binomial random variable. • We obtain p = λ/n from E(X) = λ = np. • With enough subintervals, n is very large and p is very small. Poisson Distribution Same reasoning can be applied to any interval, including an interval of time, an area, or a volume. For example, counts of (1) particles of contamination in semiconductor manufacturing, (2) flaws in rolls of textiles, (3) calls to a telephone exchange, (4) power outages, and (5) atomic particles emitted from a specimen have been modeled by the probability mass function in the following definition. Poisson Distribution In general, consider an interval T of real numbers partitioned into subintervals of small length Δt and assume that as Δt approaches zero, (1) the probability that more than one event is a subinterval tends to zero, (2) the probability of one event in a subinterval tends to λΔt/T, (3) the event in each subinterval is independent of other subintervals. A random experiment with these properties is called Poisson process, Poisson Distribution The random variable X that equals the number of events in a Poisson process is a Poisson random variable with parameter 0 < λ, and the probability mass function of X is π −π ππ₯ π π₯ = π₯ = 0, 1, 2, … π₯! (3-16) Poisson Distribution Poisson Distribution Poisson Distribution The sum of the probabilities is one because ∞ ∞ −π π₯ π₯ π π π = π −π π! π! π=0 π=0 and the summation on the right-hand side of the previous equation is recognized to be Taylor’s expansion of ex evaluated at λ. Therefore, the summation equals eλ and the right-hand side equals eβλeλ = 1. Poisson Distribution Use consistent units For example, if the average number of flaws per millimeter of wire is 3.4, then the average number of flaws in 10 millimeter of wire is 34, and the average number of flaws in 100 millimeter of wire is 340. Poisson Distribution Mean and Variance If X is a Poisson random variable with parameter λ, then π=πΈ π =π and π2 = π π = π (3-17) Poisson Distribution Examples: 3-129/101 Suppose X has a Poisson distribution with a mean of 4. Determine the following probabilities: (a) π π = 0 (b) π π ≤ 2 (c) π π = 4 (d) π π = 8 Poisson Distribution 3-132/101 The number of telephone calls that arrive at a phone exchange is often modeled as Poisson random variable. Assume that on the average there are 8 calls per hour. (a) What is the probability that there are exactly five calls in one hour? (b) What is the probability that there are three or fewer calls in one hour? (c) What is the probability that there are exactly 15 calls in two hours? (d) What is the probability that there are exactly five calls in 30 minutes? Poisson Distribution 3-137/102 When a computer disk manufacturer tests a disk, it writes to the disk and then tests it using a certifier. The certifier counts the number of missing pulses or errors. The number of errors on a test area on a disk has a Poisson distribution with λ = 0.2. (a) What is the expected number of errors per test area? (b) What percentage of test areas have two or fewer errors? Poisson Distribution 3-141/102 The number of content changes to a Web site follows a Poisson distribution with a mean of 0.25 per day. (a) What is the probability of two or more changes in a day? (b) What is the probability of no content changes in five days? (c) What is the probability of two or fewer changes in five days? Summary • Probability mass function provides probabilities for the values in the range of a discrete random variable. • The cumulative distribution function of a discrete random variable X, denoted as πΉ π₯ , is πΉ π₯ =π π≤π₯ = π π₯π π₯π ≤π₯ • The mean refers to the expected value of a random variable. For discrete case, π = πΈ π = π₯ π₯π π₯ . Summary • The variance is a measure of variability defined as the expected value of the square of the random variable around its mean. For discrete case, π2 = π π = πΈ π − π 2 π₯ − π 2π π₯ = π₯ π₯ 2 π π₯ − π2 . = π₯ Summary • Discrete uniform random variable is a discrete random variable with a finite range and constant probability mass function • Discrete uniform distribution π π₯π = 1 π π+π π=πΈ π = 2 π−π+1 2 π = 12 2 −1 Summary • Bernoulli trials are sequences of independent trials with only two outcomes, generally called “success” and “failure”, in which the probability of success remains constant. • Binomial distribution π π₯ π π₯ = π 1 − π π−π₯ , π₯ = 0, 1, … , π π₯ π = πΈ π = ππ π 2 = π π = ππ 1 − π Summary • A Poisson process is a random experiment with events that occur in an interval and satisfy the following assumptions. The interval can be partitioned into subintervals such that the probability of more than one event in a subinterval is zero, the probability of an event in a subinterval is proportional to the length of the subinterval, and the event in each subinterval is independent of other subintervals. Summary • Poisson distribution π −π ππ₯ π π₯ = π₯! π₯ = 0, 1, 2, … π = πΈ π = ππ π 2 = π π = ππ 1 − π References • Montgomery and Runger. Applied Statistics and Probability for Engineers, 5th Ed. © 2011 • Walpole, et al. Probability and Statistics for Engineers and Scientists 9th Ed. © 2012, 2007, 2002