CHAPTER 3 DISCRETE RANDOM VARIABLES AND PROBABILITY DISTRIBUTIONS

  • Slides: 49
Download presentation
CHAPTER 3 DISCRETE RANDOM VARIABLES AND PROBABILITY DISTRIBUTIONS

CHAPTER 3 DISCRETE RANDOM VARIABLES AND PROBABILITY DISTRIBUTIONS

LEARNING OBJECTIVES • Understand random variables • Calculate means and variances • Determine probabilities

LEARNING OBJECTIVES • Understand random variables • Calculate means and variances • Determine probabilities from cumulative distribution functions • Understand the assumptions of the discrete probability distributions • Calculate probabilities, determine means and variances for each of the discrete probability distributions

Concept of Random Variable • Summarize the outcome from a random experiment by a

Concept of Random Variable • Summarize the outcome from a random experiment by a simple number • Used to describe the possible outcomes • Useful to associate a number with each outcome in the sample space • Variable that associates a number with the outcome of a random experiment is referred to as a random variable

Definition of Random Variables • Function that assigns a real number to each outcome

Definition of Random Variables • Function that assigns a real number to each outcome in the sample space • Denoted by an uppercase letter such as X • Value of the random variable is denoted by a lowercase letter such as x

Two Types of Random Variables • Discrete and Continuous • Sometimes a measurement can

Two Types of Random Variables • Discrete and Continuous • Sometimes a measurement can assume any value in an interval of real numbers • Said to be a continuous random variable – Examples: Electrical current, length, pressure, temperature, time, voltage, weight • Sometimes the measurement is limited to integers • Said to be a discrete random variable – Examples: No. of scratches on a surface, No. of calls received per day, and No. of transmitted bits received in error

Probability Distribution • Describes probabilities associated with the possible values of X • Discrete

Probability Distribution • Describes probabilities associated with the possible values of X • Discrete Case – Specified by just a list of the possible values along with the probability of each • Continuous Case – Used to describe the probability distribution • Convenient to express the probability in terms of a formula

Discrete Probability Distribution • Definition – For a discrete random variable X with possible

Discrete Probability Distribution • Definition – For a discrete random variable X with possible values x 1, x 2, x 3, …, xn, the probability mass function (PMF) is • f(xi) = P(X = xi) • f(xi) 0 for all xi •

Discrete Probability Distribution Examples • To better understand the PMF, consider • Example 1

Discrete Probability Distribution Examples • To better understand the PMF, consider • Example 1 – Tossing a 6 -sided die – f(x)=1/6 for X=1, 2, 3, 4, 5, 6 • Example 2 – Check whether the following can serve as probability distribution – 1. f(x)= (x-2)/2 for x=1, 2, 3, 4; – 2. h(x)= x 2/25 for x=0, 1, 2, 3, 4;

Class Problem • • The sample space of a random experiment is {a, b,

Class Problem • • 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 a b x 0 0 c d 1. 5 e f 2 3 Determine the probability mass function of X a) b) c) f(0)=P(X=0)=1/6+1/6=1/3 f(1. 5)=P(X=1. 5)=1/6+1/6=1/3 f(3)=P(X=3)=1/6

Cumulative Distribution Function • Useful to provide cumulative probabilities such as P(X x) •

Cumulative Distribution Function • Useful to provide cumulative probabilities such as P(X x) • Cumulative distribution function (CDF) of a discrete random variable X, denoted as F(x), is • F(x) has the following properties: – F(x)= P(X x)= – 0 F(x) 1 – If x y, then F(x) F(y)

Cumulative Distribution Function. Example • Determine the cumulative distribution of the random variable for

Cumulative Distribution Function. Example • Determine the cumulative distribution of the random variable for which each outcome is equally likely in the following sample space: Outcome a b c x 0 1. 5 2 3 0 d e f

Solution Outcome a b x 0 0 f(x) 1/6 c d 1. 5 1/6

Solution Outcome a b x 0 0 f(x) 1/6 c d 1. 5 1/6 e f 2 3 1/6

Calculating Probabilities from PMF and CDF • Interested to determine – Probabilities from cumulative

Calculating Probabilities from PMF and CDF • Interested to determine – Probabilities from cumulative distribution functions – Cumulative distribution functions from probability mass functions – Vise versa • Consider the following example

Example • Consider the following PMF f(y) y 1 2 3 4 f(y) .

