OPIM 5103-Lecture #3 Jose M. Cruz Assistant Professor.

48
OPIM 5103-Lecture #3 Jose M. Cruz Assistant Professor

Transcript of OPIM 5103-Lecture #3 Jose M. Cruz Assistant Professor.

Page 1: OPIM 5103-Lecture #3 Jose M. Cruz Assistant Professor.

OPIM 5103-Lecture #3

Jose M. Cruz

Assistant Professor

Page 2: OPIM 5103-Lecture #3 Jose M. Cruz Assistant Professor.

Introduction to Probability

• Counting Rules• Intro to Probability

– theoretical, empirical, subjective– probability rules!

• Probability Distributions– discrete: Uniform, Binomial, Poisson– continuous: Normal

Page 3: OPIM 5103-Lecture #3 Jose M. Cruz Assistant Professor.

A Counting Rule for Multiple-Step Experiments

If an experiment consists of a sequence of If an experiment consists of a sequence of kk steps steps in which there are in which there are nn11 possible results for the first step, possible results for the first step,

nn22 possible results for the second step, and so on, possible results for the second step, and so on,

then the total number of experimental outcomes isthen the total number of experimental outcomes is given by (given by (nn11)()(nn22) . . . () . . . (nnkk).).

Page 4: OPIM 5103-Lecture #3 Jose M. Cruz Assistant Professor.

A second useful counting rule enables us to count thenumber of experimental outcomes when n objects are tobe selected from a set of N objects.

Counting Rule for Combinations

CN

nN

n N nnN

!

!( )!C

N

nN

n N nnN

!

!( )!

Number of Number of CombinationsCombinations of of NN Objects Taken Objects Taken nn at a Time at a Time

where: where: NN! = ! = NN((NN 1)( 1)(NN 2) . . . (2)(1) 2) . . . (2)(1) nn! = ! = nn((nn 1)( 1)(nn 2) . . . (2)(1) 2) . . . (2)(1) 0! = 10! = 1

Page 5: OPIM 5103-Lecture #3 Jose M. Cruz Assistant Professor.

Number of Number of PermutationsPermutations of of NN Objects Taken Objects Taken nn at a Time at a Time

where: where: NN! = ! = NN((NN 1)( 1)(NN 2) . . . (2)(1) 2) . . . (2)(1) nn! = ! = nn((nn 1)( 1)(nn 2) . . . (2)(1) 2) . . . (2)(1) 0! = 10! = 1

P nN

nN

N nnN

!!

( )!P n

N

nN

N nnN

!!

( )!

CountingCounting Rule for Permutations Rule for Permutations

A third useful counting rule enables us to count theA third useful counting rule enables us to count thenumber of experimental outcomes when number of experimental outcomes when nn objects are to objects are tobe selected from a set of be selected from a set of NN objects, where the order of objects, where the order ofselection is important.selection is important.

Page 6: OPIM 5103-Lecture #3 Jose M. Cruz Assistant Professor.

Probability

Page 7: OPIM 5103-Lecture #3 Jose M. Cruz Assistant Professor.

Probability

• Probability is the numerical measure of the likelihood that an event will occur

• Value is between 0 and 1

• Sum of the probabilities of all mutually exclusive and collective exhaustive events is 1

Certain

Impossible

.5

1

0

Page 8: OPIM 5103-Lecture #3 Jose M. Cruz Assistant Professor.

(There are 2 ways to get one 6 and the other 4)e.g. P( ) = 2/36

Computing Probabilities

• The probability of an event E:

• Each of the outcomes in the sample space is equally likely to occur

number of event outcomes( )

total number of possible outcomes in the sample space

P E

X

T

Page 9: OPIM 5103-Lecture #3 Jose M. Cruz Assistant Professor.

Computing Joint Probability

• The probability of a joint event, A and B:

( and ) = ( )

number of outcomes from both A and B

total number of possible outcomes in sample space

P A B P A B

E.g. (Red Card and Ace)

2 Red Aces 1

52 Total Number of Cards 26

P

