You are on page 1of 60

Statistics for

Business and Economics


7th Edition

Chapter 4

Discrete Random Variables and


Probability Distributions

Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall Ch. 4-1
Introduction to
4.1 Probability Distributions
(olasılık dağılımları)

 Random Variable (tesadüfi, rassal değişken)


 Represents a possible numerical value from

a random experiment
Random
Variables
Discrete Continuous
Ch. 4 Random Variable Random Variable Ch. 5
(kesikli tesadüfi (sürekli tesadüfi
değişken) değişken)

Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall Ch. 4-2
 It’s important to distinguish between a random
variable and the possible values that it can
take.

 Using the notation this done with capital letters


such as X, to denote the random variable and
the corresponding lowercase letter, x, to denote
a possible value.
Discrete Random Variables
(kesikli rassal değişken)
 Can only take on a countable number of values

Examples:

 Roll a die twice


Let X be the number of times 4 comes up
(then X could be 0, 1, or 2 times)

 Toss a coin 5 times.


Let X be the number of heads
(then X = 0, 1, 2, 3, 4, or 5)
Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall Ch. 4-4
 Examples of discrete random variables:
 The number of defective items in a sample of
20 items from a large shipment.
 The number of customers arriving at a checkout
counter in a hour.
 The number of errors detected in a
corporation’s account.
 The number of claims on a medical insurance
policy in a particular year.
Continuous Random Variable
(sürekli rassal değişken)

 A random variable is a continuous random


variable if it can take any value in an interval.
 Examples of discrete random variables:

 The yearly income for a family.


 The amount of oil imported in the USA in a
particular month.
 The time that elapses between the installation
of a new component and its failure.
4.2
Discrete Probability Distribution
Experiment: Toss 2 Coins. Let X = # heads.
Show P(x) , i.e., P(X = x) , for all values of x:

4 possible outcomes
Probability Distribution
T T x Value Probability
0 1/4 = .25
T H 1 2/4 = .50
2 1/4 = .25

H T
Probability

.50

.25
H H
Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
0 1 2 x Ch. 4-7
4.3
Probability Distribution
Required Properties

 0 ≤ P(x) ≤ 1 for any value of x


(probabilities cannot be negative or exceed 1)

 The individual probabilities sum to 1;


 P(x)  1
x

(The notation indicates summation over all possible x values)

Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall Ch. 4-8
Cumulative Probability Function

 The cumulative probability function, denoted


F(x0), shows the probability that X is less than or
equal to x0

F(x0 )  P(X  x 0 )

 In other words,

F(x 0 )   P(x)
x x0

Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall Ch. 4-9
Example (pp.163)

 Olaf Motors Inc., is a car


x P(x)
dealer in a small
southern town. Based on 0 0,15
an analysis of its sales
history, the managers 1 0,30
know that on any single
day the number of Prius 2 0,20
cars sold can vary from 0
3 0,20
to 5.
 Form the cumulative 4 0,10
probability function.
5 0,05
Example (pp. 164 / 4.13)
 The number of computers sold per day at Dan’s Computer Works is
defined by the following probability distributions:

x 0 1 2 3 4 5 6
P(x) 0,05 0,10 0,20 0,20 0,20 0,15 0,10

a) P(3 ≤ x < 6) = ?
b) P(x > 3) = ?
c) P(x ≤ 4) = ?
d) P(2 < x ≤ 5) = ?
Expected Value
 Expected Value (or mean) of a discrete
distribution (Weighted Average)
μ  E(X)   xP(x)
x

x P(x)
 Example: Toss 2 coins, 0 .25
x = # of heads, 1 .50
compute expected value of x: 2 .25
E(x) = (0 x .25) + (1 x .50) + (2 x .25)
= 1.0

Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall Ch. 4-12
Example (pp.165)

 Suppose that the probability function for the


number of errors, X, on pages from business
textbooks is as follows:

P (0) = 0,81 P(1) = 0,17 P(2) = 0,02

Find the mean number of errors per page.


Variance and Standard
Deviation
 Variance of a discrete random variable X

σ  E(X  μ)   (x  μ) P(x)
2 2 2

 Standard Deviation of a discrete random variable X

σ  σ2  x
(x  μ) 2
P(x)

Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall Ch. 4-14
Standard Deviation Example

 Example: Toss 2 coins, X = # heads,


compute standard deviation (recall E(x) = 1)

σ  (x
x
 μ) 2
P(x)

σ  (0  1)2 (.25)  (1  1)2 (.50)  (2  1)2 (.25)  .50  .707

Possible number of heads


= 0, 1, or 2

Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall Ch. 4-15
Example (pp.167)
 Olaf Motors Inc., is a car
