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

1

Discrete Probability Distribution


Chapter 4
2

Introduction to Random Variables


 A random variable (r.v.) is a numerical description of the
outcome of an experiment.
 A discrete random variable may assume either a finite
number of values or an infinite sequence of values.
 A continuous random variable may assume any
numerical value in an interval or collection of intervals.
Random Variables

Ch. 4 Discrete Continuous Ch. 5


Random Variable Random Variable
3

Discrete Random Variables


With a finite sequence of values
Examples:

 Roll a six sided die twice


Let X be the number of times 4 comes up
(then possible outcomes x = 0, 1, or 2 times)

 Toss a coin 5 times.


Let X be the number of heads
(then possible outcomes x = 0, 1, 2, 3, 4, or 5)
4

Discrete Random Variables


With an infinite sequence of values
Examples:
 Count the number of vehicles going through the

cross harbour tunnel.


Let X be the number of vehicles
(then possible outcomes x = 0, 1, 2, 3, . . . )
 Count the number of insurance claims arriving an

insurance company in a randomly selected day.


Let X be the number of claims in a day
(then possible outcomes x = 0, 1, 2, 3, . . . )
In the above two examples, we can count the # of vehicles (or
claims), but there is no finite upper limits on the variable.
5

Discrete Probability Distribution


 The probability distribution is defined by a probability
function, denoted by P X  x or px or f x, which provides
the probability for each value of the random variable.
 The required conditions for a discrete probability
function are:
p x   0
 px   1
forall x

 The probability distribution for a random variable


describes how probabilities are distributed over the
values of the random variable.
6

Discrete Probability Distribution


Experiment: 2 fair coins are tossed independently.
Let X be a random variable of # of heads observed.
Complete the following
Sample space
probability distribution
T T x value Probability f(x)
0 1/4 = 0.25
T H 1 2/4 = 0.50
2 1/4 = 0.25
H T Probability
0.50

0.25
H H
0 1 2 x
7

Common test question related to probability distribution


Question Answer
Probability Distribution Find
x value Probability P X  0  f 0  0.1
0 0.1 P X  1  f 1  0.2
1 0.2 P X  1  f 0  f 1  0.3
P X  1  f 0  0.1
2 0.3
3 k P X  1  f 1  f 2  f 3  0.9
P X  1  f 2  f 3  0.7
Find the value of k?
P X  1  f 0  f 2  f 3  0.8

P X  1  1  f 1  1  0.2  0.8

Apply Complement Law


8

Discrete Probability Distribution


 The discrete uniform probability distribution is the
simplest example of a discrete probability distribution
given by a formula.
 The discrete uniform probability function is
the values of the
f x  
1
random variable
where: n
are equally likely
n = the number of values the random variable may assume.

Example: Roll a six sided fair die


Probability

2/6

1/6

1 2 3 4 5 6 x
9

Expected Value of a Discrete


Random Variable
 Expected Value (or mean) of a discrete random
variable (r.v.) X is
E( X )  μ   xpx
(Note: It is a Weighted Average)

 Coin example: Toss 2 fair coins independently.


Let X be a r.v. of # of heads observed
x p(x)
Compute the expected value of X:
0 0.25
E(X) = (0)(0.25) + (1)(0.50) + (2)(0.25) 1 0.50
= 1.0 2 0.25
10

Roulette Wheel Example


Roulette wheel
 38 pockets

 Each pocket has an unique number.

 18 Red,18 Black, 2 Green

Suppose you bet $1,000 on Red.


If Red shows up, you will get pay $1,000.
If Red doesn’t show up, the casino take your $1,000.
Is this a fair game?
Let X be the random variable of the amount of winning
a) Give the probability distribution of X.
b) Find the expected value of X, E(X).
11

Expected Value of a Discrete Random Variable


Roulette wheel: 18 Red,18 Black, 2 Green
a) Give the probability distribution of X.
Outcome x p(x)
Red 1,000 18/38
Black or green -1,000 20/38

b) Find the expected value of X, E(X).


μ  E( X )   xp x 
18 20
 (1,000)( )  (1,000)( )
38 38
 $52.63

Interpretation: This is the expected loss in each game. That


is, for each of the $1,000 bet on RED, on average the gambler
expected to lose $52.63.
12

Variance of a Discrete Random Variable

 Variance of a discrete random variable X is given by

