Introduction to Probability & Statistics South Dakota School of Mines & Technology Introduction to...

Post on 17-Dec-2015

249 views 4 download

Tags:

Transcript of Introduction to Probability & Statistics South Dakota School of Mines & Technology Introduction to...

South Dakota

School of Mines & Technology

Introduction to Introduction to Probability & StatisticsProbability & Statistics

Industrial Engineering

Introduction to Probability & Statistics

Concepts of ProbabilityConcepts of Probability

Probability Concepts

S = Sample Space : the set of all possible unique outcomes of a repeatable experiment.

Ex: flip of a coin S = {H,T}

No. dots on top face of a dieS = {1, 2, 3, 4, 5, 6}

Body Temperature of a live humanS = [88,108]

Probability Concepts

Event: a subset of outcomes from a sample space.

Simple Event: one outcome; e.g. get a 3 on one throw of a die

A = {3}

Composite Event: get 3 or more on throw of a die

A = {3, 4, 5, 6}

Rules of Events

Union: event consisting of all outcomes present

in one or more of events making up

union.Ex:

A = {1, 2} B = {2, 4, 6}

A B = {1, 2, 4, 6}

Rules of Events

Intersection: event consisting of all outcomes present in each contributing event.

Ex:A = {1, 2} B = {2, 4, 6}

A B = {2}

Rules of Events

Complement: consists of the outcomes in the sample space which are not in stipulated event

Ex:A = {1, 2} S = {1, 2, 3, 4, 5,

6}

A = {3, 4, 5, 6}

Rules of Events

Mutually Exclusive: two events are mutually exclusive if their intersection is null

Ex:A = {1, 2, 3} B = {4, 5, 6}

A B = { } =

Probability Defined Equally Likely Events

If m out of the n equally likely outcomes in an experiment pertain to event A, then

p(A) = m/n

Probability Defined Equally Likely Events

If m out of the n equally likely outcomes in an experiment pertain to event A, then

p(A) = m/n

Ex: Die example has 6 equally likely outcomes:p(2) = 1/6p(even) = 3/6

Probability Defined

Suppose we have a workforce which is comprised of 6 technical people and 4 in administrative support.

Probability Defined Suppose we have a workforce which is

comprised of 6 technical people and 4 in administrative support.

P(technical) = 6/10 P(admin) = 4/10

Rules of Probability

Let A = an event defined on the event space S

1. 0 < P(A) < 12. P(S) = 13. P( ) = 04. P(A) + P( A ) = 1

Addition Rule

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

A B

Addition Rule

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

A B

Example Suppose we have technical and

administrative support people some of whom are male and some of whom are female.

Example (cont) If we select a worker at random, compute the following probabilities:

P(technical) = 18/30

Example (cont) If we select a worker at random, compute the following probabilities:

P(female) = 14/30

Example (cont) If we select a worker at random, compute the following probabilities:

P(technical or female) = 22/30

Example (cont) If we select a worker at random, compute the following probabilities:

P(technical and female) = 10/30

Alternatively we can find the probability of randomly selecting a technical person or a female by use of the addition rule.

= 18/30 + 14/30 - 10/30

= 22/30