dealer in a small x P(x)
southern town. Based on
an analysis of its sales 0 0,15
history, the managers
know that on any single 1 0,30
day the number of Prius
cars sold can vary from 0 2 0,20
to 5.
3 0,20
 Find the expected value
and variance for this 4 0,10
probability distributions.
5 0,05
Functions of Random Variables

 If P(x) is the probability function of a discrete


random variable X , and g(X) is some function of
X , then the expected value of function g is

E[g(X)]   g(x)P(x)
x

Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall Ch. 4-17
Linear Functions
of Random Variables

 Let a and b be any constants.


 a) E(a)  a and Var(a)  0
i.e., if a random variable always takes the value a,
it will have mean a and variance 0

 b) E(bX)  bμX and Var(bX)  b σ


2 2
X

i.e., the expected value of b·X is b·E(x)

Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall Ch. 4-18
Linear Functions
of Random Variables
(continued)
 Let random variable X have mean µx and variance σ2x
 Let a and b be any constants.
 Let Y = a + bX
 Then the mean and variance of Y are
μY  E(a  bX)  a  bμX

σ  Var(a  bX)  b σ
2
Y
2 2
x

 so that the standard deviation of Y is

σY  b σX

Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall Ch. 4-19
Example (pp. 169)
 A contractor is interested in the total cost of a project on which she
intends to bid. She estimates that material will cost $ 25.000 and that
her labor will be $ 900 per day. If the project takes X days to
complete, the total labor cost will be 900X dollars and the total cost
of the project (in dollars) will be as follows:
 C= 25.000 + 900 X
 The contractor froms subjective probalities of a likely completion
times for the project.
 a) find the mean and variance for completion time X.
 b) find the mean, variance and standard deviation for total cost C

Completion time X
10 11 12 13 14
(days)
Probability 0,10 0,30 0,30 0,20 0,10
Probability Distributions
Probability
Distributions

Ch. 4 Discrete Continuous Ch. 5


Probability Probability
Distributions Distributions

Binomial Uniform

Hypergeometric Normal

Poisson Exponential

Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall Ch. 4-21
4.4
The Binomial Distribution
Probability
Distributions

Discrete
Probability
Distributions

Binomial Binom Dağılımı


Hypergeometric (iki terimli dağılım)
Poisson

Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall Ch. 4-22
Bernoulli Distribution

 Consider only two outcomes: “success” or “failure”


(mutually exclusive and collectively exhaustive)
 Let P denote the probability of success

 Let (1 – P) be the probability of failure

 Define random variable X:

x = 1 if success, x = 0 if failure
 Then the Bernoulli probability function is

P(0)  (1 P) and P(1)  P

Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall Ch. 4-23
Bernoulli Distribution
Mean and Variance

 The mean is µ = P

μ  E(X)   xP(x)  (0)(1 P)  (1)P  P


X

 The variance is σ2 = P(1 – P)

σ 2  E[(X  μ)2 ]   (x  μ)2 P(x)


X

 (0  P) (1 P)  (1 P) P  P(1  P)


2 2

Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall Ch. 4-24
Example (pp.173)
Sequences of x Successes
in n Trials

 An important generalization of Bernoulli distribution


concerns the case where
a random experiment with two possible outcomes is
repeated several times
and the repetitions are independent.

 The number of successes X resulting from these n


trials could be any whole number from 0 to n and we
are interested in the probability of obtaining exactly
X=x successes in n trials.

Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall Ch. 4-26
 Observe that n trials will result in a sequence of
n outcome, each of which must be either
success (S) or failure (F).

S,S,S..S F,F,..F

x times (n-x) times

[PxPx..xP] x [(1-P)x…x(1-P)]=Px (1-P)(n-x)

x times (n-x) times


Sequences of x Successes
in n Trials

 The number of sequences with x successes in n


independent trials is:

n!
C  n
x
x!(n  x)!
Where n! = n·(n – 1)·(n – 2)· . . . ·1 and 0! = 1

 These sequences are mutually exclusive, since no two


can occur at the same time

Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall Ch. 4-28
Binomial Probability Distribution
 A fixed number of observations, n
 e.g., 15 tosses of a coin; ten light bulbs taken from a warehouse
 Two mutually exclusive and collectively exhaustive
categories
 e.g., head or tail in each toss of a coin; defective or not defective
light bulb
 Generally called “success” and “failure”
 Probability of success is P , probability of failure is 1 – P
 Constant probability for each observation
 e.g., Probability of getting a tail is the same each time we toss
the coin
 Observations are independent
 The outcome of one observation does not affect the outcome of
the other
Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall Ch. 4-29
Possible Binomial Distribution
Settings

 A manufacturing plant labels items as


either defective or acceptable
 A firm bidding for contracts will either get a
contract or not
 A marketing research firm receives survey