Example • Consider the following PMF f(y) y 1 2 3 4 f(y) . 4 . 3 . 2 . 1 • Determine the CDF 0. 4 y 1 F(y) y 1

Example • Consider the following CDF • Note that Y can take on 1,

Example • Consider the following CDF • Note that Y can take on 1, 2, 3, or 4. • Determine the PMF – P(Y=1)=0. 4 -0. 0=0. 4 – P(Y=2)=0. 7 -0. 4=0. 3, P(Y=3)=0. 9 -0. 7=0. 2, P(Y=4)=1. 0 -0. 9=0. 1 – Hence, y 1 2 3 4 f(y) . 4 . 3 . 2 . 1

Mean of a Discrete Random Variable • PMF provides complete information about the properties

Mean of a Discrete Random Variable • PMF provides complete information about the properties of a random variable • Useful to have some summary measures of these properties • Mean or expectation – Denoted by E(X) or represents an average value of the random variable • If a random variable takes on the values x 1, x 2, … , or xk with the probabilities f(x 1), f(x 2), …. , and f(xk), its mean is = E(X)= x 1. f(x 1) + x 2. f(x 2)+. . . + xk. f(xk) – Or = E(X)=

Examples • Find the mean of the probability distribution of the number of heads

Examples • Find the mean of the probability distribution of the number of heads obtained in three flips of a coin – Probabilities • 1/8, 3/8, and 1/8 • = (0)1/8 + (1)3/8 + (2)3/8 + (3) 1/8 = 3/2 • Suppose Y is the total showing on a pair of dice, find the mean of the probability distribution – Calculated as

Variance of a Discrete Random Variable • Another important measure of the distribution of

Variance of a Discrete Random Variable • Another important measure of the distribution of a random variable • Measures the spread or variability • Whereas mean measures central, the variance measures the deviation • Denoted as 2 or V(x) 2= V(X)=E(X- )2 = • Standard deviation of X is =[V(X)]1/2

Examples • Find the variance of the probability distribution of the number of heads

Examples • Find the variance of the probability distribution of the number of heads obtained in three flips of a coin – Variance 2= (0 -3/2)2(1/8)+(1 -3/2)2 (3/8)+(2 -3/2)2(3/8)+(33/2)2(1/8)=0. 75 • Find the variance of the total showing on a pair of dice – Variance 2 = V(X)= (2 -7)2(1/36) + (3 -7)2(2/36)+ … + (12 -7)2(1/36) =

Class Problem • If the range of X is the set {0, 1, 2,

Class Problem • If the range of X is the set {0, 1, 2, 3, 4} and P(X=x)= 0. 2, determine the mean and variance of the random variable • Solution – X can take values of 0, 1, 2, 3 or 4 – Summation of x f(x) – Hence, mean=2 – Variance can be calculated as – V(X)= (0 -2)2 (0. 2)+(1 -2)2 (0. 2)+…=

Uniform Discrete Distribution • If X assumes the values x 1, x 2, ….

Uniform Discrete Distribution • If X assumes the values x 1, x 2, …. , xn with equal probability, then it has a discrete uniform distribution • Probability mass function f(xi)= 1/n for xi= x 1, x 2, …. , xn • Mean E[X]= • Variance V(X)=

Examples • When a light bulb is selected randomly from a box containing a

Examples • When a light bulb is selected randomly from a box containing a red, a blue, a white, and a yellow bulb – Sample space is {red, blue, white, yellow} with probability 1/4 – Hence, f(x)=1/4 • When a die is tossed – – Sample space is {1, 2, 3, 4, 5, 6} with probability 1/6 f(x)=1/6 E[X]= (1*1/6+ 2*1/6+ 3*1/6+ 4*1/6+ 5*1/6+6*1/6)=3. 5 V[X]=(1 -3. 5)2/6 + (2 -3. 5)2/6 + …+ (6 -3. 5)2/6 =35/12

Binomial Distribution • Two possible outcomes labeled success or failure • Referred to as

Binomial Distribution • Two possible outcomes labeled success or failure • Referred to as a Bernoulli process • Conditions – Consists of n repeated trails – Results in two possible outcomes (Success or Failure) – Probability of success, denoted by p, remains constant – Trials are independent

Examples • Tossing a coin 10 times 1. 2. 3. 4. • There are

Examples • Tossing a coin 10 times 1. 2. 3. 4. • There are 10 trials, and they are identical Each trial has only two outcomes Probability of getting a H is 0. 5 in each trial Trials (tosses) are independent In an operation, 5% of all machined parts are defective. 3 parts are randomly selected from the production line to determine if each of them is defective or good 1. 2. 3. 4. Three identical trials Each trial has two outcomes p=0. 05 Independent trials

PMF of the Binomial Distribution • Binomial distribution with parameters p and n=1, 2,

PMF of the Binomial Distribution • Binomial distribution with parameters p and n=1, 2, … • PMF – f(x)= px(1 -p)n-x – Where x =0, 1, 2, …, n. – • E[X]= np • V (X)=np(1 -p)=npq

Example • In an operation, 5% of all parts machined by a firm are

Example • In an operation, 5% of all parts machined by a firm are defective • If three parts are randomly selected from the production line, what is the probability that exactly one of them will be defective? • Solution – n=3, x=1, and p=0. 05 – Substituting in the PMF P(X=1)= f(1) = 0. 051(1 -0. 05)3 -1 P(X=1)=3*0. 051(1 -0. 05)3 -1 = 0. 1354

Class Problem • The random variable X has a binomial distribution with n=10 and

Class Problem • The random variable X has a binomial distribution with n=10 and p=0. 01, determine the following probabilities • P(X=5) = (0. 01)5(1 -0. 01)10 -5) = • P(X 2) =P(X=0)+P(X=1)+P(X=2)=0. 904 +0. 091+0. 00045 =0. 99 • P(3 X<5) =P(X=3)+ P(X=4)=1. 14

