Chapter 5 Discrete Random Variables Statistics for Business 1.

55
Chapter 5 Discrete Random Variables Statistics for Business 1

Transcript of Chapter 5 Discrete Random Variables Statistics for Business 1.

Page 1: Chapter 5 Discrete Random Variables Statistics for Business 1.

Chapter 5

Discrete Random Variables

Statistics for Business

1

Page 2: Chapter 5 Discrete Random Variables Statistics for Business 1.

Discrete Random Variables

5.1 Two Types of Random Variables5.2 Discrete Probability Distributions5.3 The Binomial Distribution5.4 The Poisson Distribution

Page 3: Chapter 5 Discrete Random Variables Statistics for Business 1.

Two Types of Random Variables

• Random variable: a variable (qualitative or quantitative attribute that characterizes a population/sample) that assumes numerical values which are determined by the outcome of an experiment– Discrete– Continuous

• Discrete random variable: Possible values can be counted or listed, e.g.– The number obtained from the throw of a die– The number of children in a family– The number of students in a class

Page 4: Chapter 5 Discrete Random Variables Statistics for Business 1.

Random Variables Continued

• Continuous random variable: May assume any numerical value in one or more intervals, e.g.– The waiting time for the next bus at a bus stop– The interest rate charged on a business loan– Distance in meters a student has to walk per day

Page 5: Chapter 5 Discrete Random Variables Statistics for Business 1.

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

• Notation: Denote the values of the random variable by x and the value’s associated probability by p(x)

Page 6: Chapter 5 Discrete Random Variables Statistics for Business 1.

Discrete Probability Distribution Properties

1. For any value x of the random variable, p(x) 0

2. The probabilities of all the events in the sample space must sum to 1, that is…

1all

x

xp

Page 7: Chapter 5 Discrete Random Variables Statistics for Business 1.

You are going to flip a coin three times. Let X be the number of heads appear in these 3 times. Let H represent the outcome of a head and T the outcome of a tail.

The possible outcomes for such an experiment:

TTT, TTH, THT, THH,HTT, HTH, HHT, HHH

Thus the possible values of X (number of heads) are 0,1,2,3.

Discrete random variable: an example

XX is a discrete random variable. is a discrete random variable.

Page 8: Chapter 5 Discrete Random Variables Statistics for Business 1.

The probability distribution of X

x Probability P(X=x)

0 1/8

1 3/8

2 3/8

3 1/8This is an example of This is an example of Binomial DistributionBinomial Distribution as explained later. as explained later.

What is the chance of having 3 heads? What is the chance of having 3 heads? 1/8

What is the chance of having 1 heads? What is the chance of having 1 heads? 3/8

For a fair coin:For a fair coin:

Page 9: Chapter 5 Discrete Random Variables Statistics for Business 1.

Example: Number of TV Sold in a Day• Let x be the random variable of the number of TV

sold per day in an appliance store– x has values x = 0, 1, 2, 3, 4, 5, 6

• Given: Frequency distribution of sales history over past 100 days– Let f be the number of days (of the past 100) during

which x number of TV were sold# TV sold, x Frequency Relative Frequency 0 f(0) = 3 3/100 = 0.03

1 f(1) = 20 20/100 = 0.20 2 f(2) = 50 0.50 3 f(3) = 20 0.20

4 f(4) = 5 0.05 5 f(5) = 2 0.02

100 1.00

Page 10: Chapter 5 Discrete Random Variables Statistics for Business 1.

Example Continued

• Interpret the relative frequencies as probabilities– So for any value x, f(x)/n = p(x)– Assuming that sales remain stable over time

Number of TV Sold in a store per day

TV sold, x Probability, p(x) 0 p(0) = 0.03 1 p(1) = 0.20 2 p(2) = 0.50 3 p(3) = 0.20 4 p(4) = 0.05 5 p(5) = 0.02

1.00

Page 11: Chapter 5 Discrete Random Variables Statistics for Business 1.

Example Continued

• What is the chance that fewer than 2 TV will be sold per day?– p(x < 2) = p(x = 0 or x = 1)

= p(x = 0) + p(x = 1)= 0.03 + 0.20 = 0.23

• What is the chance that three or more TV will be sold per day?– p(x ≥ 3) = p(x = 3, 4, or 5)

= p(x = 3) + p(x = 4) + p(x = 5)= 0.20 + 0.05 + 0.02 = 0.27

Using the addition rulefor the mutuallyexclusive values ofthe random variable.