Page 10: OPIM 5103-Lecture #3 Jose M. Cruz Assistant Professor.

Computing Compound Probability

• Probability of a compound event, A or B:( or ) ( )

number of outcomes from either A or B or both

total number of outcomes in sample space

P A B P A B

E.g. (Red Card or Ace)

4 Aces + 26 Red Cards - 2 Red Aces

52 total number of cards28 7

52 13

P

Page 11: OPIM 5103-Lecture #3 Jose M. Cruz Assistant Professor.

Compound Probability (Addition Rule)

P(A or B ) = P(A) + P(B) - P(A and B)

For Mutually Exclusive Events: P(A or B) = P(A) + P(B)

P(A and B)P(A) P(B)

Page 12: OPIM 5103-Lecture #3 Jose M. Cruz Assistant Professor.

Computing Conditional Probability

• The probability of event A given that event B has occurred:

( and )( | )

( )

P A BP A B

P B

E.g.

(Red Card given that it is an Ace)

2 Red Aces 1

4 Aces 2

P

Page 13: OPIM 5103-Lecture #3 Jose M. Cruz Assistant Professor.

Conditional Probability

American Int’l Total

Men 0.25 0.15 0.40

Women 0.45 0.15 0.60

Total 0.70 0.30

Q: What is the probability that a randomly selected student is American, knowing that the student is female?

Page 14: OPIM 5103-Lecture #3 Jose M. Cruz Assistant Professor.

Conditional Probability and Statistical Independence

• Conditional probability:

• Multiplication rule:

( and )( | )

( )

P A BP A B

P B

( and ) ( | ) ( )

( | ) ( )

P A B P A B P B

P B A P A

Page 15: OPIM 5103-Lecture #3 Jose M. Cruz Assistant Professor.

Conditional Probability and Statistical Independence

• Events A and B are independent if

• Events A and B are independent when the probability of one event, A, is not affected by another event, B

(continued)

( | ) ( )

or ( | ) ( )

or ( and ) ( ) ( )

P A B P A

P B A P B

P A B P A P B

Page 16: OPIM 5103-Lecture #3 Jose M. Cruz Assistant Professor.

Binomial Probability Distribution

• ‘n’ identical trials– e.g.: 15 tosses of a coin; ten light bulbs taken from a

warehouse

• Two mutually exclusive outcomes on each trials– e.g.: Head or tail in each toss of a coin; defective or

not defective light bulb

• Trials are independent– The outcome of one trial does not affect the outcome

of the other

• Constant probability for each trial– e.g.: Probability of getting a tail is the same each time

we toss the coin

Page 17: OPIM 5103-Lecture #3 Jose M. Cruz Assistant Professor.

where:where: ff((xx) = the probability of ) = the probability of xx successes in successes in nn trials trials nn = the number of trials = the number of trials pp = the probability of success on any one trial = the probability of success on any one trial

( )!( ) (1 )

!( )!x n xn

f x p px n x

( )!( ) (1 )

!( )!x n xn

f x p px n x

Binomial DistributionBinomial Distribution

Binomial Probability FunctionBinomial Probability Function

Page 18: OPIM 5103-Lecture #3 Jose M. Cruz Assistant Professor.

Binomial Distribution

(1 )np p (1 )np p

EE((xx) = ) = = = npnp

Var(Var(xx) = ) = 22 = = npnp(1 (1 pp))

• Expected Value

• Variance

• Standard Deviation

Page 19: OPIM 5103-Lecture #3 Jose M. Cruz Assistant Professor.

Excel’s Binomial Function

=BINOMDIST(no. of successes, no. of trials, prob. of success, cumulative?)

Example=BINOMDIST(2,8,0.5, FALSE) (=0.11)

“Probability of tossing (exactly) two heads within 8 trials”

=BINOMDIST(2,8,0.5, TRUE) (=0.14)“Probability of tossing two heads or less within 8

trials”

Page 20: OPIM 5103-Lecture #3 Jose M. Cruz Assistant Professor.

Binomial Setting