V  X   Var  X   σ   x    px 
2 2

The calculation of variance using the above formula is


given on text book p195.

Short-cut formula: V  X   Var  X   σ   x px   


2 2 2

 Like in chapter 3, to find the standard deviation of X, we


use the positive square root of variance.
13

Variance of a Discrete Random Variable


Example: Toss 2 fair coins independently.
Let X = # of heads observed, compute the variance of X.

x p(x) From p9, we have E(X) = 1.


0 0.25
V  X   Var  X   σ 2   x    px 
2

1 0.50
2 0.25

σ 2  (0 1)2 (0.25)  (1 1)2 (0.50)  (2 1)2 (0.25)  0.5 (variance)

This implies standard


Possible number of heads deviation  0.50  0.707.
= 0, 1, or 2
14

Variance of a Discrete Random Variable

Suppose you bet $1,000 on RED.


Let X = the amount of winning
Find the standard deviation of X.

V  X   Var  X   σ 2   x px    2
2
Using the short-cut formula:
σ  x p
2
 x    2

)  (1,000) 2 ( )   52.63
18 20
 (1,000) 2 (
2

38 38
 997230
 $998.6
15

Probability Distributions
Probability
Distributions

Ch. 4 Discrete Continuous Ch. 5


Probability Probability
Distributions Distributions

Binomial

Poisson

Hypergeometric
16

Binomial Experiment
Features of a binomial experiment
1. There is a fixed number of trials n.
2. The n trials are independent and repeated under
identical conditions.
3. Each trial has only two outcomes: success, denoted by S,
and failure, denoted by F.
4. For each individual trial, the probability of success is the
same. We denote the probability of success by p and
probability of failure by q. Since each trial results in
either success or failure, p + q = 1 and q = 1 - p.
5. The central problem of a binomial experiment is to find
the probability of r successes out of n trials.
17

Example – Binomial Experiment


On a game show, each contestant has a try at the
wheel of fortune. The wheel of fortune is a roulette
wheel with 36 slots, one of which is gold. If the ball
lands in the gold slot, the person wins $50,000. No
other slot pays. What is the probability that the game
show will have to pay the fortune to three contestants
out of 100?
18

Example – Binomial Experiment


Check that if the problem meets the criteria of a
binomial experiment.

1. n = 100 trials
2. Assuming that the wheel is fair, the trials are
independent, since the result of one spin of the
wheel has no effect on the results of other spins.
3. Two outcomes on each trial: The ball either lands
on the gold, or it does not.
landing on the gold = success (S)
NOT landing on the gold = failure (F)
19

Example– Binomial Experiment


4. On each trial:
The probability of success p
= P(landing on the gold) = 1/36
The probability of failure q
= P(not landing on the gold)
= 1 – p = 1 – 1/36 = 35/36
5. The central problem of this example is to find the
probability of 3 successes out of 100 trials.
r = 3 contestants out of n = 100
20

Binomial Distribution Formula


Suppose Amy takes an exam. There are three
multiple-choice questions in the question paper. Each
question has four suggested answers, and only one of
the answers is correct.

If Amy guesses the answers of


these three questions, find the
probabilities that Amy get zero,
one, two, or all three
questions correct respectively?
21

Binomial Distribution Formula


This case is a binomial experiment.

n = 3 trials

The possible outcomes on each trial:


success S = indicate a correct answer
failure F = indicate a wrong answer

The trials are independent—the outcome of any one


trial does not affect the outcome of the others.
22

Binomial Distribution Formula


The probability of success p
= P(a correct answer) = 1/4 = 0.25

The probability of failure q


= P(a wrong answer) = 3/4 = 0.75

The possible outcomes in terms of success S or failure


F for these three trials:
SSS SSF SFS FSS SFF FSF FFS FFF
23

Binomial Distribution Formula


The probability of success on the first two questions
and failure on the last question is
PSSF   PS  PS  PF 
 p  p  q  p 2q
 0.25 0.75
2

 0.0469
24

Binomial Distribution Formula

Outcomes for a Binomial Experiment with n = 3 Trials


25

Binomial Distribution Formula


The probability of one success out of three questions
is
P1
 PSFF or FSF or FFS 
 PSFF   PFSF   PFFS 
 pq 2  pq 2  pq 2
 3 pq 2
 30.250.75
2

 0.4219
26

Binomial Distribution Formula

P(r) for n = 3 Trials, p = 0.25


27

Binomial Distribution
The probability of r successes out of n trials

Pr  n Cr p q
r nr

where
n = number of trials
p = probability of success on each trial
q = 1 - p = probability of failure on each trial
r = the number of successes out of n trials (0 ≤ r ≤ n )
28

Example – Compute P(r)


A survey showed that 59% of Internet users are
concerned about the confidentiality of their e-mail.
Suppose a random sample of 10 Internet users is
selected.

a) Find the probability that exactly 6 of them are


