Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Chapter 6 - Discrete Probability Distributions - Send

Download as pdf or txt
Download as pdf or txt
You are on page 1of 42

Chapter 6

Random Variables and Discrete


probability Distributions

1
7.1 Random Variables and Discrete Probability
Distribution
When the simple events in the sample space can be
assigned numerical values, a random variable can be
defined that takes on these values.
Examples:
◼ The number of cars entering a gas station in the
next five minutes.
◼ The amount of gas filled in a gas tank by a driver.

◼ The grade in a physics test.

2
There are two types of random variables:
◼ A random variable is discrete if it can assume only
a countable number of values.
◼ A random variable is continuous if it can assume an
uncountable number of values.
Discrete Probability Distribution
A table, formula, or graph that lists all members of
the sample space, together with the probabilities
associated with each value, is called a discrete
(probability) distribution.

Requirements for a Discrete Distribution


1. 0  p(x i )  1 for all xi
2.  p( xi ) = 1
all xi

4
To calculate the probability that the random variable X
assumes the value a, P(X = a),
◼ add the probabilities of all the simple events for
which X is equal to ‘a’, or
◼ Use probability calculation tools (such as tree
diagram),

5
Example 1: Find the probability distribution of the
random variable describing the number of heads that
turn-up when a coin is flipped twice.
◼ Solution
H HH (½)(½)=1/4
H
T HT (½)(½)=1/4
H TH (½)(½)=1/4
T
T TT (½)(½)=1/4

Simple event x x p(x)


TT 0 1/4 0 1/4
HT 1 1/4 1 1/2
TH 1 1/4 2 1/4
HH 2 1/4 6
Example 2: A survey reveals the following frequencies
for the number of colored TV per household.
Number Number of
of TVs Households p(x)
0 1,218 1218/Total = .012
1 32,379 32379/Total = .319
2 37,961 .374
3 19,387 .191
4 7,714 .076
5 2,842 .028
Total 101,501 1.000

7
Example 2 – continued
Calculate the probability of the following events:
◼ P(The number of colored TVs is 3) = P(X=3)
=.191
◼ P(The number of colored TVs is two or more)

=P(X=2)+P(X=3)+P(X=4)+P(X=5)
= .319+.374+…= .669

8
Example 3: The number of cars a dealer is selling daily
were recorded in the last 100 days. This data was
summarized as follows:

Daily sales Frequency ◼ Estimate the probability


0 5 distribution.
1 15 ◼ State the probability of
2 35 selling more than 2 cars
3 25 a day.
4 20
100
9
Daily sales Relative Frequency
0 5/100=.05 .35
.25
1 15/100=.15 .15
.20

2 35/100=.35 .05

3 25/100=.25 0 1 2 3 4 X
4 20/100=.20
1.00

◼ The probability of selling more than 2 cars a day is


P(X>2) = P(X=3) + P(X=4)
= .25 + .20 = .45
10
Developing a Probability Distribution
Example 4: A mutual fund sales person knows that
there is 20% chance of closing a sale on each call she
makes.
What is the probability distribution of the number of
sales if she plans to call three customers?

Solution
Use probability rules and probability tree
Define event Ai = {a sale is made in the iit phone
call}.
11
Developing a Probability Distribution: Assuming each
phone call is independent of all other phone calls, we
can assign the following probabilities to each branch
on the tree:
Sales Call 1 Sales Call 2 Sales Call 3

P(S)=.2 S S S
P(S)=.2
P(SC)=.8 S SCS
C
X P(x)
P(S)=.2 P(S)=.2 S S S 3 .23 = .008
P(SC)=.8
P(SC)=.8 S SC SC 2 3(.2)2(.8) =.096
P(S)=.2 SCS S 1 3 (.2)(.8)2 =.384
P(SC)=.8 P(S)=.2 0 .83 = .512
P(SC)=.8 SC S SC
P(S)=.2 S S S
C C

P(SC)=.8
P(SC)=.8 SC SC SC
12
The Expected Value (Mean)