Example (cont)

)()()()( FTPFPTPFTP -+=

Operational Rules

Mutually Exclusive Events:

P(A B) = P(A) + P(B)

A B

Conditional Probability

Now suppose we know that event A has occurred. What is the probability of B given A?

A A B

P(B|A) = P(A B)/P(A)

Example

Returning to our workers, suppose we know we have a technical person.

Example

Returning to our workers, suppose we know we have a technical person. Then, P(Female | Technical) = 10/18

Example Alternatively,

P(F | T) = P(F T) / P(T) = (10/30) / (18/30) = 10/18

Independent Events

Two events are independent if

P(A|B) = P(A)or

P(B|A) = P(B)

In words, the probability of A is in no way affected by the outcome of B or vice versa.

Example

Suppose we flip a fair coin. The possible outcomes are

H T

The probability of getting a head is then

P(H) = 1/2

Example

If the first coin is a head, what is the probability of getting a head on the second toss?

H,H H,TT,H T,T

P(H2|H1) = 1/2

Example Suppose we flip a fair coin twice. The

possible outcomes are:

H,H H,TT,H T,T

P(2 heads) = P(H,H) = 1/4

Example Alternatively

P(2 heads) = P(H1 H2)

= P(H1)P(H2|H1)

= P(H1)P(H2)

= 1/2 x 1/2

= 1/4

Example Suppose we have a workforce consisting

of male technical people, female technical people, male administrative support, and female administrative support. Suppose the make up is as followsTech Admin

Male

Female

8

10

8

4

Example

Let M = male, F = female, T = technical, and A = administrative. Compute the following:

P(M T) = ?

P(T|F) = ?

P(M|T) = ?

Tech Admin

Male

Female

8

10

8

4

South Dakota

School of Mines & Technology

Introduction to Introduction to Probability & StatisticsProbability & Statistics

Industrial Engineering

Introduction to Probability & Statistics

CountingCounting

Fundamental Rule

If an action can be performed in m ways and another action can be performed in n ways, then both actions can be performed in m•n ways.

Fundamental Rule

Ex: A lottery game selects 3 numbers between 1 and 5 where numbers can not be selected more than once. If the game is truly random and order is not important, how many possible combinations of lottery numbers are there?

Fundamental Rule Ex: A lottery game selects 3 numbers between 1 and 5

where numbers can not be selected more than once. If the game is truly random and order is not important, how many possible combinations of lottery numbers are there?

1

2

3

4

5

Fundamental Rule Ex: A lottery game selects 3 numbers between 1 and 5

where numbers can not be selected more than once. If the game is truly random and order is not important, how many possible combinations of lottery numbers are there?

1

2

3

4

5

2345

Fundamental Rule Ex: A lottery game selects 3 numbers between 1 and 5

where numbers can not be selected more than once. If the game is truly random and order is not important, how many possible combinations of lottery numbers are there?

1

2

3

4

5

2345

345

Fundamental Rule Ex: A lottery game selects 3 numbers between 1 and 5

where numbers can not be selected more than once. If the game is truly random and order is not important, how many possible combinations of lottery numbers are there?

1

2

3

4

5

2345

345

LN = 5•4•3

= 60

Combinations

Suppose we flip a coin 3 times, how many ways are there to get 2 heads?

Combinations

Suppose we flip a coin 3 times, how many ways are there to get 2 heads?

Soln:List all possibilities:

H,H,H H,T,TH,H,T H,T,HH,T,H T,H,HT,H,H T,T,T

Combinations

Of 8 possible outcomes, 3 meet criteria

H,H,H H,T,TH,H,T H,T,HH,T,H T,H,HT,H,H T,T,T

Combinations

If we don’t care in which order these 3 occur

H,H,TH,T,HT,H,H

Then we can count by combination.

3 2

3

2 3 2

3 2 1

2 1 13C

!

!( )! ( )

Combinations

Combinations nCk = the number of ways to count k items out n total items order not important.

n = total number of itemsk = number of items pertaining to event A

k nCn

k n k

!

!( )!

Example

How many ways can we select a 4 person committee from 10 students available?

Example

How many ways can we select a 4 person committee from 10 students available?

No. Possible Committees =

10 4

10!

4 6!

10 9 8 7 6!

4 3 2 1 6!1 260C

!

,

Example

We have 20 students, 8 of whom are female and 12 of whom are male. How many committees of 5 students can be formed if we require 2 female and 3 male?

Example

We have 20 students, 8 of whom are female and 12 of whom are male. How many committees of 5 students can be formed if we require 2 female and 3 male?

Soln: Compute how many 2 member female committees we can have and how many 3 member male committees. Each female committee can be combined with each male committee.

Example

8 2 12 3

8!

2 6!

12

3 96 160C C

!

!

! !,

Permutations

Permutations is somewhat like combinations except that order is important.

n kPn

n k

!

( )!

Example

How many ways can a four member committee be formed from 10 students if the first is President, second selected is Vice President, 3rd is secretary and 4th is treasurer?

Example

How many ways can a four member committee be formed from 10 students if the first is President, second selected is Vice President, 3rd is secretary and 4th is treasurer?

10 4

10!

10 45 040P

( )!,

Example

How many ways can a four member committee be formed from 10 students if the first is President, second selected is Vice President, 3rd is secretary and 4th is treasurer?

••

10P4 = 10*9*8*7 = 5,040

South Dakota

School of Mines & Technology

Introduction to Introduction to Probability & StatisticsProbability & Statistics

Industrial Engineering

Introduction to Probability & Statistics

Random VariablesRandom Variables

Random Variables

A Random Variable is a function that associates a real number with each element in a sample space.

Ex: Toss of a die

X = # dots on top face of die = 1, 2, 3, 4, 5, 6

Random Variables

A Random Variable is a function that associates a real number with each element in a sample space.

Ex: Flip of a coin

0 , headsX =

1 , tails

Random Variables

A Random Variable is a function that associates a real number with each element in a sample space.

Ex: Flip 3 coins

0 if TTTX = 1 if HTT, THT, TTH

2 if HHT, HTH, THH 3 if HHH

Random Variables

A Random Variable is a function that associates a real number with each element in a sample space.

Ex: X = lifetime of a light bulb

X = [0, )

Distributions

Let X = number of dots on top face of a die when thrown

p(x) = Prob{X=x}

x 1 2 3 4 5 6

p(x) 1/6 1/6

1/6 1/6

1/6 1/6

Cumulative

Let F(x) = Pr{X < x}

x 1 2 3 4 5 6

p(x) 1/6 1/6

1/6 1/6

1/6 1/6

F(x) 1/6 2/6

3/6 4/6

5/6 6/6

Complementary Cumulative

Let F(x) = 1 - F(x) = Pr{X > x}

x 1 2 3 4 5 6

p(x) 1/6 1/6

1/6 1/6

1/6 1/6

F(x) 1/6 2/6

3/6 4/6

5/6 6/6

F(x) 5/6 4/6

3/6 2/6

1/6 0/6

Discrete Univariate

Binomial Discrete Uniform (Die)

Hypergeometric Poisson Bernoulli Geometric Negative Binomial

Binomial

What is the probability of getting 2 heads out of 3 flips of a coin?

Binomial

What is the probability of getting 2 heads out of 3 flips of a coin?

Soln:H,H,H H,T,TH,H,T T,H,TH,T,H T,T,HT,H,H T,T,T

Binomial

P{2 heads in 3 flips} = P{H,H,T} + P{H,T,H} + P{T,H,H}

= 3•P{H}P{H}P{T}

= 3C2•P{H}2•P{T}3-2

= 3C2•p2•(1-p)3-2

Distributions

Binomial:X = number of successes in n bernoulli trialsp = Pr(success) = const. from trial to trialn = number of trials

p(x) = b(x; n,p) =

n

x n xp px n x!

!( )!( )

1

Binomial Distribution

0.0

0.1

0.2

0.3

0.4

0.5

0 1 2 3 4 5

x

P(x

)

0.0

0.1

0.2

0.3

0.4

0.5

0 1 2 3 4 5

x

P(x

)

n=5, p=.3 n=8, p=.5

x

0.0

0.1

0.2

0.3

0.4

0.5

0 1 2 3 4 5 6 7 8

P(x

)

n=4, p=.8

0.0

0.1

0.2

0.3

0.4

0.5

0 2 4

x

P(x

)

n=20, p=.5

Example

Suppose we manufacture circuit boards with 95% reliability. If approximately 5 circuit boards in 100 are defective, what is the probability that a lot of 10 circuit boards has one or more defects?

Example (soln.)

Pr{ } Pr{ }X X 1 1 0

110

0 1005 95)0 10!