responses of “yes I will buy” or “no I will
not”
 New job applicants either accept the offer
or reject it

Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall Ch. 4-30
Binomial Distribution Formula

n! X n-X
P(x) = P (1- P)
x ! (n - x )!
P(x) = probability of x successes in n trials,
with probability of success P on each
Example: Flip a coin four
trial
times, let x = # heads:

x = number of ‘successes’ in sample, n=4


(x = 0, 1, 2, ..., n) P = 0.5
n = sample size (number of trials 1 - P = (1 - 0.5) = 0.5
or observations) x = 0, 1, 2, 3, 4
P = probability of “success”

Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall Ch. 4-31
Example:
Calculating a Binomial Probability
What is the probability of 1 success in 5
observations if the probability of success is 0.1?
x = 1, n = 5, and P = 0.1

n!
P(x  1)  P X (1 P)n X
x!(n  x)!
5!
 (0.1)1(1 0.1)51
1! (5  1)!
 (5)(0.1)(0.9) 4
 .32805
Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall Ch. 4-32
Binomial Distribution
 The shape of the binomial distribution depends on the
values of P and n
Mean P(x) n = 5 P = 0.1
.6
 Here, n = 5 and P = 0.1 .4
.2
0 x
0 1 2 3 4 5

.6
P(x) n = 5 P = 0.5
 Here, n = 5 and P = 0.5
.4
.2
0 x
0 1 2 3 4 5
Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall Ch. 4-33
Binomial Distribution
Mean and Variance

 Mean
μ  E(x)  nP
 Variance and Standard Deviation

σ  nP(1- P)
2

σ  nP(1- P)
Where n = sample size
P = probability of success
(1 – P) = probability of failure

Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall Ch. 4-34
Binomial Characteristics
Examples
μ  nP  (5)(0.1)  0.5
Mean P(x) n = 5 P = 0.1
.6
.4
σ  nP(1- P)  (5)(0.1)(1  0.1) .2
 0.6708 0 x
0 1 2 3 4 5

μ  nP  (5)(0.5)  2.5 P(x) n = 5 P = 0.5


.6
.4
σ  nP(1- P)  (5)(0.5)(1  0.5) .2
 1.118 0 x
0 1 2 3 4 5

Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall Ch. 4-35
Example (pp. 176)
4.5
The Hypergeometric Distribution
Probability
Distributions

Discrete
Probability
Distributions

Binomial

Hypergeometric Hipergeometrik
dağılım
Poisson

Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall Ch. 4-37
The Hypergeometric Distribution

 “n” trials in a sample taken from a finite


population of size N
 Sample taken without replacement
 Outcomes of trials are dependent
 Concerned with finding the probability of “X”
successes in the sample where there are “S”
successes in the population

Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall Ch. 4-38
Hypergeometric Distribution
Formula

S! (N S)!

CSxCNnxS x!(S  x)! (n  x)!(N S  n  x)!
P(x)  
CnN
N!
n!(N n)!
Where
N = population size
S = number of successes in the population
N – S = number of failures in the population
n = sample size
x = number of successes in the sample
n – x = number of failures in the sample
Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall Ch. 4-39
Example

■ 3 different computers are checked from 10 in the


department. 4 of the 10 computers have illegal software
loaded. What is the probability that 2 of the 3 selected
computers have illegal software loaded?
N = 10 n=3
S=4 x=2

CSxCNnxS C24C16 (6)(6)


P(x  2)  N
 10   0.3
Cn C3 120
The probability that 2 of the 3 selected computers have illegal
software loaded is 0.30, or 30%.
Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall Ch. 4-40
Example (pp.183 / 4.57 )

 A bond analyst was given a list of 12 corporate bonds.


From that list she selected 3 whose ratings she felt
were in danger of being downgraded in the next year.
 In actually, a total of 4 of the 12 bonds on the list had
their ratings downgraded in the next year.
 Suppose that the analyst had simply chosen 3 bonds
randomly from this list.
 What is the probability that at least 2 of the chosen
bonds would be among those whose ratings were to be
downgraded in the next year?
4.6
The Poisson Distribution
Probability
Distributions

Discrete
Probability
Distributions

Binomial

Hypergeometric
Poisson
Poisson
Dağılımı
Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall Ch. 4-42
Applications

 The number of failures in a large computer system


during a given day.
 The number of replacement orders for a part received
by a firm in a given month.
 The number of ships arriving at a loading facility during
a 6 hour loading period.
 The number of delivery trucks to arrive at a central
warehouse in an hour.
 The number of customers to arrive at a checkout aisle
in your local grocery store during a particular time
interval.
 We can use the Poisson probability distribution
to determine the probability of each of these
random variables, which are characterized as
the number of occurences or successes of a
certain event in a given continuous interval
(such as time, surface area or length)
Apply the Poisson Distribution when:

 You wish to count the number of times an event occurs in