Given a discrete random variable X with values xi,


that occurs with probabilities p(xi), the population
mean of X is.

E( X ) =  =  x i  p( x i )
all x i

The population mean is the weighted average of all of


its values. The weights are the probabilities.
13
The Population Variance
Let X be a discrete random variable with
possible values xi that occur with probabilities
p(xi), and let E(xi) = m. The variance of X is
defined by

V ( X ) =  = E( X − )  =  ( x i − ) p( x i )
2 2 2

all xi

The s tan dard deviation is


 = 2

14
Example 5: Find the mean the variance and the
standard deviation for the population of the number
of colored TV per household in example 2
Solution
◼ E(X) = m = Sxip(xi) = 0p(0)+1p(1)+2p(2)+…

= 0(.012)+1(.319)+2(.374)+… = 2.084
◼ V(X) = s2 = S(xi - m)2p(xi) = (0-2.084)2p(0)+(1-
2.084)2p(1) + (2-2.084)2+… = 1.107
◼ s = 1.1071/2 = 1.052

Using a shortcut formula


for the variance

15
Solution – continued
◼ The variance can also be calculated as follows:

V ( X ) =  2 = E( X 2 ) −  2 =  x i2 p( x i ) −  2 =
all xi

0 p(0) + 1 p(1) + 2 p(2) + ...− 2.084


2 2 2 2
= 1.107

It is the weighted average of the squared


deviations from the mean

16
Laws of Expected Value…
E(c) = c
The expected value of a constant (c) is just the value of the
constant.
E(X + c) = E(X) + c
E(cX) = cE(X)
Example: Monthly sales have a mean of $25,000 and a
standard deviation of $4,000. Profits are calculated by
multiplying sales by 30% and subtracting fixed costs of
$6,000. Find the mean monthly profit.
Laws of Variance…
V(c) = 0
V(X + c) = V(X)
V(cX) = c2V(X)
Example : Monthly sales have a mean of $25,000 and a
standard deviation of $4,000. Profits are calculated by
multiplying sales by 30% and subtracting fixed costs of
$6,000. Find the standard deviation of monthly profits.
7.4 The Binomial Distribution

◼ The binomial experiment has the following


characteristics:
◼ There are n trials (n is finite and fixed).
◼ Each trial can result in one out of two outcomes,
success or a failure.
◼ The probability p of a success is the same for all the
trials.
◼ All the trials of the experiment are independent.

21
Binomial Random Variable

◼ The binomial random variable counts the


number of successes in n trials of the
binomial experiment.
◼ The possible values of this count are 0,1, 2,
…,n, and therefore the binomial variable is
discrete.

22
The Binomial Probability Distribution
The binomial probability distribution is described by
the following closed form formula:

P( X = x) = p( x) = ( )p (1 − p) n
x
x n− x

xác sut s ln success trong n ln th

n!
where ( ) = n

x! (n − x)!
x

23
Developing the Binomial Probability Distribution
(n = 3)
S2

S1

F2

S2

F1

F2
24
Developing the Binomial Probability Distribution
(n = 3)
S3 P(SSS)=p3
S2

S1 F3 P(SSF)=p2(1-p)
S3 P(SFS)=p(1-p)p

F2 Since the outcome of each


F3 P(SFF)=p(1-p)
trial is independent of the 2

previous outcomes, we can


S2 replace theSconditional
3 P(FSS)=(1-p)p2

probabilities with the


unconditionalF probabilities.
P(FSF)=(1-p)P(1-p)
3
S3 P(FFS)=(1-p)2p
F1

F2
F3 P(FFF)=(1-p)3
25
P(X = 3) = P(Three successes) = P(SSS) = p3

P(X = 2) = P(Two successes, one Failure) = P(SSF) +


P(SFS) + P(FSS) = p2(1-p) + p(1-p)p + (1-p)pp =
p2(1-p) + p2(1-p) + p2(1-p) = 3 p2(1-p).

P(X = 1) = P(One success, two failures) = P(SFF) +