concerned about the privacy of their e-mail.
b) Find the probability that at most 3 of them are
concerned about the privacy of their e-mail.
29

Example – Compute P(r)


a) The probability that exactly 6 of them are
concerned about the privacy of their e-mail is
n  10 p  0.59 q  0.41 r 6
P6   n Cr p r q n  r
10 C6 0.59  0.41  2100.59  0.41
6 10 6 6 4

 0.2503

There is a 25.03% chance that exactly 6 of the 10 Internet


users are concerned about the privacy of e-mail.
30

Example – Compute P(r)


b) The probability that at most 3 of them are
concerned about the privacy of their e-mail is
n  10 p  0.59 q  0.41
Pat most 3  Pr  3
 P r  0, 1, 2 or 3  P0   P 1  P2   P3
10 C0 0.59  0.41 10 C1 0.59  0.41
0 10 0 1 101

10 C2 0.59  0.41 10 C3 0.59  0.41


2 10 2 3 10 3

 0.000134  0.001932  0.012508  0.047998


 0.062572  0.0626

There is a 6.26% chance that at most 3 of the 10 Internet users


are concerned about the privacy of e-mail.
31

Common English Expressions


32

Graph a Binomial Distribution


How to graph a binomial distribution

1. Compute P(r) value for each r value.


2. Place r values on the horizontal axis.
3. Place P(r) values on the vertical axis.
4. Construct a bar over each r value extending
from r - 0.5 to r + 0.5. The height of the
corresponding bar is P(r).
33

Graph of a Binomial Distribution


A waiter at a restaurant has learned from long
experience that the probability that a lone diner will
leave a tip is only 0.7. During one lunch hour, the
waiter serves six people who are dining by
themselves.

Make a graph of the binomial probability distribution


that shows the probabilities that 0, 1, 2, 3, 4, 5, or all
6 lone diners leave tips.
34

Graph of a Binomial Distribution


n6 p  0.7 q  0.3 P r   n Cr p r q n  r
r 0 P 0   6 C0 0.7  0.3  0.000729
0 6

r 1 P 1  6 C1 0.7  0.3  0.010206


1 5

r2 P 2   6 C2 0.7  0.3  0.059535


2 4

r 3 P 3  6 C3 0.7  0.3  0.185220


3 3

r4 P 4   6 C4 0.7  0.3  0.324135


4 2

r 5 P 5  6 C5 0.7  0.3  0.302526


5 1

r 6 P 6   6 C6 0.7  0.3  0.117649


6 0
35

Graph of a Binomial Distribution

Graph of the Binomial Distribution for n = 6 and p = 0.7


36

Mean and SD of a Binomial Distribution


Mean (Expected number of successes)   np

Standard Deviation (SD)   npq

where
r is a random variable representing the number of
successes in a binomial distribution,
n is the number of trials,
p is the probability of success on a single trial, and
q = 1 - p is the probability of failure on a single trial.
37

Example – Mean and SD


A waiter at a restaurant has learned from long
experience that the probability that a lone diner will
leave a tip is only 0.7. During one lunch hour, the
waiter serves six people who are dining by
themselves.

Compute the mean and standard deviation for the


distribution.
38

Example – Mean and SD


n6 p  0.7 q  0.3

Mean
  np  60.7  4.2

Standard Deviation
  npq  60.7 0.3  1.12
39

Poisson Distribution
 A Poisson distributed random variable is often useful
in estimating the number of occurrences over a
specified interval of time or space.
 It is a discrete random variable that may assume an
infinite sequence of values (x = 0, 1, 2, . . . ).

Two Properties of a Poisson Experiment