Geometric Distribution • • Closely related to the binomial experiment Trials are conducted until

Geometric Distribution • • Closely related to the binomial experiment Trials are conducted until a success is obtained Let X denote the number of trials PMF – P(X = x) = f(x) = (1 -p)x-1 p x = 1, 2, 3, … • Mean and Variance – =E(x)=1/p and 2=V(x)=(1 -p)/p 2

Example • The probability of a successful optical alignment in the assembly of an

Example • The probability of a successful optical alignment in the assembly of an optical data storage product is 0. 8 • Assume the trials are independent – What is the probability the first successful alignment requires exactly four trials? – What is the probability that the first successful alignment requires at most four trials? – What is the probability that the first successful alignment requires at least four trials?

Example • Let X denote the number of trials to obtain in the first

Example • Let X denote the number of trials to obtain in the first successful alignment. • Then X is a geometric random variable with p = 0. 8 • Solution P(X = 4) = f(4) = 0. 23(0. 8) = 0. 0064 P(X 4) = P(X=1) + P(X = 2) + P(X =3) + P(X = 4)=0. 9984 P(X 4) = 1 P(X < 4) = 1 0. 992 = 0. 008

Class Problem • Assume that each of your calls to a popular radio station

Class Problem • Assume that each of your calls to a popular radio station has a probability of 0. 02 of connecting, that is, of not obtaining a busy signal (calls are independent) – What is the probability that your first call that connects is your tenth call? – What is the probability that it requires more than five calls for you to connect? – What is the mean number of calls needed to connect?

Solutions • Let X denote the number of calls needed to obtain a connection

Solutions • Let X denote the number of calls needed to obtain a connection • Then, X is a geometric random variable with p=0. 02 • P(X = 10) = • P(X>5) = • E(X) =1/0. 02 = 50

Negative Binomial Distribution • Based on an experiment – Consists of a sequence of

Negative Binomial Distribution • Based on an experiment – Consists of a sequence of independent trials – Result in either a “S” or “F” – Probability of success is constant from trial to trial – Continues until a total of r success have been observed • PMF P(X = x) = f(x) = (1 -p)x-rpr • Mean and Variance E[X] = r/p and V (X) = r(1 -p)/p 2

Example • Suppose that X is a negative binomial random variable with p=0. 2

Example • Suppose that X is a negative binomial random variable with p=0. 2 and r=4. Determine the following E(X), P(X = 20), P(X = 19), P(X = 21) • Solution • E(X) = r/p =4/0. 2 = 20 • P(X = 20) = (1 -p)x-rpr = • P(X = 19) = • P(X = 21) =

Hypergeometric Distribution • Assumptions – Population consists of N objects (finite) – Each classified

Hypergeometric Distribution • Assumptions – Population consists of N objects (finite) – Each classified as a “S” or “F” and K success – n individuals is selected without replacement • Random variable of interest is X, the number of successes in the sample