Page 12: Chapter 5 Discrete Random Variables Statistics for Business 1.

Expected Value of a Discrete Random Variable

The mean or expected value of a discrete random variable X is:

is the value expected (or expectation value) to occur in the long run and on average

xAll

X xpx

Page 13: Chapter 5 Discrete Random Variables Statistics for Business 1.

Example: Number of TV Sold per day

• How many TV should be expected to be sold in a day?– Calculate the expected value of the number of TV sold, µX

• On average, expect to sell 2.1 TVs per day

# of TV, x Probability, p(x) x p(x) 0 p(0) = 0.03 0 0.03 = 0.00

1 p(1) = 0.20 1 0.20 = 0.20

2 p(2) = 0.50 2 0.50 = 1.00

3 p(3) = 0.20 3 0.20 = 0.60

4 p(4) = 0.05 4 0.05 = 0.20

5 p(5) = 0.02 5 0.02 = 0.10 1.00 2.10

Page 14: Chapter 5 Discrete Random Variables Statistics for Business 1.

Variance

• The variance is the average of the squared deviations of the different values of the random variable from the expected value

• The variance of a discrete random variable is:

xAll

XX xpx 22

Page 15: Chapter 5 Discrete Random Variables Statistics for Business 1.

Standard Deviation

• The standard deviation is the square root of the variance

• The variance and standard deviation measure the spread of the values of the random variable from their expected value

2XX

Page 16: Chapter 5 Discrete Random Variables Statistics for Business 1.

Radios, x Probability, p(x) (x - X)2 p(x)

0 p(0) = 0.03 (0 – 2.1)2 (0.03) = 0.1323

1 p(1) = 0.20 (1 – 2.1)2 (0.20) = 0.2420

2 p(2) = 0.50 (2 – 2.1)2 (0.50) = 0.0050

3 p(3) = 0.20 (3 – 2.1)2 (0.20) = 0.1620

4 p(4) = 0.05 (4 – 2.1)2 (0.05) = 0.1805

5 p(5) = 0.02 (5 – 2.1)2 (0.02) = 0.1682

1.00 0.8900

Example: Number of TV Sold per day

Page 17: Chapter 5 Discrete Random Variables Statistics for Business 1.

• Variance equals 0.8900• Standard deviation is the square root of the

variance• Standard deviation equals 0.9434

Example: Number of TV Sold per day

Page 18: Chapter 5 Discrete Random Variables Statistics for Business 1.

Flipping a coin three times

E(X) = 0 x 1/8 + 1 x 3/8 + 2 x 3/8 + 3 x 1/8E(X) = 0 x 1/8 + 1 x 3/8 + 2 x 3/8 + 3 x 1/8

= 12/8 = 1.5= 12/8 = 1.5

x Probability P(X=x)

0 1/8

1 3/8

2 3/8

3 1/8

What is the What is the variance & & standard deviation of X? of X?

Number of heads appeared

Page 19: Chapter 5 Discrete Random Variables Statistics for Business 1.

PermutationBy the PERMUTATIONS of the letters abc we mean

all of their possible arrangements:abc, acb, bac, bca, cab, cba;where ab means that a was chosen first and b second; ba means that b was chosen first and a second; and so on.

There are 6, or 3! = 3*2*1, possible arrangements.In general, nPk means "the number of permutations of

n different things taken k at a time."

nPk = n(n − 1)(n − 2)· · · to k factors = n! (n − k)!

Page 20: Chapter 5 Discrete Random Variables Statistics for Business 1.

Combination

In permutations, the order is important -- we count abc as different from bca. But in combinations we are concerned only that a, b, and c have been selected. abc and bca are the same combination.

nCk = nPk / k!Example: How many combinations are there of 5

things taken 4 at a time?Solution. 5C4 = 5· 4· 3· 2 /(1· 2· 3· 4) = 5

Page 21: Chapter 5 Discrete Random Variables Statistics for Business 1.

The Binomial Distribution• A binomial experiment is

1. Experiment consists of n identical trials2. Each trial results in 2 possible outcomes: “success” or

“failure”3. Probability of success, p, is constant from trial to trial

– The probability of failure, q, is 1 – p

4. Trials are independent

• If X is the total number of successes in n trials of a binomial experiment, then X is a binomial random variable.

• Notice that X can have any value from 0 to n.

Page 22: Chapter 5 Discrete Random Variables Statistics for Business 1.

