chapter 5 discrete probability...

43
L05 Chapter 5 Discrete Probability Distributions

Upload: phungliem

Post on 09-Jun-2018

291 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Chapter 5 Discrete Probability Distributionsfaculty.weber.edu/.../L05StatsIDiscreteProbDists.pdfChapter 5 Discrete Probability Distributions Random Variables Random Variables – Numerical

L05 Chapter 5 Discrete Probability Distributions

Page 2: Chapter 5 Discrete Probability Distributionsfaculty.weber.edu/.../L05StatsIDiscreteProbDists.pdfChapter 5 Discrete Probability Distributions Random Variables Random Variables – Numerical

Random Variables

Random Variables – Numerical

description of the outcome of an

experiment

◦ Example: Let X equal the sum of two rolled

dice. X can equal 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12

◦ Example: CPA Exam has four parts. Let Y

equal the number of parts passed. Y can take

on values of 1, 2, 3, 4

Notice that we have assigned a number to

each outcome of the experiment

Page 3: Chapter 5 Discrete Probability Distributionsfaculty.weber.edu/.../L05StatsIDiscreteProbDists.pdfChapter 5 Discrete Probability Distributions Random Variables Random Variables – Numerical

Random Variables

Discrete Random Variables

◦ Takes on a finite number of values (Think the

sum of two dice)

◦ Takes on a sequence of values (think the

number of cars that travel 1-15 each day)

Continuous Random Variables

◦ Can take on ANY numerical values in an

interval

Think of a call center. Let T = time between calls. T

can take on any value ≥ 0. Infinite Possibilities

Net weight of a bag of Doritos.

Page 4: Chapter 5 Discrete Probability Distributionsfaculty.weber.edu/.../L05StatsIDiscreteProbDists.pdfChapter 5 Discrete Probability Distributions Random Variables Random Variables – Numerical

Random Variables

Question Random Variable x Type

Family

size

x = Number of dependents

reported on tax return

Distance from

home to store

x = Distance in miles from

home to the store site

Own dog or cat

x = 1 if own no pet;

= 2 if own dog(s) only;

= 3 if own cat(s) only;

= 4 if own dog(s) and cat(s)

Page 5: Chapter 5 Discrete Probability Distributionsfaculty.weber.edu/.../L05StatsIDiscreteProbDists.pdfChapter 5 Discrete Probability Distributions Random Variables Random Variables – Numerical

Discrete Probability Distributions

When we assign a Probability to each of

the discrete outcomes, we have a discrete

probability distribution

◦ We can describe the distribution three ways

1. ______

2. ______

3. ______

Page 6: Chapter 5 Discrete Probability Distributionsfaculty.weber.edu/.../L05StatsIDiscreteProbDists.pdfChapter 5 Discrete Probability Distributions Random Variables Random Variables – Numerical

Discrete Probability Distributions

Using past data on TV sales, we have

A tabular representation of the

probability distribution for TV sales

Number

Units Sold of Days

0 80

1 50

2 40

3 10

4 20

200

x f(x)

0 .40

1 .25

2 .20

3 .05

4 .10

1.00

f(x), which provides

the probability for

each value of the

random variable

Required

Conditions

are:

f(x) > 0

f(x) = 1

Page 7: Chapter 5 Discrete Probability Distributionsfaculty.weber.edu/.../L05StatsIDiscreteProbDists.pdfChapter 5 Discrete Probability Distributions Random Variables Random Variables – Numerical

Discrete Probability Distributions

.10

.20

.30

.40

.50

0 1 2 3 4 -_____________________________

____

____

____

_

Page 8: Chapter 5 Discrete Probability Distributionsfaculty.weber.edu/.../L05StatsIDiscreteProbDists.pdfChapter 5 Discrete Probability Distributions Random Variables Random Variables – Numerical

Discrete Probability Distribution

Discrete Uniform Probability Distribution

is the simplest example of a discrete

probability distribution given by a formula

The discrete uniform probability function

is:

f(x) = 1/n

where: n = the number of values the random variable may assume

the values of the random variable are equally likely

Page 9: Chapter 5 Discrete Probability Distributionsfaculty.weber.edu/.../L05StatsIDiscreteProbDists.pdfChapter 5 Discrete Probability Distributions Random Variables Random Variables – Numerical

Uniform Discrete Probability

Distribution Let X be the random variable that equals

the number of dots facing upward on a

rolled die.

How many outcome are there?

6

So f(x) = _____ where x =

___________

f(x) = 1/n

