Transcript chap11_2010

Chapter 11
Discrete Random Variables
and their Probability Distributions
Random Variables
• A random variable is a numerical outcome of a random
experiment
• A discrete random variable can take on only specific, isolated
numerical values,
– Finite discrete random variables: Discrete random variables that can
take on only finitely many values (like the outcome of a roll of a die)
– Infinite discrete random variables: Discrete random variables that can
take on an unlimited number of values (like the number of stars
estimated to be in the universe)
• A continuous random variable can take on any values within
a continuous range or an interval (like the temperature, or the
height of an athlete in centimeters.)
Random Variables
Example
• Experiment: Next four customers who enter a bank
• Random variable x: the number of customers who make a
deposit (D)
• x = 1 represents the event “exactly one customer makes a
deposit”
x
Outcomes
0
NNNN
1
DNNN,NDNN,NNDN,NNND
2
DDNN,DNDN,DNND,NDDN,NDND,NNDD
3
DDDN,DDND,DNDD,NDDD
4
DDDD
D represents a customer who makes a deposit,
N represents a customer who does not.
Discrete vs. Continuous
Random Variables
DISCRETE
CONTINUOUS
Values that can be counted and
ordered
Values that cannot be counted
Gap between consecutive values
On continuous spectrum
Examples:
1) Insurance claims filed in one day
2) Cars sold in one month
3) Employees who call in sick on a
day
Examples:
1) Time to check out a customer
2) Weight of an outgoing shipment
3) Distance traveled by a truck in a
single day
4) Price of a gallon of gas
Measure with a specific amount of
precision
Probability Distributions of a
Discrete Random Variable
• The distribution of a random variable is the collection of
possible outcomes along with their probabilities. This may
be described by a table, a formula, or a probability
histogram.
• The probability assigned to each value of x lies in the
range 0-1.
0  P( x )  1
• The sum of all the probabilities of x must equal 1.
 P(x )  1
