Download Chapter 5 Discrete Probability Distributions

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Statistics wikipedia , lookup

History of statistics wikipedia , lookup

Ars Conjectandi wikipedia , lookup

Probability wikipedia , lookup

Probability interpretations wikipedia , lookup

Transcript
L05
Chapter 5 Discrete Probability Distributions
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
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.
Random Variables
Question
Family
size
Random Variable x
x = Number of dependents
reported on tax return
Distance from x = Distance in miles from
home to store
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)
Type
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. ______
Discrete Probability Distributions
Using past data on TV sales, we have
 A tabular representation of the
probability distribution for TV sales

Units Sold
0
1
2
3
4
Number
of Days
80
50
40
10
20
200
x
0
1
2
3
4
f(x)
.40
.25
.20
.05
.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
Discrete Probability Distributions
_____________
.50
.40
.30
.20
.10
0
1
2
3
4
-_____________________________
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
the values of the
random variable
are equally likely
where:
n = the number of values the random
variable may assume
Uniform Discrete Probability
Distribution

Let X be the random variable that equals
the number of dots facing upward on a
rolled die.
f(x) = 1/n
How many outcome are there?
6
 So f(x) = _____ where x =
___________

Probability of any event: Equal to the sum of the
probabilities of the sample points in the event.
Example



The director of admissions at Lakeville College
subjectively assessed a probability distribution for x, the
number of entering students as follows.
x
f(x)
1000
.15
1100
.20
1200
.30
1300
.25
1400
.10
Is the probability distribution valid? Explain
What is the probability of 1200 or fewer entering
students?
Expected Value and Variance

Before
Now
 Expected Value of a
Random Variable

wx

x
w
i i
i
E(x) =  = xf(x)
Expected Value
x
0
1
2
3
4
f(x)
xf(x)
.40
.00
.25
.25
.20
.40
.05
.15
.10
.40
E(x) =
____________________
____________________
Expected Value and Variance
Before
 Variance of Grouped
Data

2
f
(
M


)

i
i
2 
N

Now
 Variance of A
random Variable

Var(x) =  2 = (x - )2f(x)
Where N was ∑ fi
For Standard Deviation, we just take the positive square
root of the Variance
Variance of a Random Variable
x
x-
0
1
2
3
4
-1.2
-0.2
0.8
1.8
2.8
(x - )2
1.44
0.04
0.64
3.24
7.84
f(x)
.40
.25
.20
.05
.10
(x - )2f(x)
.576
.010
.128
.162
.784
Variance of daily sales =  2 = 1.660
Standard deviation of daily sales = 1.2884 TVs
Study Tip: Columns are an effective way to stay
organized and solve problem quickly.
TVs
squared
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
Binomial Distribution


1.
Has 4 properties
When called upon to determine whether something follows the
Binomial Distribution, you come back to these 4 properties.
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
Two outcomes, SUCCESS and FAILURE are possible on each trial
2.
◦
Heads = success, tails = failure; 1 = success, 2-6 = failure, break = success, fine
= failure.
The probability of success, denoted p, does not change from trial to
trial
Trials are independent
3.
4.
◦
When Probabilities are independent, how do we calculate probabilities?
P(A  B) = P(A)P(B)
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.
 __________________________

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?
Probability of any event: Equal to the sum of the
probabilities of the sample points in the event.
Binomial Distribution
Exp. Outcome
Value of x
(s, s, s)
3

Break it down simply
◦ What is the probability of
(s, s, f)
2
Customers 1 and 2 buying,
(s, f, s)
2
but not the third? (Hint:
Remember that the
(s, f, f)
1
probabilities are
(f, s, s)
2
independent.)
(f, s, f)
1
◦ P(s)*P(s)*P(f)
(f, f, s)
1
◦ .30 *.30 * .70 = .063
(f, f, f)
0
◦ Now, what are the other
combinations of 2 people
•So there are three ways of having exactly 2 buying something and the
out of three people buy something.
other one not?
•Each occurs with .063 probability
•.063 + .063 + .063 = .189
•3*.063 = .189
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.