Page 10: Chapter 5 Discrete Probability Distributionsfaculty.weber.edu/.../L05StatsIDiscreteProbDists.pdfChapter 5 Discrete Probability Distributions Random Variables Random Variables – Numerical

Example

The director of admissions at Lakeville College

subjectively assessed a probability distribution for x, the

number of entering students as follows.

Is the probability distribution valid? Explain

What is the probability of 1200 or fewer entering

students?

x f(x)

1000 .15

1100 .20

1200 .30

1300 .25

1400 .10

Pro

bab

ility

of an

y eve

nt:

Equal

to t

he s

um

of th

e

pro

bab

ilities

of th

e s

ample

poin

ts in t

he e

vent.

Page 11: Chapter 5 Discrete Probability Distributionsfaculty.weber.edu/.../L05StatsIDiscreteProbDists.pdfChapter 5 Discrete Probability Distributions Random Variables Random Variables – Numerical

Expected Value and Variance

Before Now

Expected Value of a

Random Variable

i i

i

w xx

w

E(x) = = xf(x)

Page 12: Chapter 5 Discrete Probability Distributionsfaculty.weber.edu/.../L05StatsIDiscreteProbDists.pdfChapter 5 Discrete Probability Distributions Random Variables Random Variables – Numerical

Expected Value

________________________________________

x f(x) xf(x)

0 .40 .00

1 .25 .25

2 .20 .40

3 .05 .15

4 .10 .40

E(x) =

Page 13: Chapter 5 Discrete Probability Distributionsfaculty.weber.edu/.../L05StatsIDiscreteProbDists.pdfChapter 5 Discrete Probability Distributions Random Variables Random Variables – Numerical

Expected Value and Variance

Before

Variance of Grouped

Data

Where N was ∑ fi

Now

Variance of A

random Variable

2

2

f M

Ni i( ) Var(x) = 2 = (x - )2f(x)

For Standard Deviation, we just take the positive square

root of the Variance

Page 14: Chapter 5 Discrete Probability Distributionsfaculty.weber.edu/.../L05StatsIDiscreteProbDists.pdfChapter 5 Discrete Probability Distributions Random Variables Random Variables – Numerical

Variance of a Random Variable

0

1

2

3

4

-1.2

-0.2

0.8

1.8

2.8

1.44

0.04

0.64

3.24

7.84

.40

.25

.20

.05

.10

.576

.010

.128

.162

.784

x - (x - )2 f(x) (x - )2f(x)

Variance of daily sales = 2 = 1.660

x

TVs squared

Standard deviation of daily sales = 1.2884 TVs

Study Tip: Columns are an effective way to stay

organized and solve problem quickly.

Page 15: Chapter 5 Discrete Probability Distributionsfaculty.weber.edu/.../L05StatsIDiscreteProbDists.pdfChapter 5 Discrete Probability Distributions Random Variables Random Variables – Numerical

Binomial Distribution

How to use the binomial

How to use the table to find binomial

probabilities

How to calculate expected value and

variance

Combine two things:

◦ Understanding of Counting Techniques

◦ Understanding of probability of independent

events

Page 16: Chapter 5 Discrete Probability Distributionsfaculty.weber.edu/.../L05StatsIDiscreteProbDists.pdfChapter 5 Discrete Probability Distributions Random Variables Random Variables – Numerical

Binomial Distribution Has 4 properties

When called upon to determine whether something follows the

Binomial Distribution, you come back to these 4 properties.

1. The experiment consists of a sequence of n identical trials

◦ Flip a coin 10 times, Roll a die 8 times, Number of parts that break out of 20

selected

2. Two outcomes, SUCCESS and FAILURE are possible on each trial

◦ Heads = success, tails = failure; 1 = success, 2-6 = failure, break = success, fine

= failure.

3. The probability of success, denoted p, does not change from trial to

trial

4. Trials are independent

◦ When Probabilities are independent, how do we calculate probabilities?

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

Page 17: Chapter 5 Discrete Probability Distributionsfaculty.weber.edu/.../L05StatsIDiscreteProbDists.pdfChapter 5 Discrete Probability Distributions Random Variables Random Variables – Numerical

Example

Flip a coin three times. What is the probability

of exactly two heads showing up?

◦ Is this a binomial experiment?

n identical trials?

Two outcomes, success/failure?

Probability of success does not change?

Trials independent?

◦ __________________________

Our interest is in the number of successes out

of n trials.

__________________________

Page 18: Chapter 5 Discrete Probability Distributionsfaculty.weber.edu/.../L05StatsIDiscreteProbDists.pdfChapter 5 Discrete Probability Distributions Random Variables Random Variables – Numerical