P(FSF) + P(FFS) = p(1-p)2 + (1-p)p(1-p) + (1-p)2p =
p(1-p)2 + p(1-p)2 + p(1-p)2 = 3 p(1-p)2

P(X = 0) = P(Three failures) = P(FFF) = (1-p)3

26
Example 10
Pat takes a course in statistics, and intends to rely
on luck to pass the next quiz.
The quiz consists on 10 multiple choice questions
with 5 possible choices for each question, only one
is the correct answer.
Pat will guess the answer to each question
Find the following probabilities
•Pat gets no answer correct
•Pat gets two answer correct
•Pat fails the quiz
27
Checking the conditions

• Only one out of two outcomes can occur


(An answer can be either correct or incorrect).
• There is a fixed finite number of trials
(There are 10 questions in the test, n=10).
• Each answer is independent of the others.
• The probability p of a correct answer does not
change from question to question
(20% chance that an answer is correct).

28
Let X = the number of correct answers
10!
P(X = 0) = (.20)0 (.80)10 = .1074
0! (10 − 0)!
10!
P(X = 2) = (.20) 2 (.80)10− 2 = .3020
2!(10 − 2)!
Pat fails the test if she gets less than 5 correct
answers.
P(X4) = p(0) + p(1) + p(2) + p(3) + p(4)
= .1074 + .2684 + .3020 + .2013
+.0881 =.9672
This is called cumulative probability
29
Binomial Table…
The probabilities listed in the tables are cumulative,
i.e. P(X ≤ k) – k is the row index; the columns of the table
are organized by P(success) = p
n = 10
k 0.01 0.05 0.1 0.2 0.25 0.3 0.4 0.5 0.6 0.7 0.75 0.8 0.9 0.95 0.99
0 0.9044 0.5987 0.3487 0.1074 0.0563 0.0282 0.0060 0.0010 0.0001 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
1 0.9957 0.9139 0.7361 0.3758 0.2440 0.1493 0.0464 0.0107 0.0017 0.0001 0.0000 0.0000 0.0000 0.0000 0.0000
2 0.9999 0.9885 0.9298 0.6778 0.5256 0.3828 0.1673 0.0547 0.0123 0.0016 0.0004 0.0001 0.0000 0.0000 0.0000
3 1.0000 0.9990 0.9872 0.8791 0.7759 0.6496 0.3823 0.1719 0.0548 0.0106 0.0035 0.0009 0.0000 0.0000 0.0000
4 1.0000 0.9999 0.9984 0.9672 0.9219 0.8497 0.6331 0.3770 0.1662 0.0473 0.0197 0.0064 0.0001 0.0000 0.0000
5 1.0000 1.0000 0.9999 0.9936 0.9803 0.9527 0.8338 0.6230 0.3669 0.1503 0.0781 0.0328 0.0016 0.0001 0.0000
6 1.0000 1.0000 1.0000 0.9991 0.9965 0.9894 0.9452 0.8281 0.6177 0.3504 0.2241 0.1209 0.0128 0.0010 0.0000
7 1.0000 1.0000 1.0000 0.9999 0.9996 0.9984 0.9877 0.9453 0.8327 0.6172 0.4744 0.3222 0.0702 0.0115 0.0001
8 1.0000 1.0000 1.0000 1.0000 1.0000 0.9999 0.9983 0.9893 0.9536 0.8507 0.7560 0.6242 0.2639 0.0861 0.0043
9 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 0.9999 0.9990 0.9940 0.9718 0.9437 0.8926 0.6513 0.4013 0.0956
“What is the probability that Pat gets no answers correct?”
i.e. what is P(X = 0), given P(success) = .20 and n=10 ?