PMF of the Hypergeometric Distribution • X=number of successes in a sample of size

PMF of the Hypergeometric Distribution • X=number of successes in a sample of size n drawn from a population consisting of K successes and N-K failures • PMF is given – for x satisfying max (0, n-N+K) x min (n, K) • Mean and Variance E[X] = n and V (X) = n

Example • A shipment of 20 machined parts contains 5 that are defective •

Example • A shipment of 20 machined parts contains 5 that are defective • If 10 of them are randomly chosen for inspection, what is the probability that 2 of the 10 will be defective? • Solution x = 2, n = 10, k = 5, and N=20 f(x=2)= = 0. 348

Class Problem • A lot of 75 washers contains 5 in which the variability

Class Problem • A lot of 75 washers contains 5 in which the variability in thickness around the circumference of the washer is unacceptable • A sample of 10 washers is selected at random, without replacement. – What is the probability that none of the unacceptable washers is in the sample? – What is the probability that at least one unacceptable washer is in the sample? – What is the probability that exactly one unacceptable washer is in the sample? – What is the mean number of unacceptable washers in the sample?

Solution • Let X denote the number of unacceptable washers in the sample of

Solution • Let X denote the number of unacceptable washers in the sample of 10 • P(X = 0) • P(X 1) =1 - P(X=0)=0. 5214 • P(X = 1)= • E(X) =10*5/75=2/3

Poisson Distribution • Binomial, hypergeometric, and negative binomial distributions start with an experiment consisting

Poisson Distribution • Binomial, hypergeometric, and negative binomial distributions start with an experiment consisting of trials • Based on the number of outcomes occurring during a given time interval or in a specified regions • Examples – # of accidents that occur on a given highway during a 1 week period – # of customers coming to a bank during a 1 -hour interval – # of TVs sold at a department store during a given week – # of breakdowns of a washing machine per month

Conditions • Consider the # of breakdowns of a washing machine per month example

Conditions • Consider the # of breakdowns of a washing machine per month example – Each breakdown is called an occurrence – Occurrences are random that they do not follow any pattern (unpredictable) – Occurrence is always considered with respect to an interval (one month)

The Probability Mass Distribution • X = number of counts in the interval •

The Probability Mass Distribution • X = number of counts in the interval • Poisson random variable with > 0 • PMF f(x)= x=0, 1, 2, • Mean and Variance E[X] = , V (X) =

Example • If a bank gets on average = 6 bad checks per day,

Example • If a bank gets on average = 6 bad checks per day, what are the probabilities that it will receive four bad checks on any given day? 10 bad checks on any two consecutive days? • Solution x = 4 and = 6, then f(4) = = 0. 135 = 12 and x = 10, then f(10) = = 0. 105

Class Problem • The number of failures of a testing instrument from contamination particle

Class Problem • The number of failures of a testing instrument from contamination particle on the product is a Poisson random variable with a mean of 0. 02 failure per hour. – What is the probability that the instrument does not fail in an 8 -hour shift? – What is the probability of at least one failure in one 24 hour day?

Solution a) Let X denote the failure in 8 hours. Then, X has a

Solution a) Let X denote the failure in 8 hours. Then, X has a Poisson distribution with =0. 16 P(X=0)=0. 8521 b) Let Y denote the number of failure in 24 hours. Then, Y has a Poisson distribution with =0. 48 P(Y 1) = 1 -P(Y = 0) =0. 3812

The Poisson Approximation To The Binomial Distribution • When n is large and p

The Poisson Approximation To The Binomial Distribution • When n is large and p is small, binomial probabilities are often approximates by f(x)= for x = 0, 1, 2, … with = np

Example • Assume 5% of the books at a certain bindery have defective bindings.

Example • Assume 5% of the books at a certain bindery have defective bindings. Find the probability that 2 of 100 books bound by this bindery will have defective bindings, using – The binomial distribution – The Poisson distribution

Solution • Using Binomial x = 2, n = 100, and p = 0.

Solution • Using Binomial x = 2, n = 100, and p = 0. 05 f(x) = (0. 05)2(0. 95)98 = 0. 081 • Using Poisson x = 2, = np = 100*0. 05 = 5 f(2) = = 0. 084

Next agenda • Continue our development of probability distributions with a discussion of several

Next agenda • Continue our development of probability distributions with a discussion of several important continuous distributions