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
4-1 Chapter Four Discrete Random Variables 4-2 McGraw-Hill/Irwin Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Discrete Random Variables 4.1 4.2 4.3 *4.4 4-3 Two Types of Random Variables Discrete Probability Distributions The Binomial Distribution The Poisson Distribution 4.1 Random Variables A random variable is a variable that assumes numerical values that are determined by the outcome of an experiment. Discrete random variable: Possible values can be counted or listed. [e.g. the number of defective units in a batch of 20, a listener rating (on a scale of 1 to 5) in a AccuRating music survey] Continuous random variable: May assume any numerical value in one or more intervals. [e.g. the waiting time for a credit card authorization, the interest rate charged on a business loan.] 4-4 4.2 Discrete Probability Distributions The probability distribution of a discrete random variable is a table, graph, or formula that gives the probability associated with each possible value that the variable can assume. Example 4.3: Number of Radios Sold at Sound City in a Week x, Radios 0 1 2 3 4 5 4-5 p(x), Probability p(0) = 0.03 p(1) = 0.20 p(2) = 0.50 p(3) = 0.20 p(4) = 0.05 p(5) = 0.02 Expected Value of a Discrete Random Variable The mean or expected value of a discrete random variable is: X xp( x) All x Example 4.4: Expected Number of Radios Sold in a Week x, Radios 0 1 2 3 4 5 4-6 p(x), Probability p(0) = 0.03 p(1) = 0.20 p(2) = 0.50 p(3) = 0.20 p(4) = 0.05 p(5) = 0.02 1.00 x p(x) 0(0.03) = 0.00 1(0.20) = 0.20 2(0.50) = 1.00 3(0.20) = 0.60 4(0.05) = 0.20 5(0.02) = 0.10 2.10 Variance and Standard Deviation The variance of a discrete random variable is: X2 ( x X ) 2 p( x) All x The standard deviation is the square root of the variance. X X2 4-7 Example: Variance and Standard Deviation Example 4.7: Variance and Standard Deviation of the Number of Radios Sold in a Week x, Radios 0 1 2 3 4 5 p(x), Probability p(0) = 0.03 p(1) = 0.20 p(2) = 0.50 p(3) = 0.20 p(4) = 0.05 p(5) = 0.02 1.00 Variance X2 0.89 4-8 (x - X)2 p(x) (0 – 2.1)2 (0.03) = 0.1323 (1 – 2.1)2 (0.20) = 0.2420 (2 – 2.1)2 (0.50) = 0.0050 (3 – 2.1)2 (0.20) = 0.1620 (4 – 2.1)2 (0.05) = 0.1805 (5 – 2.1)2 (0.02) = 0.1682 0.8900 Standard deviation X 0.89 0.9434 4.3 The Binomial Distribution The Binomial Experiment 1. Experiment consists of n identical trials 2. Each trial results in either “success” or “failure” 3. Probability of success, p, is constant from trial to trial 4. Trials are independent If x = the total number of successes in n trials of a binomial experiment, then x is a binomial random variable and the probability of x successes in n trials is: n! p(x) = p x q n -x x! (n - x)! 4-9 Example: Binomial Probabilities Example 4.10 x = number of patients who will experience nausea following treatment with Phe-Mycin n = 4 , p = 0.1, q = 1 – p = 1 - 0.1 = 0.9 Find the probability that 2 of the 4 patients treated will experience nausea. 4! p(2) P(x=2)= (0.1)2 (0.9)4-2 =6(0.1)2 (0.9)2 =0.0486 2!(4-2)! 4-10 Example: Binomial Distribution, n = 4, p = 0.1 4-11 Binomial Probability Table p = 0.1 Table 4.7(a) for n = 4 trials values of p (.05 to .50) x 0 1 2 3 4 0.05 0.8145 0.1715 0.0135 0.0005 0.0000 0.95 0.1 0.6561 0.2916 0.0486 0.0036 0.0001 0.9 0.15 0.5220 0.3685 0.0975 0.0115 0.0005 0.85 … … … … … … … 0.50 0.0625 0.2500 0.3750 0.2500 0.0625 0.50 values of p (.95 to .50) P(x = 2)=.0486 4-12 4 3 2 1 0 x Several Binomial Distributions 4-13 Mean and Variance of a Binomial Random Variable If x is a binomial random variable with parameters n and p, then Mean X = np Variance x2 = npq , q 1 - p Standard deviation x = x2 4-14 4.4 The Poisson Distribution Consider the number of times an event occurs over an interval of time or space, and assume that 1. The probability of occurrence is the same for any intervals of equal length. 2. The occurrence in any interval is independent of an occurrence in any non-overlapping interval. If x = the number of occurrences in a specified interval, then x a Poisson random variable and the probability of x occurrences in the interval is: e x p(x) = x! 4-15 expected number of occurrence s e 2.71828..., the Naperian constant Example: Poisson Probabilities Example 4.13 x = number of Cleveland air traffic control errors during one week = 0.4 (expected number of errors per week) Find the probability that 3 errors will occur in a week. e-0.4 (0.4)3 p(3) P(x = 3) = = .0072 3! 4-16 Poisson Probability Table =0.4 Table 4.9 , Mean number of Occurrences x 0 1 2 3 4 5 0.1 0.9048 0.0905 0.0045 0.0002 0.0000 0.0000 0.2 0.8187 0.1637 0.0164 0.0011 0.0001 0.0000 … … … … … … … 0.4 0.6703 0.2681 0.0536 0.0072 0.0007 0.0001 e-0.4 (0.4)3 p(3) P(x = 3) = = 0.0072 3! 4-17 … … … … … … … 1.00 0.3679 0.3679 0.1839 0.0613 0.0153 0.0031 Example: Poisson Distribution, = 0.4 4-18 Mean and Variance of a Poisson Random Variable If x is a Poisson random variable with parameter , then Mean X = Variance x2 = Standard Deviation 4-19 x = x2 Several Poisson Distributions 4-20 Discrete Random Variables Summary: 4.1 4.2 4.3 *4.4 4-21 Two Types of Random Variables Discrete Probability Distributions The Binomial Distribution The Poisson Distribution