!( !)(. ) (.

= 1 - .9510

= .4013

Example

For p n Pr{X > 1}

.05 10 0.4013

.05 100 0.9941

.05 1,000 1.0000

.01 10 0.0956

.01 100 0.6340

.01 1,000 1.0000

99% Defect Free Rate 500 incorrect surgical procedures every week 20,000 prescriptions filled incorrectly each year 12 babies given to the wrong parents each day 16,000 pieces of mail lost each hour 2 million documents lost by IRS each year 22,000 checks deducted from wrong accounts

during next hour

(Ref: Quality, March 91)

Continuous Distribution

xa b c d

f(x)

A

1. f(x) > 0 , all x

2.

3. P(A) = Pr{a < x < b} =

4. Pr{X=a} =

f x dxa

d

( ) 1

f x dxb

c

( )f x dx

a

a

( ) 0

Continuous Univariate

Normal Uniform Exponential Weibull LogNormal

Beta T-distribution Chi-square F-distribution Maxwell Raleigh Triangular Generalized Gamma H-function

Normal Distribution

65%

95%

99.7%

f x eX

( )

FHG

IKJ1

2

1

2

2

Scale Parameter

x

> 1

= 1

Location Parameter

x

x

> 1

= 1

Std. Normal Transformation

Standard Normal

ZX

f(z)

N(0,1)f z e

z( )

1

2

1

22

Example

Suppose a resistor has specifications of 100 + 10 ohms. R = actual resistance of a resistor and R N(100,5). What is the probability a resistor taken at random is out of spec?

x

LSL USL

100

Example Cont.

x

LSL USL

100

Pr{in spec} = Pr{90 < x < 110}

Pr

90 100

5

110 100

5

x

= Pr(-2 < z < 2)

Example Cont.

x

LSL USL

100

Pr{in spec}= Pr(-2 < z < 2)

= [F(2) - F(-2)]

= (.9773 - .0228) = .9545

Pr{out of spec} = 1 - Pr{in spec}= 1 - .9545= 0.0455

Example

Assume that the per capita income in South Dakota is normally distributed with a mean of $20,000 and a standard deviation of $4,000. If the poverty level is considered to be $15,000 per year, compute the percentage of South Dakotans who would be considered to be at or below the poverty level.

Example

Pr{poverty level} = Pr{X < 15,000}

= Pr{Z < -1.25}

= 0.5 - Pr{0 < Z < 1.25}

= 0.5 - 0.3944 = 0.1056

x

15,000 20,000

}000,4