a given continuous interval
 The probability that an event occurs in one subinterval is
very small and is the same for all subintervals
 The number of events that occur in one subinterval is
independent of the number of events that occur in the
other subintervals
 There can be no more than one occurrence in each
subinterval
 The expected number of events per unit is  (lambda)

Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall Ch. 4-45
Poisson Distribution Formula

λ x
e λ
P(x) 
x!
where:
x = number of successes per unit
 = expected number of successes per unit
e = base of the natural logarithm system
(2.71828...)

Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall Ch. 4-46
Poisson Distribution
Characteristics

 Mean
μ  E(X)  λ
 Variance and Standard Deviation

σ  E[(X  μ) ]  λ
2 2

σ λ

where  = expected number of successes per unit

Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall Ch. 4-47
Poisson Distribution Shape

 The shape of the Poisson Distribution


depends on the parameter  :

0.70
 = 0.50 0.25
 = 3.00
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

Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall Ch. 4-48
Example (pp.185)
 Andrew Whittaker, computer center manager,
reports that his computer system experienced 3
component failures during the past 100 days.

a) What is the probability of no failures in a given


day?
b) What is the probability of one or more
component failures in a given day?
c) What is the probability of at least two failures in a
3-day period?
Example (pp.190 / 4.67)

 Records indicate that, on average, 3.2 breakdowns per


day occur on an urban highway during the morning rush
hour. Assume that the distribution is Poisson.

 a) Find the probability that on any given day there will


be fewer than 2 breakdowns on this highway during the
morning rush hour.

 b) Find the probability that on any given day there will


be more than 4 breakdowns on this highway during the
morning rush hour.
Joint Probability Functions
4.7
(ortak olasılık fonksiyonları)

 A joint probability function is used to express the


probability that X takes the specific value x and
simultaneously Y takes the value y, as a function of x
and y

P(x, y)  P(X  x  Y  y)
 The marginal probabilities are

P(x)   P(x, y) P(y)   P(x, y)


y x

Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall Ch. 4-51
Properties of Joint Probability Functions
of Discrete Random Variables
Example (pp.191-192)
Conditional Probability Functions
(koşullu olasılık fonksiyonları)

 The conditional probability function of the random


variable Y expresses the probability that Y takes the
value y when the value x is specified for X.

P(x, y)
P(y | x) 
P(x)
 Similarly, the conditional probability function of X, given
Y = y is:
P(x, y)
P(x | y) 
P(y)

Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall Ch. 4-54
Independence
(bağımsızlık)
 The jointly distributed random variables X and Y are
said to be independent if and only if their joint probability
function is the product of their marginal probability
functions:

P(x, y)  P(x)P(y)
for all possible pairs of values x and y

 A set of k random variables are independent if and only


if
P(x1, x 2 ,, x k )  P(x1 )P(x2 )P(xk )

Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall Ch. 4-55
Example (pp.194)
Covariance
(covaryans,ortak varyans)
 Let X and Y be discrete random variables with means
μX and μY
 The expected value of (X - μX)(Y - μY) is called the
covariance between X and Y
 For discrete random variables
Cov(X, Y)  E[(X  μ X )(Y  μY )]    (x  μx )(y  μy )P(x, y)
x y

 An equivalent expression is
Cov(X, Y)  E(XY)  μxμy   xyP(x, y)  μxμy
x y

Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall Ch. 4-57
Covariance and Independence

 The covariance measures the strength of the


linear relationship between two variables

 If two random variables are statistically


independent, the covariance between
them is 0
 The converse is not necessarily true.

Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall Ch. 4-58
Correlation
 The correlation between X and Y is:

Cov(X, Y)
ρ  Corr(X, Y) 
σ Xσ Y
 ρ = 0  no linear relationship between X and Y
 ρ > 0  positive linear relationship between X and Y
 when X is high (low) then Y is likely to be high (low)
 ρ = +1  perfect positive linear dependency
 ρ < 0  negative linear relationship between X and Y
 when X is high (low) then Y is likely to be low (high)
 ρ = -1  perfect negative linear dependency

Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall Ch. 4-59
Example (pp.206 / 4.82)
 A researcher suspected that the number of between-meal snacks eaten by students in a day
during final examinations might depend on the number of tests a student had to take on that
day. The accompanying table shows joint probabilities, estimated from a survey.

a) Find the probability function of X and, hence, the mean number of tests taken by
students on that day.
b) Find the probability function of Y and, hence, the mean number of snacks eaten by
students on that day.
c) Find and interpret the conditional probability function of Y, given that X=3.
d) Find the covariance between X and Y.
e) Are the number of snacks and number of tests independent of each other?

You might also like