Binomial Distribution

Example:

Lets consider the next three customers that

enter a clothing store. Probability that any one

customer makes a purchase is .3. What is the

probability that two of the three next

customers will make a purchase?

◦ Is this a binomial experiment? n identical trials?

Two outcomes, success/failure?

Probability of success does not change?

Trials independent?

Page 19: Chapter 5 Discrete Probability Distributionsfaculty.weber.edu/.../L05StatsIDiscreteProbDists.pdfChapter 5 Discrete Probability Distributions Random Variables Random Variables – Numerical

Binomial Distribution

Exp. Outcome Value of x

(s, s, s) 3

(s, s, f) 2

(s, f, s) 2

(s, f, f) 1

(f, s, s) 2

(f, s, f) 1

(f, f, s) 1

(f, f, f) 0

Break it down simply ◦ What is the probability of

Customers 1 and 2 buying,

but not the third? (Hint:

Remember that the

probabilities are

independent.)

◦ P(s)*P(s)*P(f)

◦ .30 *.30 * .70 = .063

◦ Now, what are the other

combinations of 2 people

buying something and the

other one not?

•So there are three ways of having exactly 2

out of three people buy something.

•Each occurs with .063 probability

•.063 + .063 + .063 = .189

•3*.063 = .189

Pro

bab

ility

of an

y eve

nt:

Equal

to t

he s

um

of th

e

pro

bab

ilities

of th

e s

ample

poin

ts in t

he e

vent.

Page 20: Chapter 5 Discrete Probability Distributionsfaculty.weber.edu/.../L05StatsIDiscreteProbDists.pdfChapter 5 Discrete Probability Distributions Random Variables Random Variables – Numerical

Binomial Distribution We don’t want to list outcomes each time, so

let’s come up with some short cuts.

We will use

n = number of trials …=3

x = number of successes …=2

p = probability of success …=.3

Our answer resulted from doing 3* P(s)*P(s)*P(f)

3* p2(1-p)1; Plugging in the general case gives 3*px(1-p)n-x

How do we CHOOSE 2 out of three?

A combination!

3!/2!(3-2)! = 6/2 = 3

Completely general.

( )!( ) (1 )

!( )!x n xn

f x p px n x

Page 21: Chapter 5 Discrete Probability Distributionsfaculty.weber.edu/.../L05StatsIDiscreteProbDists.pdfChapter 5 Discrete Probability Distributions Random Variables Random Variables – Numerical

Binomial Distribution

( )!

( ) (1 )!( )!

x n xnf x p p

x n x

Probability of a particular sequence of trial outcomes with x successes in n trials

Number of experimental outcomes providing exactly x successes in n trials

Page 22: Chapter 5 Discrete Probability Distributionsfaculty.weber.edu/.../L05StatsIDiscreteProbDists.pdfChapter 5 Discrete Probability Distributions Random Variables Random Variables – Numerical

Binomial Distribution

Example: Evans Electronics

Evans is concerned about a low retention rate for

employees. In recent years, management has seen a

turnover of 10% of the hourly employees annually. Thus,

for any hourly employee chosen at random, management

estimates a probability of 0.1 that the person will not be

with the company next year.

Page 23: Chapter 5 Discrete Probability Distributionsfaculty.weber.edu/.../L05StatsIDiscreteProbDists.pdfChapter 5 Discrete Probability Distributions Random Variables Random Variables – Numerical

Binomial Distribution

Choosing 3 hourly employees at random,

what is the probability that 1 of them will

leave the company this year?

f xn

x n xp px n x( )

!

!( )!( )( )

1

Let: p = .10, n = 3, x = 1

Page 24: Chapter 5 Discrete Probability Distributionsfaculty.weber.edu/.../L05StatsIDiscreteProbDists.pdfChapter 5 Discrete Probability Distributions Random Variables Random Variables – Numerical

Using Tables of Binomial

Probabilities

n x .05 .10 .15 .20 .25 .30 .35 .40 .45 .50

3 0 .8574 .7290 .6141 .5120 .4219 .3430 .2746 .2160 .1664 .1250

1 .1354 .2430 .3251 .3840 .4219 .4410 .4436 .4320 .4084 .3750

2 .0071 .0270 .0574 .0960 .1406 .1890 .2389 .2880 .3341 .3750

3 .0001 .0010 .0034 .0080 .0156 .0270 .0429 .0640 .0911 .1250

p

Notice the table has three main sections

1. n

2. x

3. P

4. These sections correspond to the value of interest from the

binomial distribution

