5 Discrete RV
5 Discrete RV
5 Discrete RV
Variables
McGraw-Hill/Irwin Copyright © 2003 by The McGraw-Hill Companies, Inc. All rights reserved.
4-1 of 21
Discrete Random Variables
4.1 Two Types of Random Variables
4.2 Discrete Probability Distributions
4.3 The Binomial Distribution
4.4 The Poisson Distribution
4-2 of 21
4.1 Random Variables
A random variable is a variable that assumes numerical
values that are determined by the outcome of an
experiment.
Random variable Values of the RV Description
X 0,1,2 No. of heads in 2 tosses
of a coin
Y 0,1,2,3 Poss Sale of newspaper
Z 0,1,2,3,4 No. of children in a
family
W 3.1,2.9,3,2.6 Wt of a newborn baby
X can take values 0, 1, and 2.
• We can also calculate the probability of X = 0 or X
= 1 or X = 2 and write down the probability
distribution.
4-3 of 21
Random Variables
• Discrete Random Variable
• Continuous Random Variable
4-4 of 21
Probability Distributions
A probability distribution is a table, formula, or graph that
describes the values of a random variable and the probability
associated with these values.
Since we’re describing a random variable (which can be
discrete or continuous) we have two types of probability
distributions:
Discrete Probability Distribution
Continuous Probability Distribution
4-5 of 21
4.2 Discrete Probability Distributions
4-6 of 21
Describing Probability Distributions:
Mean
The population mean is the weighted average of all of its
values. The weights are the probabilities.
This parameter is also called the expected value of X
and is represented by E(X).
4-7 of 21
Example
Number of Radios Sold at Sound City in a Week
4-8 of 21
Expected Value of a Discrete Random
Variable
X xp( x )
All x
4-9 of 21
Variance and Standard Deviation
X X2
4-10 of 21
Example: Variance and Standard
Deviation
Example 4.7: Variance and Standard Deviation of the Number
of Radios Sold in a Week
x, Radios p(x), Probability (x - X)2 p(x)
0 p(0) = 0.03 (0 – 2.1)2 (0.03) =
0.1323
1 p(1) = 0.20 (1 – 2.1)2 (0.20) =
0.2420
2 p(2) = 0.50 (2 – 2.1)2 (0.50) =
0.0050
3 p(3) = 0.20 (3 – 2.1)2 (0.20) =
0.1620
4 Variance Standard deviation(4 – 2.1)2 (0.05) =
p(4) = 0.05
0.1805
2
X 0 . 89 X 0 . 89 0 . 9434 2
5 p(5) = 0.02 (5 – 2.1) (0.02) =
0.1682
1.00 4-11 of 21
Interpretation
A bar graph of the probability
function, with the mean and standard
deviation is shown.
4-12 of 21
Example
4-13 of 21
4.3 The Binomial Distribution
Results from a bernoulli process
Tossing of a coin fixed no. of times is a Bernoulli Process
Outcome of such tosses is represented by Binomial Dis
The Binomial Experiment
1. A fixed number of trials, n
2. Each trial has 2 mutually exclusive outcomes: “success” or “failure”,
H or T, Yes or No
3. Probability of success, p, is constant from trial to trial
4. Trials are independent
4-15 of 21
Example: Binomial Probabilities
Let x be the number of patients who will experience
nausea following treatment with Phe-Mycin. There are 4
patients and probability of success is 0.1. Find the
probability that 2 of the 4 patients treated will experience
nausea.
4!
p(2) P(x=2)= (0.1) 2 (0.9) 4-2 =6(0.1) 2 (0.9) 2 =0.0486
2!(4-2)!
4-16 of 21
Binomial Probability Formula
=BINOM.DIST(2,4,0.1,FALSE) = 0.04860
4-18 of 21
Example: Binomial Distribution,
n = 4, p = 0.1
Using R
dbinom(x=2, size=4, prob= 0.1) = 0.0486
4-19 of 21
Binomial Probability Table
p = 0.1
Table 4.7(a) for n = 4 trials
values of p (.05 to .50)
x 0.05 0.1 0.15 … 0.50
0 0.8145 0.6561 0.5220 … 0.0625 4
1 0.1715 0.2916 0.3685 … 0.2500 3
2 0.0135 0.0486 0.0975 … 0.3750 2
3 0.0005 0.0036 0.0115 … 0.2500 1
4 0.0000 0.0001 0.0005 … 0.0625 0
0.95 0.9 0.85 … 0.50 x
values of p (.95 to .50)
P(x = 2)=.0486
4-20 of 21
Several Binomial Distributions
This distribution depends upon the values of p and n which are its
parameters. Regardless of the value of n, the distribution is
symmetrical when p=0.5
When p is small say 0.1 or 0.2, then it is skewed to the right ie
positively skewed.
When p is larger than 0.5 it is negatively skewed.
4-21 of 21
Mean and Variance of a Binomial
Random Variable
Mean X = np
2
Variance x = npq , q 1 - p
Standard deviation x = x2
4-22 of 21
Example 1 : What is the probability of one success in
five observations if the probability of an event of
interest is 0.1?
4-23 of 21
Examples
= BINOM.DIST(1,4,0.75,TRUE) 0.05078125
Poisson distribution
The Poisson distribution is based on the Poisson process.
4-31 of 21
We observe that the Poisson distributions
1 are unimodal;
2 exhibit positive skew (that decreases as λ increases);
3 are centred roughly on λ;
4 have variance (spread) that increases as λ increases.
4-32 of 21
Example: Poisson Probabilities
Example
x = number of Cleveland air traffic control errors
during one week
= 0.4 (expected number of errors per week)
Find the probability that 3 errors will occur in a week.
e -0.4 ( 0 .4 ) 3
p(3) P(x = 3) = = .0072
3!
4-33 of 21
Using Excel
=POISSON.DIST(3,0.4,FALSE)= 0.00715
4-34 of 21
Poisson Probability Table
m=0.4
Table 4.9
m, Mean number of Occurrences
x 0.1 0.2 … 0.4 … 1.00
0 0.9048 0.8187 … 0.6703 … 0.3679
1 0.0905 0.1637 … 0.2681 … 0.3679
2 0.0045 0.0164 … 0.0536 … 0.1839
3 0.0002 0.0011 … 0.0072 … 0.0613
4 0.0000 0.0001 … 0.0007 … 0.0153
5 0.0000 0.0000 … 0.0001 … 0.0031
e -0.4 ( 0 .4 ) 3
p(3) P(x = 3) = = 0.0072
3!
4-35 of 21
Poisson Distribution, λ = 0.4
4-36 of 21
Mean and Variance of a Poisson
Random Variable
4-37 of 21
4-38 of 21
4-39 of 21
4-40 of 21
4-41 of 21
4-42 of 21
4-43 of 21
Discrete Random Variables
Summary:
4.1 Two Types of Random Variables
4.2 Discrete Probability Distributions
4.3 The Binomial Distribution
4.4 The Poisson Distribution
4-44 of 21