1. The probability of an occurrence is the same for any
two intervals of equal length.
2. The occurrence or nonoccurrence in any interval is
independent of the occurrence or nonoccurrence in
any other nonoverlapping interval.
40

Poisson Distribution Formula


μ xe μ
p( x) 
x!
where:
p(x) = probability of x occurrences in an interval
x = number of occurrences required
 = mean number of occurrences in an interval
e = base of the natural logarithm system (2.71828...)

 For a Poisson random variable, the mean and


variance are equal.

E( X )  μ  σ 2
41

Poisson Distribution Example


Eg. The number of customers who arrive at a cashier’s
counter in a super market during a specified period of
time exhibits a Poisson distribution with mean arrival
rate 3 customers per minute.
a) Find the probability that in a given minute the number
of arrivals will be 1.
(3)1 e 3
p(1)   0.1494
1!

b) Find the probability that in a given minute the number


of arrivals will exceed 1.
(3)0 e 3 (3)1 e 3
1  p(0)  p(1)  1    1  0.0498  0.1494  0.8008
0! 1!
42

Poisson Distribution Example


c) Find the expected number of arrivals in a given minute.

E( X )  μ  3
d) Find the variance in the number of arrivals in a
given minute.

σ2  μ  3
e) Find the standard deviation in the number of arrivals in a
given minute.

σ  μ  3  1.732
43

Poisson Distribution Example


f) Find the probability that in given TWO minutes the
number of arrivals will be 1

μ per 2min  6

(6)1e6
p(1)   0.00149
1!
44

Graph of Poisson Probabilities


μ xe μ
p( x) 
x! 0.70

0.60

μ  0.5 0.50

0.40
x p(x) p (x )

0.30
0 0.6065
0.20
1 0.3033
2 0.0758 0.10

3 0.0126 0.00
4 0.0016 0 1 2 3 4 5 6 7

5 0.0002 x
6 0.0000
(0.5) 2 e 0.5
7 0.0000 p ( x)   0.0758
2!
45

Poisson Distribution Shape

 The shape of the Poisson Distribution


depends on the parameter μ :
0.70
μ  0.5 μ
μ3
0.25

0.60
0.20

0.50

0.15
0.40

p (x )
p(x)

0.30
0.10

0.20

0.05
0.10

0.00 0.00
0 1 2 3 4 5 6 7 1 2 3 4 5 6 7 8 9 10 11 12

x x
46

The Hypergeometric Distribution


 “n” trials in a sample taken from a finite population of
size N
 Sample are taken without replacement.
 Outcomes of trials are dependent.
 The probability of success is changing from trial to trial.
 Concerned with finding the probability of “x” successes
in the sample where there are “r” successes in the
population
47

The Hypergeometric Distribution


 r  N  r  where
  
x nx  N = population size
p( x)    for 0  x  r r = number of successes in the population
N
  n = sample size
n  x = number of successes in the sample

nr
 Mean μ  E( X ) 
N

 r  r  N  n 
 Variance σ 2  n 1   
 N  N  N  1 
48

The Hypergeometric Distribution


r  N r
   
p ( x)   x  n  x  for 0  x  r
N
 
number of ways
 
n
n – x failures can be selected
number of ways from a total of N – r failures
x successes can be selected in the population
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
49

The Hypergeometric Distribution


■ Example: Suppose 4 of the 10 computers in the
department have illegal software loaded. If 3 computers
are randomly selected and checked. What is the
probability that 2 of the 3 selected computers have
illegal software loaded?
N = 10 n=3
r=4 x=2
 r  N  r   4  6  4! 6!

 x
n  x  
 2
1 
p (2)          2!4  2  ! 1!6  1 !  (6)(6)  0.3
N 10  10! 120

n   
 
 3 
  3!10  3 !

The probability that 2 of the 3 selected computers have illegal


software loaded is 0.30.
50

The Hypergeometric Distribution


■ Example: Suppose 4 of the 10 computers in the department have
illegal software loaded. In a random sample of 3 computers,
N = 10 n=3 r=4

Q: find the expected number of computers with illegal software loaded.


nr 3(4)
E( X )    1.2
N 10
Q: find the standard deviation in the number of computers with illegal
software loaded.
 r  r  N  n   4  4  10  3 
σ  n 1     3 1     0.7483
 N  N  N  1   10  10  10  1 

You might also like