Page 25: Chapter 5 Discrete Probability Distributionsfaculty.weber.edu/.../L05StatsIDiscreteProbDists.pdfChapter 5 Discrete Probability Distributions Random Variables Random Variables – Numerical

Binomial Distribution

(1 )np p

E(x) = = np

Var(x) = 2 = np(1 p)

Expected Value

Variance

Standard Deviation

Page 26: Chapter 5 Discrete Probability Distributionsfaculty.weber.edu/.../L05StatsIDiscreteProbDists.pdfChapter 5 Discrete Probability Distributions Random Variables Random Variables – Numerical

Binomial Distribution

Expected Value

Variance

Standard Deviation

3(.1)(.9) .52 employees

E(x) = = 3(.1) = .3 employees out of 3

Var(x) = 2 = 3(.1)(.9) = .27

Page 27: Chapter 5 Discrete Probability Distributionsfaculty.weber.edu/.../L05StatsIDiscreteProbDists.pdfChapter 5 Discrete Probability Distributions Random Variables Random Variables – Numerical

Example

In San Francisco, 30% of workers take

public transportation daily.

◦ In a sample of 10 workers, what is the

probability that exactly three workers take

public transportation?

◦ In a sample of 10 workers, what is the

probability that at least three workers take

public transportation daily?

Page 28: Chapter 5 Discrete Probability Distributionsfaculty.weber.edu/.../L05StatsIDiscreteProbDists.pdfChapter 5 Discrete Probability Distributions Random Variables Random Variables – Numerical

Poisson Distribution

Discrete random variable distribution

Used in Estimating

◦ Number of Occurrences over a time or space

interval

PROPERTIES

1. The probability of an occurrence is the

same for any two intervals of equal length.

2. Occurrences and nonoccurrences in any

interval are____________of other

occurrencences of nonoccurrences

Page 29: Chapter 5 Discrete Probability Distributionsfaculty.weber.edu/.../L05StatsIDiscreteProbDists.pdfChapter 5 Discrete Probability Distributions Random Variables Random Variables – Numerical

Poisson

Examples

The number of knotholes in 14 linear feet

of pine board

The number of vehicles arriving at a toll

both in one hour

Page 30: Chapter 5 Discrete Probability Distributionsfaculty.weber.edu/.../L05StatsIDiscreteProbDists.pdfChapter 5 Discrete Probability Distributions Random Variables Random Variables – Numerical

Poisson Distribution

Poisson Probability Function

f xe

x

x

( )!

where:

• f(x) = probability of ________________in an interval

• = ______________of occurrences in an interval

• e = 2.71828

Page 31: Chapter 5 Discrete Probability Distributionsfaculty.weber.edu/.../L05StatsIDiscreteProbDists.pdfChapter 5 Discrete Probability Distributions Random Variables Random Variables – Numerical

Example: Mercy Hospital

Poisson Distribution

MERCY Patients arrive at the

emergency room of Mercy

Hospital at the average

rate of 6 per hour on

weekend evenings.

What is the

probability of 4 arrivals in

30 minutes on a weekend evening?

f xe

x

x

( )!

Page 32: Chapter 5 Discrete Probability Distributionsfaculty.weber.edu/.../L05StatsIDiscreteProbDists.pdfChapter 5 Discrete Probability Distributions Random Variables Random Variables – Numerical

Poisson

Using the Function

4 33 (2.71828)(4) .1680

4!f

= 6/hour = 3/half-hour, x = 4

MERCY

f xe

x

x

( )!

where:

• f(x) = probability of x occurrences in an interval

• = mean number of occurrences in an interval

• e = 2.71828

Page 33: Chapter 5 Discrete Probability Distributionsfaculty.weber.edu/.../L05StatsIDiscreteProbDists.pdfChapter 5 Discrete Probability Distributions Random Variables Random Variables – Numerical

Poisson

Special Property, MEAN = VARIANCE

Variance for number of arrivals during 30

minute periods

= 2

= 2 = 3

MERCY

Page 34: Chapter 5 Discrete Probability Distributionsfaculty.weber.edu/.../L05StatsIDiscreteProbDists.pdfChapter 5 Discrete Probability Distributions Random Variables Random Variables – Numerical

Hypergeometric Distribution

Closely related to the Binomial

Distribution

Again we are interested in x, the number

of successes in n trials

Differences for Hypergeometric:

◦ Trials are ________________!

◦ The probability of success changes from trial

to trial

Page 35: Chapter 5 Discrete Probability Distributionsfaculty.weber.edu/.../L05StatsIDiscreteProbDists.pdfChapter 5 Discrete Probability Distributions Random Variables Random Variables – Numerical