Examples• Number of times newspaper arrives on time (i.e.,

before 7:30 AM) in a week/month• Number of times I roll “5” on a die in 20 rolls• Number of times I toss heads within 20 trials• Students pick random number between 1 and

10. Number of students who picked “7”• Number of people who will vote “Republican” in

a group of 20• Number of left-handed people in a group of 40

Page 21: OPIM 5103-Lecture #3 Jose M. Cruz Assistant Professor.

Service Center Staffing

0 0.36417 0.36417 Assumptions1 0.371602 0.735771 - 50 computers sold2 0.185801 0.921572 - Prob. customer calls for service = 0.023 0.06067 0.982242 - Want < 5% that there is no engineer4 0.014548 0.996795 0.002732 0.9995226 0.000418 0.999947 5.36E-05 0.9999948 5.88E-06 0.9999999 5.6E-07 1

10 4.69E-08 111 3.48E-09 112 2.31E-10 113 1.38E-11 114 7.42E-13 115 3.64E-14 116 1.62E-15 117 6.63E-17 118 2.48E-18 119 8.52E-20 120 2.7E-21 121 7.86E-23 122 2.11E-24 123 5.25E-26 124 1.21E-27 125 2.56E-29 126 5.02E-31 127 9.11E-33 1

0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

0 5 10 15 20 25 30 35 40 45 50

Number of Service Calls

Pro

bab

ilit

y

Cumul. Prob.

Probability

Page 22: OPIM 5103-Lecture #3 Jose M. Cruz Assistant Professor.

Poisson Distribution

• Poisson Process:– Discrete events in an “interval”

• The probability of One Successin an interval is stable

• The probability of More thanOne Success in this interval is 0

– The probability of success isindependent from interval to interval

– e.g.: number of customers arriving in 15 minutes– e.g.: number of defects per case of light bulbs

P X x

x

x