Probability Distributions of a Discrete
Random Variable: Example
• The probability distribution of x describes a list of all the
possible values that a x can assume and their corresponding
probabilities.
x
Outcomes
P(X)
0
NNNN
1/16 = .0625
1
DNNN, NDNN, NNDN, NNND
4/16 = .2500
2
DDNN, DNDN, DNND, NDDN, NDND, NNDD
6/16 = .3750
3
DDDN, DDND, DNDD, NDDD
4/16 = .2500
4
DDDD
1/16 = .0625
CALCULATE the probability of :
• P(Exactly one depositor in four customers) or P(x=1)
• P(two or more depositors) or P(x2)
• P(Fewer than four depositors) or (P(x<4)
Mean of a Discrete Random
Variable
• The mean of a discrete random variable, m, is actually the mean
of its probability distribution.
• The mean is also called the expected value and is denoted by
E (x).
m  E( x )   xP( x )
x
Outcomes
P(X)
xP(x)
0
NNNN
1/16 = .0625
0 (.0625)= 0
1
DNNN,NDNN,NNDN,NNND
4/16 = .2500
1 (.25)=
2
DDNN,DNDN,DNND,NDDN,NDND,NNDD
6/16 = .3750
2 (.375)= .75
3
DDDN,DDND,DNDD,NDDD
4/16 = .2500
3 (.25)=
4
DDDD
1/16 = .0625
4 (.0625)= .25
SxP(x) =
2.00
.25
.75
Standard Deviation of a
Discrete Random Variable
• The standard deviation, s, of a discrete random variable
measures the spread of its probability distribution.
• A higher value indicated that x can assume values over a
larger range ± the mean.
s
2
(
x

m
)
P( x )

s
x2
x2P(x)
0 (.0625)= 0
0
0
4/16 = .2500
1 (.25)=
.25
1
.25
2
6/16 = .3750
2 (.375)= .75
4
1.5
3
4/16 = .2500
3 (.25)=
.75
9
2.25
4
1/16 = .0625
4 (.0625)= .25
16
1
Sx2P(x) =
5
x
P(X)
0
1/16 = .0625
1
SxP(x) =
xP(x)
2.00
2
2
x
P
(
x
)

m

s
 x P( x )  m
2
 5  22
1
2
EXAMPLE: Discrete Random
Variable Calculations
• Accidents do happen at Brown’s Manufacturing Corp.
Let x be the number of accidents that occur during a
month, with their probability distribution.
• Find: m , s
X
P(X)
0
.25
1
.30
2
.20
3
.15
4
.10
Binomial Distribution
A binomial experiment (also known as a Bernoulli trial) is a
statistical experiment that has the following properties:
• The experiment consists of n repeated trials.
• Each trial can result in just two possible outcomes. We call
one of these outcomes a success and the other, a failure.
• The probability of success, denoted by P, is the same on
every trial.
• The trials are independent; that is, the outcome on one trial
does not affect the outcome on other trials.
• Binomial probability distributions one of the most widely
used discrete probability distributions
Combinations
• Combinations: Give the number of ways x elements can be
selected from n elements.
– Combinations are expressed as nCx (meaning n
elements from which x elements are selected)
– Example: How many ways to combine managers A,B,C
and D in groups of two? 6C2
• AB,AC,AD,BC,BD,CD
– Calculated as:
n Cx 
(so 6. Note that order doesn’t matter).
n!
x! (n  x )!
– Calculate the above example (selecting 2 out of 6
managers) using the formula.
Binomial Probability Distribution
• The probability distribution of x in binomial experiments is called
binomial (probability) distribution.
• The probability of exactly x successes in n trials is:
P(x)= nCx pxqn-x
Where
n = total number of trials
p= probability of success
q= probability of failure = 1-p
x=number of successes in n trials
n-x= number of failures in n trials
Example: 15% of engineering students work full time. Using the binomial
probability formula find the probability that in a random sample of 5 students,
the number who work full time is:
(a) exactly 0
(b) exactly 2
(c) exactly 1
Binomial Probability Distribution
0.4000
0.3500
0.3000
0.2500
0.1
0.2000
0.5
0.9
0.1500
0.1000
0.0500
0.0000
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
Binomial Distribution using
MINITAB
•
Quality department selects n items from a shipment and observes the number
of defective items. If the number of defects is not more than x the shipment
is accepted.
–
–
–
–
•
Oaks received motors in shipments of 500
Quality control randomly selects 20 motors to inspect
If the sample has more than 2 defective motors the shipment is rejected.
The supplier promised that only 5% of its motors are defective.
Find the probability that a given shipment of 500 motors will be accepted.
AND find the probability that a given shipment of 500 motors will be rejected.
-
In MINITAB select Calc>Probability Distributions>Binomial
-
Choose cumulative probability
Enter number of trials
Enter Probability of success
Choose to input constant (to be the value for x)
Click ok
Binomial Distribution
Mean and Std Deviation
m= np
s  npq
Where n = total number of trials
p= probability of success
q=probability of failure = 1-p
Poisson Probability Distribution
A Poisson experiment is a statistical experiment that has
the following properties:
• The experiment results in outcomes that can be classified
as successes or failures.
• The average number of successes (μ) that occurs in a
specified region is known.
• The probability that a success will occur is proportional to
the size of the region.
• The probability that a success will occur in an extremely
small region is virtually zero.
Poisson Probability Distribution
• Applied to experiments with random and independent
occurrences.
– Each event is called an occurrence
– Independence means that one occurrence of an event does not influence
successive occurrences
– Good Examples:
• Accidents that occur at a company during a one-month period
• Number of customers in a grocery store during a one-hour interval.
– Not good Examples:
• Patients that arrive at a doctor’s office (since they have
appointments, not random).
• Arrival of commercial airplanes at an airport.
Calculating Poisson
P( x ) 
x e  
x!
•  represents average number of occurrences in an interval.
• x represents the actual number of occurrences
• e is approximately 2.71828
EXAMPLE: Let  be the average number of customers using an ATM per
hour.  = 5. What is the probability (x) that 8 customers will try to use
the machine in an hour.
- Solve using formula
- Solve using MINITAB
Calc->Probability Distributions->Poisson
Poisson Probability Distribution
Mean and Std Deviation
m= 
s2
s 
Poisson Probability Distribution
Mean and Std Deviation
Probability
Poisson Distribution
1
0.9
0.8
0.7
0.6
0.5
0.4
0.3
0.2
0.1
0
0.1
0.5
1
2
5
10
0
2
4
6
8
10
12
14
16
18
20
Negative Binomial Distribution
A negative binomial experiment is a statistical experiment
that has the following properties:
• The experiment consists of x repeated trials.
• Each trial can result in just two possible outcomes, a success
and a failure.
• The probability of success, denoted by P, is the same on
every trial.
• The trials are independent; that is, the outcome on one trial
does not affect the outcome on other trials.
• The experiment continues until r successes are observed,
where r is specified in advance.
Negative Binomial Distribution
• A negative binomial random variable is the number X of
repeated trials to produce r successes in a negative binomial
experiment.
• The negative binomial distribution is also known as the
Pascal distribution.
Negative Binomial Distribution
P ( x ) x 1Cr 1p q
r
x r
x: The number of trials required to produce r successes in a negative
binomial experiment.
r: The number of successes in the negative binomial experiment.
p: The probability of success on an individual trial.
q: The probability of failure on an individual trial. (This is equal to 1 - P.)
Negative Binomial Distribution
Mean and Variance
r
m
p
m: the average no. of trials required to produce r successes
r (1  p )
s 
2
p
2
Negative Binomial Distributions
Example
• Bob is a high school basketball player. He is a 70% free
throw shooter. That means his probability of making a free
throw is 0.70. During the season, what is the probability that
Bob makes his third free throw on his fifth shot?
• Solution: The probability of success (p) is 0.70, the number
of trials (x) is 5, and the number of successes (r) is 3.
P( x ) x 1Cr 1pr q x r  4 C2 (.7)3 (.3)2  .1852
Geometric Distribution
• The geometric distribution is a special case of the negative
binomial distribution. It deals with the number of trials
required for a single success. Thus, the geometric distribution
is negative binomial distribution where the number of
successes (r) is equal to 1.
• Outcomes are either success/failure. Trial continues until
success (defect) occurs for the first time.
– Useful for manufacturing where the line will be shut down for
recalibration upon first defect.
Geometric Distribution
• Negative Binomial Distribution:
P ( x ) x 1Cr 1p q
r
x r
• Geometric Distribution:
P ( x )  pq
x 1
x: The number of trials required to produce 1 success in a geometric
experiment.
p: The probability of success on an individual trial.
q: The probability of failure on an individual trial. (This is equal to 1 - P.)
Geometric Distribution
Mean and Variance
1
m
p
m: the average no. of trials required to produce 1 success
1 p
s  2
p
2
Geometric Distribution
Example
Bob is a high school basketball player. He is a 70% free throw
shooter. That means his probability of making a free throw is
0.70. What is the probability that Bob makes his first free
throw on his fifth shot?
Solution:
Probability of success (p) is 0.70, the number of trials (x)
is 5, and the number of successes (r) is 1. We enter these
values into the geometric formula.
P( x )  pq x 1  (.7)(.3)4  .00567
Geometric Distribution
Example
Military contractor is producing nuts that must be within .04
mm of specified diameter. If nut exceeds the limit the line
must be shut down and adjusted. The probability that the
diameter of a nut will exceeds the allowable error is .0014.
• What is the probability the machine will be shut down
exactly after the 100th nut is produced?
• What is the probability the machine will be shut down
exactly after the 200th nut is produced?
Hypergeometric Probability Distribution
• A sample of size n is randomly selected without
replacement from a population of N items.
• In the population, r items can be classified as successes,
and N - r items can be classified as failures.
• A hypergeometric random variable, x, is the number of
successes that result from a hypergeometric experiment
Hypergeometric Probability Distribution
P( x ) 
Where
N
r
N-r
n
x
n-x
r
Cx 
N r
N
Cn
Cn  x
= total number of elements in the population
= number of success in the population
= number of failures in the population
= number of trials (sample size)
= number of successes in trial
= number of failures in n trials
Hypergeometric Distribution
Mean and Variance
m  np
Where p= r/N
N n
s  np(1  p )(
)
N 1
2
Hypergeometric Probability Distribution
Example
Suppose we select 5 cards from an ordinary deck of playing cards. What is
the probability of obtaining 2 or fewer hearts?
Solution:
N = 52; since there are 52 cards in a deck.
r = 13; since there are 13 hearts in a deck.
n = 5; since we randomly select 5 cards from the deck.
x = 0 to 2; since our selection includes 0, 1, or 2 hearts.
We plug these values into the hypergeometric formula as follows:
13 C2  39 C3
13 C0  39 C5
P ( x  2) 
 .2743
P ( x  0) 
 .2215
C
52 5
52 C5
P ( x  1) 
13
C1 
52
39
C5
C4
 .4114
Hypergeometric Probability
in MINITAB
• Acceptance testing of ice cream cones Ice cream parlor
checks a batch of 400 waffle cones by checking 50 of
them. They will not buy them if more than 3 cones are
broken.
• What is the probability that the parlor will buy the cones if
35 of the 400 cones are broken.
– Define , n, r, N-r, x
– In MINITAB select: Calc-> Probability Distributions > Hypergeometric