000,20000,15Pr{

X

Other Continuous Distributions

Exponential Distribution

f x e x( ) Density

Cumulative

Mean 1/

Variance 1/2

F x e x( ) 1

, x > 0

0.0

0.5

1.0

0 0.5 1 1.5 2 2.5 3

Time to Fail

Den

sity

=1

Exponential Distribution

f x e x( ) Density

Cumulative

Mean 1/

Variance 1/2

F x e x( ) 1

, x > 0

=1

0.0

0.5

1.0

1.5

2.0

0 0.5 1 1.5 2 2.5 3

Time to Fail

Den

sity =2

0.0

0.5

1.0

0.0 1.0 2.0 3.0 4.0 5.0 6.0 7.0

x

f(x)

LogNormal

Density

Cumulative no closed form

Mean

Variance

f xx

ex

( )ln

1

2

1

2

2

, x > 0

e 2 2

e e2 2 2

1 ( ) = 0

=1

0.0

0.5

1.0

0.0 1.0 2.0 3.0 4.0 5.0 6.0 7.0

x

f(x)

LogNormal

Density

Cumulative no closed form

Mean

Variance

f xx

ex

( )ln

1

2

1

2

2

, x > 0

e 2 2

e e2 2 2

1 ( ) = 0

=2

-0.5

0.0

0.5

1.0

0.0 1.0 2.0 3.0 4.0 5.0 6.0 7.0

x

f(x)

LogNormal

Density

Cumulative no closed form

Mean

Variance

f xx

ex

( )ln

1

2

1

2

2

, x > 0

e 2 2

e e2 2 2

1 ( ) = 0

=0.5

Gamma

Density

Cumulative no closed form for integer

Mean

Variance 2

f x x e x( )( )

/

1 , x > 0

0.0

0.5

1.0

0.0 1.0 2.0 3.0 4.0 5.0 6.0 7.0

x

f(x) =1

0.0

0.5

1.0

0.0 1.0 2.0 3.0 4.0 5.0 6.0 7.0

x

f(x)

Gamma

Density

Cumulative no closed form for integer

Mean

Variance 2

f x x e x( )( )

/

1 , x > 0

=2

0.0

0.5

1.0

0.0 1.0 2.0 3.0 4.0 5.0 6.0 7.0

x

f(x)

Gamma

Density

Cumulative no closed form for integer

Mean

Variance 2

f x x e x( )( )

/

1 , x > 0

=3

0.0

0.5

1.0

1.5

0.0 1.0 2.0 3.0 4.0 5.0 6.0 7.0

Weibull

Density

Cumulative

Mean Variance

f x x e x( ) ( / ) 2 1 2

, x > 0

F x e x( ) ( / ) 12

1

2 2

22 1 1

= 1

= 1

0.0

0.5

1.0

1.5

0.0 1.0 2.0 3.0 4.0 5.0 6.0 7.0

Weibull

Density

Cumulative

Mean Variance

f x x e x( ) ( / ) 2 1 2

, x > 0

F x e x( ) ( / ) 12

1

2 2

22 1 1

= 1

= 2

0.0

0.5

1.0

1.5

0.0 1.0 2.0 3.0 4.0 5.0 6.0 7.0

Weibull

Density

Cumulative

Mean Variance

f x x e x( ) ( / ) 2 1 2

, x > 0

F x e x( ) ( / ) 12

1

2 2

22 1 1

= 1

= 3

Uniform

Density

Cumulative

Mean (a + b)/2

Variance (b - a)2/12

f xb a

( )1

, a < x < b

F xx a

b a( )

f(x)

x

a b

End

Probability Review Session 1