n!
f (x) 
p x (1  p )( n  x )
x !(n  x )!
Binomial Distribution
n!
f (x) 
p x (1  p )( n  x )
x !(n  x )!
Number of experimental
outcomes providing exactly
x successes in n trials
Probability of a particular
sequence of trial outcomes
with x successes in n trials
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.
Binomial Distribution

Choosing 3 hourly employees at random,
what is the probability that 1 of them will
leave the company this year?
Let: p = .10, n = 3, x = 1
f ( x) 
n!
p x (1  p ) (n  x )
x !( n  x )!
Using Tables of Binomial
Probabilities
p
n
x
.05
.10
.15
.20
.25
.30
.35
.40
.45
.50
3
0
1
2
3
.8574
.1354
.0071
.0001
.7290
.2430
.0270
.0010
.6141
.3251
.0574
.0034
.5120
.3840
.0960
.0080
.4219
.4219
.1406
.0156
.3430
.4410
.1890
.0270
.2746
.4436
.2389
.0429
.2160
.4320
.2880
.0640
.1664
.4084
.3341
.0911
.1250
.3750
.3750
.1250
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
Binomial Distribution

Expected Value
E(x) =  = np

Variance
Var(x) =  2 = np(1  p)

Standard Deviation
  np(1  p )
Binomial Distribution

Expected Value
E(x) =  = 3(.1) = .3 employees out of 3

Variance
Var(x) =  2 = 3(.1)(.9) = .27

Standard Deviation
  3(.1)(.9)  .52 employees
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?
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
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

Poisson Distribution

Poisson Probability Function
f ( x) 
 x e
x!
where:
•
f(x) = probability of ________________in an interval
•
 = ______________of occurrences in an interval
•
e = 2.71828
Poisson Distribution

Example: Mercy Hospital
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?
MERCY
f ( x) 
 x e
x!
Poisson

MERCY
Using the Function
 = 6/hour = 3/half-hour, x = 4
3 4 (2.71828)3
f (4) 

4!
f ( x) 
.1680
 x e
where:
x!
•
f(x) = probability of x occurrences in an interval
•
 = mean number of occurrences in an interval
•
e = 2.71828
Poisson

Special Property, MEAN = VARIANCE
=2

Variance for number of arrivals during 30
minute periods
MERCY
=2=3
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
Hypergeometric Distribution

1.
2.
Properties
The set to be sampled consists of N elements
Each element can be characterized as a SUCCESS or
FAILURE.
◦
There are a total of r success in the set to be sampled
A sample of n elements is selected without
replacement
The distribution tells us:
3.

◦
f(x) = probability of x success in n trials
NOTICE

◦
◦
Independence is gone
Equal probability between trials is gone.
Hypergeometric Distribution

Probability Function
 r  N  r 
 

x  n  x 

f ( x) 
N
 
n
where:
for 0 < x < r
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
Hypergeometric Distribution
f (x) 
r
x
 
N r
n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
Hypergeometric

General Principle
◦ Probability =

Number of Outcomes of Interest
Number of total possible outcomes
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-rn-x
2. We multiply these to get outcomes of interest because
of counting rule number 1
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?
2
n = number of trials
4
N = number of elements in the population
r = number of elements in the population labeled success 2
Hypergeometric
 r  N  r   2  2   2!  2! 
 x  n  x   2  0   2!0!  0!2! 
1









f (x) 


  .167
N
4
4!
6
 
 


n
2
 2!2! 
 
 


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
Hypergeometric

MEAN

Variance
 r 
E ( x)    n  
N
r  N  n 
 r 
Var ( x)    n  1  

 N  N  N  1 
2
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
Hypergeometric


Mean
 r 
2
  n   2   1
N
4
Variance
 2  2  4  2  1
  2  1  
   .333
 4  4  4  1  3
2
Hypergeometric Distribution

When the population size is large, a
hypergeometric distribution can be
approximated by a binomial distribution