Binomial Probability DistributionBinomial Probability Distribution

xnxxn CxXP )1()(

n n is the number of trials (experiments)

x x is a variable (may be 1, 2, …n)

is the probability of success on each trial

n!x!(n-x)!

xnC is the (# of) combinations of arranging x successes is the (# of) combinations of arranging x successes in n trials.in n trials.

Page 23: Chapter 5 Discrete Random Variables Statistics for Business 1.

Binomial Distribution Continued

• For a binomial random variable x, the probability of x successes in n trials is given by the binomial distribution:

– n! is read as “n factorial” and n! = n × (n-1) × (n-2) × ... × 1– 0! =1– Not defined for negative numbers or fractions– And p + q = 1

x-nxqp

x-nx

n =xp

!!

!

Page 24: Chapter 5 Discrete Random Variables Statistics for Business 1.

Examples

• Roll a standard die ten times and count the number of sixes. The distribution of this random number is a binomial distribution with n = 10 and p = 1/6.

• Flip a coin three times and count the number of heads. The distribution of this random number is a binomial distribution with n = 3 and p = 1/2.

Page 25: Chapter 5 Discrete Random Variables Statistics for Business 1.

Flipping a coin three times

The outcome of head/tail is a The outcome of head/tail is a binomial random variable. For a fair coin, p = q = 0.5. The probility of having x heads in 3 trials is:

x Probability P(X=x)

0 1/8

1 3/8

2 3/8

3 1/8

P(x) = P(x) = 33CCx x / 8/ 8

Page 26: Chapter 5 Discrete Random Variables Statistics for Business 1.

26

Page 27: Chapter 5 Discrete Random Variables Statistics for Business 1.

551.000....172.250.

)80(.)20(....)80(.)20(.)3( 0141414

113314

CCXP

The Department of Labor reports that 20% of the workforce in a city is unemployed. In an interviewed with 14 workers in that city:

What is the probability that exactly three are unemployed?

and, at least three are unemployed?

2501.

)0859)(.0080)(.364(

)20.1()20(.)3( 113314

CXP

Example:

Page 28: Chapter 5 Discrete Random Variables Statistics for Business 1.

956.044.1

)20.1()20(.1

)0(1)1(140

014

C

XPXP

The probability at least one is unemployed?

Example of Binomial Probability Distribution cont.

Page 29: Chapter 5 Discrete Random Variables Statistics for Business 1.

Example: Binomial Distributionn = 4, p = 0.1

Page 30: Chapter 5 Discrete Random Variables Statistics for Business 1.

x 0.05 0.1 0.15 … 0.500 0.8145 0.6561 0.5220 … 0.0625 41 0.1715 0.2916 0.3685 … 0.2500 32 0.0135 0.0486 0.0975 … 0.3750 23 0.0005 0.0036 0.0115 … 0.2500 14 0.0000 0.0001 0.0005 … 0.0625 0

0.95 0.9 0.85 … 0.50 x

Binomial Probability Table

values of p (.05 to .50)

values of p (.05 to .50)

Table 5.7(a) for n = 4, with x = 2 and p = 0.1

P(x = 2) = 0.0486

p = 0.1

Page 31: Chapter 5 Discrete Random Variables Statistics for Business 1.

Example 5.10: Incidence of Nauseaafter Treatment

• Suppose 10% of the patients will experience nausea following treatment with a cancer drug.

• Take a sample of 4 patients, all treated with the same cancer drug. Let X be the number of patients, who experience nausea after the treatment.

• Find the probability that 0 of the 4 patients treated will experience nausea

• Given: n = 4, p = 0.1, with X = 0Then: q = 1 – p = 1 – 0.1 = 0.9

Page 32: Chapter 5 Discrete Random Variables Statistics for Business 1.

Example 5.10 Continued

6561.09.01.01

9.01.0!04!0

!40

40

40

xp

Page 33: Chapter 5 Discrete Random Variables Statistics for Business 1.

Example 5.11: Incidence of Nauseaafter Treatment

x = number of patients who will experience nausea following treatment with the drug out of the 4 patients tested

Find the probability that at least 3 of the 4 patients treated will experience nausea

Set x = 3, n = 4, p = 0.1, so q = 1 – p = 1 – 0.1 = 0.9Then:

0037.00001.0036.0

43

4or 33

xpxp

xpxp Using the addition rule for the mutually exclusive values of the binomial random variable

with a binomial table

Page 34: Chapter 5 Discrete Random Variables Statistics for Business 1.

Several Binomial Distributions

Page 35: Chapter 5 Discrete Random Variables Statistics for Business 1.

Mean and Variance of a Binomial Random Variable

• If x is a binomial random variable with parameters n and p (so q = 1 – p), then– Mean = n•p– Variance 2

x = n•p•q

– Standard deviation x = square root n•p•qnpqX

Page 36: Chapter 5 Discrete Random Variables Statistics for Business 1.

Back to Example 5.11

• Of 4 randomly selected patients, how many should be expected to experience nausea after treatment?– Given: n = 4, p = 0.1– Then µX = np = 4 0.1 = 0.4

– So expect 0.4 of the 4 patients to experience nausea

• If at least three of four patients experienced nausea, this would be many more than the 0.4 that are expected

Page 37: Chapter 5 Discrete Random Variables Statistics for Business 1.

What happen if…• We don’t know the probability for certain

outcome to occur• But we know the average number for such

outcome to occur in– a fixed period of time, or– an interval of any kind

• Example: an earthquake larger than scale 8 occurs in Japan on average once in 100 years.

37

Remember = n•p; and p are related.

Page 38: Chapter 5 Discrete Random Variables Statistics for Business 1.

* The experiment results in outcomes that can be * The experiment results in outcomes that can be classified as successes or failures.classified as successes or failures.

* The average number of successes (μ) that occurs in a * The average number of successes (μ) that occurs in a specified region specified region (in time or space)(in time or space) is known. is known.

* The probability that a success will occur is * The probability that a success will occur is proportional to the size of the region.proportional to the size of the region.

* The probability that a success will occur in an * The probability that a success will occur in an extremely small region is virtually zero.extremely small region is virtually zero.

* The probability of an event in one interval is * The probability of an event in one interval is independent of the probability of an event in any other independent of the probability of an event in any other non-overlapping interval.non-overlapping interval.

Poisson experiment is …Poisson experiment is …

Page 39: Chapter 5 Discrete Random Variables Statistics for Business 1.

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 is a Poisson random variable

Page 40: Chapter 5 Discrete Random Variables Statistics for Business 1.

The Poisson Distribution Continued

• Suppose μ is the mean or expected number of occurrences during a specified interval

• The probability of x occurrences in the interval when μ are expected is described by the Poisson distribution

– where x can take any of the values x = 0,1,2,3, … – and e = 2.71828 (e is the base of the natural log)

!x

exp

x

Page 41: Chapter 5 Discrete Random Variables Statistics for Business 1.

Example • The average number of cars sold by the Acme Car

Company is 2 cars per day. What is the probability that exactly 3 cars will be sold tomorrow?

• Solution: This is a Poisson experiment in which we know the following:

• μ = 2; since 2 cars are sold per day, on average. • x = 3; since we want to find the likelihood that 3 cars will be

sold tomorrow. • We plug these values into the Poisson formula as follows:

= 0.180= 0.180

Page 42: Chapter 5 Discrete Random Variables Statistics for Business 1.

Suppose the average number of tigers seen on a day trip to Suppose the average number of tigers seen on a day trip to a national forest is 5. What is the probability that tourists a national forest is 5. What is the probability that tourists will see fewer than four tigers on the next 1-day trip? will see fewer than four tigers on the next 1-day trip?

To solve this problem, we need to find the probability that tourists will To solve this problem, we need to find the probability that tourists will see 0, 1, 2, or 3 tigers. Thus, we need to calculate the sum of four see 0, 1, 2, or 3 tigers. Thus, we need to calculate the sum of four probabilities: P(0; 5) + P(1; 5) + P(2; 5) + P(3; 5). probabilities: P(0; 5) + P(1; 5) + P(2; 5) + P(3; 5). To compute this sum, we use the Poisson formula:To compute this sum, we use the Poisson formula:

P(x P(x << 3, 5) = P(0; 5) + P(1; 5) + P(2; 5) + P(3; 5) 3, 5) = P(0; 5) + P(1; 5) + P(2; 5) + P(3; 5)= [ (e= [ (e-5-5)(5)(500) / 0! ] + [ (e) / 0! ] + [ (e-5-5)(5)(511) / 1! ] + [ (e) / 1! ] + [ (e-5-5)(5)(522) / 2! ] + [ (e) / 2! ] + [ (e-5-5)(5)(533) ) / 3! ] / 3! ] = [ 0.0067 ] + [ 0.03369 ] + [ 0.084224 ] + [ 0.140375 ] = [ 0.0067 ] + [ 0.03369 ] + [ 0.084224 ] + [ 0.140375 ] = 0.2650 = 0.2650

Example

Page 43: Chapter 5 Discrete Random Variables Statistics for Business 1.

More examples of Poisson Distribution• The number of people killed by accidents each year in

a country.• The number of earthquakes recorded per year in the

world.• The number of people who travel between Zhuhai and

Hong Kong each week.• The number of accidents involved by a driver per

100,000 km travelled.• The number of trees per square mile in a forest.• The number of mutations in a given stretch of DNA

after a fixed dosage of radiation.

Page 44: Chapter 5 Discrete Random Variables Statistics for Business 1.

Example 5.13: ATC Center Errors• An air traffic control (ATC) center has been averaging

20.8 errors per year and lately has been making 3 errors per week

• Let x be the number of errors made by the ATC center during one week

• Given: µ = 20.8 errors per year• Then: µ = 0.4 errors per week

– There are 52 weeks per year so µfor a week is:

– µ = (20.8 errors/year)/(52 weeks/year)= 0.4 errors/week

Page 45: Chapter 5 Discrete Random Variables Statistics for Business 1.

Example 5.13: ATC Center Errors Continued

• Find the probability that 3 errors (x =3) will occur in a week– Want p(x = 3) when µ = 0.4

• Find the probability that no errors (x = 0) will occur in a week– Want p(x = 0) when µ = 0.4

0072.0

!3

4.03

34.0

e

xp

6703.0

!0

4.00

04.0

e

xp

Page 46: Chapter 5 Discrete Random Variables Statistics for Business 1.

Poisson Probability Table

x 0.1 0.2 … 0.4 … 1.000 0.9048 0.8187 … 0.6703 … 0.36791 0.0905 0.1637 … 0.2681 … 0.36792 0.0045 0.0164 … 0.0536 … 0.18393 0.0002 0.0011 … 0.0072 … 0.06134 0.0000 0.0001 … 0.0007 … 0.01535 0.0000 0.0000 … 0.0001 … 0.0031

, Mean number of Occurrences=0.4

Table 5.9

0072.0

!3

4.03

34.0

e

xp

Page 47: Chapter 5 Discrete Random Variables Statistics for Business 1.

Poisson Probability Calculations

Page 48: Chapter 5 Discrete Random Variables Statistics for Business 1.

Example: Poisson Distribution = 0.4

Page 49: Chapter 5 Discrete Random Variables Statistics for Business 1.

Mean and Variance of a Poisson Random Variable

• If x is a Poisson random variable with parameter , then– Mean x =

– Variance 2x =

– Standard deviation x is square root of variance 2

x

Page 50: Chapter 5 Discrete Random Variables Statistics for Business 1.

Several Poisson Distributions

Page 51: Chapter 5 Discrete Random Variables Statistics for Business 1.

Back to Example 5.13

• In the ATC center situation, 20.8 errors occurred on average per year

• Assume that the number x of errors during any span of time follows a Poisson distribution for that time span

• Per week, the parameters of the Poisson distribution are:– mean µ = 0.4 errors/week– standard deviation σ = 0.6325 errors/week

Page 52: Chapter 5 Discrete Random Variables Statistics for Business 1.

We can deduce the Poisson distribution from the binomial We can deduce the Poisson distribution from the binomial distribution by usingdistribution by using

From binomial to Poisson Distribution

where is the mean & p is where is the mean & p is the the probability of the the probability of success success

11

as n becomes very very largeas n becomes very very large

Page 53: Chapter 5 Discrete Random Variables Statistics for Business 1.

The sum of the probabilities P(X = r) or simply P(r) for r = 0, 1, 2, … is 1.

Sum of Poisson Distribution

Page 54: Chapter 5 Discrete Random Variables Statistics for Business 1.

Chapter Five-Discrete Random VariablesGOALSAfter you completed this chapter, you will be able to:ONE

Define the terms random variable and probability distribution.

TWO Distinguish between a discrete and continuous probability distributions.

THREECalculate the mean, variance, and standard deviation from a discrete probability distribution.

Page 55: Chapter 5 Discrete Random Variables Statistics for Business 1.

FOURCompute probabilities, mean and variance of binomial probability distributed random variable.

FIVE Compute probabilities, mean and variance of Poisson probability distributed random variable.

Chapter Five-Discrete Random Variables