n = 10
k 0.01 0.05 0.1 0.2 0.25 0.3 0.4 0.5 0.6 0.7 0.75 0.8 0.9 0.95 0.99
0 0.9044 0.5987 0.3487 0.1074 0.0563 0.0282 0.0060 0.0010 0.0001 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
1 0.9957 0.9139 0.7361 0.3758 0.2440 0.1493 0.0464 0.0107 0.0017 0.0001 0.0000 0.0000 0.0000 0.0000 0.0000
2 0.9999 0.9885 0.9298 0.6778 0.5256 0.3828 0.1673 0.0547 0.0123 0.0016 0.0004 0.0001 0.0000 0.0000 0.0000
3 1.0000 0.9990 0.9872 0.8791 0.7759 0.6496 0.3823 0.1719 0.0548 0.0106 0.0035 0.0009 0.0000 0.0000 0.0000
4 1.0000 0.9999 0.9984 0.9672 0.9219 0.8497 0.6331 0.3770 0.1662 0.0473 0.0197 0.0064 0.0001 0.0000 0.0000
5 1.0000 1.0000 0.9999 0.9936 0.9803 0.9527 0.8338 0.6230 0.3669 0.1503 0.0781 0.0328 0.0016 0.0001 0.0000
6 1.0000 1.0000 1.0000 0.9991 0.9965 0.9894 0.9452 0.8281 0.6177 0.3504 0.2241 0.1209 0.0128 0.0010 0.0000
7 1.0000 1.0000 1.0000 0.9999 0.9996 0.9984 0.9877 0.9453 0.8327 0.6172 0.4744 0.3222 0.0702 0.0115 0.0001
8 1.0000 1.0000 1.0000 1.0000 1.0000 0.9999 0.9983 0.9893 0.9536 0.8507 0.7560 0.6242 0.2639 0.0861 0.0043
9 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 0.9999 0.9990 0.9940 0.9718 0.9437 0.8926 0.6513 0.4013 0.0956

P(X = 0) = P(X ≤ 0) = .1074


“What is the probability that Pat gets two answers correct?”
i.e. what is P(X = 2), given P(success) = .20 and n=10 ?

n = 10
k 0.01 0.05 0.1 0.2 0.25 0.3 0.4 0.5 0.6 0.7 0.75 0.8 0.9 0.95 0.99
0 0.9044 0.5987 0.3487 0.1074 0.0563 0.0282 0.0060 0.0010 0.0001 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
1 0.9957 0.9139 0.7361 0.3758 0.2440 0.1493 0.0464 0.0107 0.0017 0.0001 0.0000 0.0000 0.0000 0.0000 0.0000
2 0.9999 0.9885 0.9298 0.6778 0.5256 0.3828 0.1673 0.0547 0.0123 0.0016 0.0004 0.0001 0.0000 0.0000 0.0000
3 1.0000 0.9990 0.9872 0.8791 0.7759 0.6496 0.3823 0.1719 0.0548 0.0106 0.0035 0.0009 0.0000 0.0000 0.0000
4 1.0000 0.9999 0.9984 0.9672 0.9219 0.8497 0.6331 0.3770 0.1662 0.0473 0.0197 0.0064 0.0001 0.0000 0.0000
5 1.0000 1.0000 0.9999 0.9936 0.9803 0.9527 0.8338 0.6230 0.3669 0.1503 0.0781 0.0328 0.0016 0.0001 0.0000
6 1.0000 1.0000 1.0000 0.9991 0.9965 0.9894 0.9452 0.8281 0.6177 0.3504 0.2241 0.1209 0.0128 0.0010 0.0000
7 1.0000 1.0000 1.0000 0.9999 0.9996 0.9984 0.9877 0.9453 0.8327 0.6172 0.4744 0.3222 0.0702 0.0115 0.0001
8 1.0000 1.0000 1.0000 1.0000 1.0000 0.9999 0.9983 0.9893 0.9536 0.8507 0.7560 0.6242 0.2639 0.0861 0.0043
9 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 0.9999 0.9990 0.9940 0.9718 0.9437 0.8926 0.6513 0.4013 0.0956

P(X = 2) = P(X≤2) – P(X≤1) = .6778 – .3758 = .3020


remember, the table shows cumulative probabilities…
What is the probability that Pat fails the quiz”?
i.e. what is P(X ≤ 4), given P(success) = .20 and n=10 ?