( |

!

e-

Page 23: OPIM 5103-Lecture #3 Jose M. Cruz Assistant Professor.

Poisson DistributionPoisson Distribution

A property of the Poisson distribution is thatA property of the Poisson distribution is thatthe mean and variance are equal.the mean and variance are equal.

A property of the Poisson distribution is thatA property of the Poisson distribution is thatthe mean and variance are equal.the mean and variance are equal.

= = 22

Page 24: OPIM 5103-Lecture #3 Jose M. Cruz Assistant Professor.

Excel’s Poisson Function

=POISSON(no. of occurences, mean, cumulative?)

Example

=POISSON(5,2,FALSE) (=0.036)“Probability that (exactly) five customers arrive wihtin

an hour when the overall average is two”

=POISSON(5,2,TRUE) (=0.983)“Probability that five or less customers arrive wihtin an

hour when the overall average is two”

Page 25: OPIM 5103-Lecture #3 Jose M. Cruz Assistant Professor.

Poisson Setting

Examples• Number of accidents at an intersection in 6

months• Number of people entering a bank in a 30-

minute interval• Number of kids ringing the doorbell in 30

minutes for Halloween• Number of times a Microsoft machine crashes

within 24 hours• Number of sewing flaws per (100) garment(s)

Page 26: OPIM 5103-Lecture #3 Jose M. Cruz Assistant Professor.

Halloween

0 0.000335 0.000335 Assume: on average 4 kids /hour (=lambda)1 0.002684 0.0030192 0.010735 0.0137543 0.028626 0.042384 0.057252 0.0996325 0.091604 0.1912366 0.122138 0.3133747 0.139587 0.4529618 0.139587 0.5925479 0.124077 0.716624

10 0.099262 0.81588611 0.07219 0.88807612 0.048127 0.93620313 0.029616 0.96581914 0.016924 0.98274315 0.009026 0.99176916 0.004513 0.99628217 0.002124 0.99840618 0.000944 0.9993519 0.000397 0.99974720 0.000159 0.999906

A Poisson Distribution

0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

1 2 3 4 5 6 7 8 9101112131415161718192021

Probability

Cum. Prob.

Page 27: OPIM 5103-Lecture #3 Jose M. Cruz Assistant Professor.

Continuous Probability Distributions

• Continuous random variable– Values from interval of numbers– Absence of gaps

• Continuous probability distribution– Distribution of continuous random variable

• Most important continuous probability distribution– The normal distribution

Page 28: OPIM 5103-Lecture #3 Jose M. Cruz Assistant Professor.

The Uniform Distribution

• “Rectangular shaped”• Every value between

a and b is equally likely

• The mean and median are in the middle

• Prob(X<=v) is the area on the left of v

Mean Median

X

f(X)

ba v

E(E(xx) = () = (aa + + bb)/2)/2E(E(xx) = () = (aa + + bb)/2)/2Var(Var(xx) = () = (bb - - aa))22/12/12Var(Var(xx) = () = (bb - - aa))22/12/12

Page 29: OPIM 5103-Lecture #3 Jose M. Cruz Assistant Professor.

The Normal Distribution

• “Bell shaped”• Symmetrical• Mean, median and

mode are equal• Interquartile range

equals 1.33 • 68-95-99 % rule• Random variable

has infinite range

Mean Median

X

f(X)

Page 30: OPIM 5103-Lecture #3 Jose M. Cruz Assistant Professor.

Generating Random VariablesUsing Excel

• Excel can be used to generate Discrete and Continuous Random Variables

• Complex Probabilistic Models can be constructed and simulation can give insight and suggest managerial decisions

Page 31: OPIM 5103-Lecture #3 Jose M. Cruz Assistant Professor.

The Mathematical Model

21

2

2

1

2

: density of random variable

3.14159; 2.71828

: population mean

: population standard deviation

: value of random variable

X

f X e

f X X

e

X X

Page 32: OPIM 5103-Lecture #3 Jose M. Cruz Assistant Professor.

Many Normal Distributions

By varying the parameters and , we obtain different normal distributions

There are an infinite number of normal distributions

Page 33: OPIM 5103-Lecture #3 Jose M. Cruz Assistant Professor.

Finding Probabilities

Probability is the area under the curve!

c dX

f(X)

?P c X d

Page 34: OPIM 5103-Lecture #3 Jose M. Cruz Assistant Professor.

Which Table to Use?

An infinite number of normal distributions means an infinite number of tables to look

up!

Page 35: OPIM 5103-Lecture #3 Jose M. Cruz Assistant Professor.

Solution: The Cumulative Standardized Normal Distribution

Z .00 .01

0.0 .5000 .5040 .5080

.5398 .5438

0.2 .5793 .5832 .5871

0.3 .6179 .6217 .6255

.5478.02

0.1 .5478

Cumulative Standardized Normal Distribution Table (Portion)

Probabilities

Shaded Area Exaggerated

Only One Table is Needed

0 1Z Z

Z = 0.12

0

Page 36: OPIM 5103-Lecture #3 Jose M. Cruz Assistant Professor.

Standardizing Example

6.2 50.12

10

XZ

Normal Distribution

Standardized Normal

Distribution

Shaded Area Exaggerated

10 1Z

5 6.2 X Z0Z

0.12

Page 37: OPIM 5103-Lecture #3 Jose M. Cruz Assistant Professor.

Example:

Normal Distribution

Standardized Normal

Distribution

Shaded Area Exaggerated

10 1Z

5 7.1 X Z0Z

0.21

2.9 5 7.1 5.21 .21

10 10

X XZ Z

2.9 0.21

.0832

2.9 7.1 .1664P X

.0832

Page 38: OPIM 5103-Lecture #3 Jose M. Cruz Assistant Professor.

Z .00 .01

0.0 .5000 .5040 .5080

.5398 .5438

0.2 .5793 .5832 .5871

0.3 .6179 .6217 .6255

.5832.02

0.1 .5478

Cumulative Standardized Normal Distribution Table (Portion)

Shaded Area Exaggerated

0 1Z Z

Z = 0.21

Example:

2.9 7.1 .1664P X (continued)

0

Page 39: OPIM 5103-Lecture #3 Jose M. Cruz Assistant Professor.

Z .00 .01

-03 .3821 .3783 .3745

.4207 .4168

-0.1.4602 .4562 .4522

0.0 .5000 .4960 .4920

.4168.02

-02 .4129

Cumulative Standardized Normal Distribution Table (Portion)

Shaded Area Exaggerated

0 1Z Z

Z = -0.21

Example:

2.9 7.1 .1664P X (continued)

0

Page 40: OPIM 5103-Lecture #3 Jose M. Cruz Assistant Professor.

Example:

8 .3821P X

Normal Distribution

Standardized Normal

Distribution

Shaded Area Exaggerated

10 1Z

5 8 X Z0Z

0.30

8 5.30

10

XZ

.3821

Page 41: OPIM 5103-Lecture #3 Jose M. Cruz Assistant Professor.

Example:

8 .3821P X (continued)

Z .00 .01

0.0 .5000 .5040 .5080

.5398 .5438

0.2 .5793 .5832 .5871

0.3 .6179 .6217 .6255

.6179.02

0.1 .5478

Cumulative Standardized Normal Distribution Table (Portion)

Shaded Area Exaggerated

0 1Z Z

Z = 0.30

0

Page 42: OPIM 5103-Lecture #3 Jose M. Cruz Assistant Professor.

.6217

Finding Z Values for Known Probabilities

Z .00 0.2

0.0 .5000 .5040 .5080

0.1 .5398 .5438 .5478

0.2 .5793 .5832 .5871

.6179 .6255

.01

0.3

Cumulative Standardized Normal Distribution Table

(Portion)

What is Z Given Probability = 0.1217 ?

Shaded Area Exaggerated

.6217

0 1Z Z

.31Z 0

Page 43: OPIM 5103-Lecture #3 Jose M. Cruz Assistant Professor.

Recovering X Values for Known Probabilities

5 .30 10 8X Z

Normal Distribution

Standardized Normal

Distribution10 1Z

5 ? X Z0Z 0.30

.3821.1179

Page 44: OPIM 5103-Lecture #3 Jose M. Cruz Assistant Professor.

Finding Probabilities for X Values Using Excel

Excel function:

=NORMDIST(x,mean,standard_deviation,TRUE)

=NORMSDIST(z,TRUE)

Example

Prob.(weight <= 165 lbs) when mean=180, std_dev=20:

=NORMDIST(165,180,20,true)Answer: 0.2267

Prob.(weight >= 185 lbs) ?

Prob.(weight >= 165 and weight <= 185 lbs) ?

Page 45: OPIM 5103-Lecture #3 Jose M. Cruz Assistant Professor.

Finding X Values for Known ProbabilitiesUsing Excel

Excel function:

=NORMINV(probabiltiy,mean,standard_deviation)

=NORMSINV(probability)

Example

Prob.(weight <= X)= 0.2 (mean=180, std_dev=20)

=NORMINV(0.2,180,20)Answer: X=163

Prob.(weight >= X)=0.4 X?Answer: X=185

Page 46: OPIM 5103-Lecture #3 Jose M. Cruz Assistant Professor.

Assessing Normality

• Not all continuous random variables are normally distributed

• It is important to evaluate how well the data set seems to be adequately approximated by a normal distribution

Page 47: OPIM 5103-Lecture #3 Jose M. Cruz Assistant Professor.

Assessing Normality

• Construct charts– For large data sets, does the histogram appear bell-

shaped?

• Compute descriptive summary measures– Do the mean, median and mode have similar values?– Is the interquartile range approximately 1.33 ?– Does the data obey the 68-95-99 percent rule?– Is the range approximately 6 ?

(continued)

Page 48: OPIM 5103-Lecture #3 Jose M. Cruz Assistant Professor.

Assessing Normality

• Observe the distribution of the data set– Do approximately 2/3 of the observations lie

between mean 1 standard deviation?– Do approximately 4/5 of the observations lie

between mean 1.28 standard deviations?– Do approximately 19/20 of the observations lie

between mean 2 standard deviations?

(continued)