Hypergeometric Distribution

Properties

1. The set to be sampled consists of N elements

2. Each element can be characterized as a SUCCESS or

FAILURE.

◦ There are a total of r success in the set to be sampled

3. A sample of n elements is selected without

replacement

The distribution tells us:

◦ f(x) = probability of x success in n trials

NOTICE

◦ Independence is gone

◦ Equal probability between trials is gone.

Page 36: Chapter 5 Discrete Probability Distributionsfaculty.weber.edu/.../L05StatsIDiscreteProbDists.pdfChapter 5 Discrete Probability Distributions Random Variables Random Variables – Numerical

Hypergeometric Distribution

Probability Function

n

N

xn

rN

x

r

xf )( for 0 < x < r

where: f(x) = probability of x successes in n trials

n = number of trials

N = number of elements in the population

r = number of elements in the population

labeled success

Page 37: Chapter 5 Discrete Probability Distributionsfaculty.weber.edu/.../L05StatsIDiscreteProbDists.pdfChapter 5 Discrete Probability Distributions Random Variables Random Variables – Numerical

Hypergeometric Distribution

( )

r N r

x n xf x

N

n

for 0 < x < r

number of ways n – x failures can be selected from a total of N – r failures in the population

number of ways x successes can be selected from a total of r successes in the population

number of ways a sample of size n can be selected from a population of size N

Page 38: Chapter 5 Discrete Probability Distributionsfaculty.weber.edu/.../L05StatsIDiscreteProbDists.pdfChapter 5 Discrete Probability Distributions Random Variables Random Variables – Numerical

Hypergeometric

General Principle

◦ Probability =

Two Key ideas from old material

◦ To get outcomes we are going to use counting rules

◦ Number of ways to choose n success out of N trials?

1. CNn is how we get the denominator

◦ There are r total success and we want to choose x. How

do we do it? …There are (N-r) total Failures and we are

interested in (n-x) of those failures. How do we do it?

Crx … CN-r

n-x

2. We multiply these to get outcomes of interest because

of counting rule number 1

Number of Outcomes of Interest

Number of total possible outcomes

Page 39: Chapter 5 Discrete Probability Distributionsfaculty.weber.edu/.../L05StatsIDiscreteProbDists.pdfChapter 5 Discrete Probability Distributions Random Variables Random Variables – Numerical

Hypergeometric

Example:

Bob Neveready has removed two dead batteries from a

flashlight and inadvertently mingled them with the two good batteries he intended as replacements. The four batteries look identical.

Bob now randomly selects two of the our

batteries. What is the probability he selects the two

good batteries?

DOES THIS FIT THE HYPERGEOMETRIC?

n = number of trials

N = number of elements in the population

r = number of elements in the population labeled success

2 4

2

Page 40: Chapter 5 Discrete Probability Distributionsfaculty.weber.edu/.../L05StatsIDiscreteProbDists.pdfChapter 5 Discrete Probability Distributions Random Variables Random Variables – Numerical

Hypergeometric

2 2 2! 2!

2 0 2!0! 0!2! 1( ) .167

4 4! 6

2 2!2!

r N r

x n xf x

N

n

where:

x = 2 = number of good batteries selected

n = 2 = number of batteries selected

N = 4 = number of batteries in total

r = 2 = number of good batteries in total

TIP: Write what you have, then plug and chug

Page 41: Chapter 5 Discrete Probability Distributionsfaculty.weber.edu/.../L05StatsIDiscreteProbDists.pdfChapter 5 Discrete Probability Distributions Random Variables Random Variables – Numerical

Hypergeometric

MEAN

Variance

( )r

E x nN

2( ) 11

r r N nVar x n

N N N

x = number of success in n trials

n = number of trials

N = number of elements in the population

r = number of elements in the population labeled success

Page 42: Chapter 5 Discrete Probability Distributionsfaculty.weber.edu/.../L05StatsIDiscreteProbDists.pdfChapter 5 Discrete Probability Distributions Random Variables Random Variables – Numerical

Hypergeometric

Mean

Variance

22 1

4

rn

N

2 2 2 4 2 12 1 .333

4 4 4 1 3

Page 43: Chapter 5 Discrete Probability Distributionsfaculty.weber.edu/.../L05StatsIDiscreteProbDists.pdfChapter 5 Discrete Probability Distributions Random Variables Random Variables – Numerical

Hypergeometric Distribution

When the population size is large, a

hypergeometric distribution can be

approximated by a binomial distribution