n = 10
k 0.01 0.05 0.1 0.2 0.25 0.3 0.4 0.5 0.6 0.7 0.75 0.8 0.9 0.95 0.99
0 0.9044 0.5987 0.3487 0.1074 0.0563 0.0282 0.0060 0.0010 0.0001 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
1 0.9957 0.9139 0.7361 0.3758 0.2440 0.1493 0.0464 0.0107 0.0017 0.0001 0.0000 0.0000 0.0000 0.0000 0.0000
2 0.9999 0.9885 0.9298 0.6778 0.5256 0.3828 0.1673 0.0547 0.0123 0.0016 0.0004 0.0001 0.0000 0.0000 0.0000
3 1.0000 0.9990 0.9872 0.8791 0.7759 0.6496 0.3823 0.1719 0.0548 0.0106 0.0035 0.0009 0.0000 0.0000 0.0000
4 1.0000 0.9999 0.9984 0.9672 0.9219 0.8497 0.6331 0.3770 0.1662 0.0473 0.0197 0.0064 0.0001 0.0000 0.0000
5 1.0000 1.0000 0.9999 0.9936 0.9803 0.9527 0.8338 0.6230 0.3669 0.1503 0.0781 0.0328 0.0016 0.0001 0.0000
6 1.0000 1.0000 1.0000 0.9991 0.9965 0.9894 0.9452 0.8281 0.6177 0.3504 0.2241 0.1209 0.0128 0.0010 0.0000
7 1.0000 1.0000 1.0000 0.9999 0.9996 0.9984 0.9877 0.9453 0.8327 0.6172 0.4744 0.3222 0.0702 0.0115 0.0001
8 1.0000 1.0000 1.0000 1.0000 1.0000 0.9999 0.9983 0.9893 0.9536 0.8507 0.7560 0.6242 0.2639 0.0861 0.0043
9 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 0.9999 0.9990 0.9940 0.9718 0.9437 0.8926 0.6513 0.4013 0.0956

P(X ≤ 4) = .9672
The binomial table gives cumulative probabilities for
P(X ≤ k)

P(X = k) = P(X ≤ k) – P(X ≤ [k–1])

P(X ≥ k) = 1 – P(X ≤ [k–1])


Mean and Variance - Binomial Variable

E(X) = m = np
V(X) = s2 = np(1-p)

35
Example 11: If all the students in Pat’s class practice
the same learning behavior like she does, what is the
mean and the standard deviation of the quiz mark?
Solution
m = np = 10(.2) = 2.
s = [np(1-p)]1/2 = [10(.2)(.8)]1/2 = 1.26.

36
Example 12
Records show that 30% of the customers in a shoe
store make their payments using a credit card.
This morning 20 customers purchased shoes.
Find the probability that at most 11 customers use
a credit card?

37
◼ This is a binomial experiment:
•There are two possible outcomes of which only
one will take place (paid with the credit card or
not)
•There is a finite number of trials (20 customers
are observed)
•Customers pay independently
•Each customer has the same probability to pay
with a credit card (. 30).

38
Find the probability that at most 11 customers use
a credit card.

Use the Binomial Table

n = 20
p
k .01……….. .30
0
.
. P(X  11) = .995
11 .995

39
◼ Whatis the probability that at least 3 but not
more than 6 customers used a credit card?
Not more than 6

p .573
k .01……….. .30
0 0 1 2 3 34 45 56 6
2 .035 P(X6)
. - P(X2) 40
6 .608

P(3X6)=P(X=3 or 4 or 5 or 6)
=.608 - .035 = .573
Find the probability that exactly 14 customers did
not use a credit card.
Let Y be the number of customers who did not use
a credit card, while X (as before) the number of
those who did use a credit card.
P(Y=14) = P(X=6) = P(X = 6) - P(X = 5) = .608 - .416 =
.192

41
What is the expected number of customers who
used a credit card?
E(X) = np = 20(.30) = 6

42

You might also like