You are on page 1of 12

9/26/2009

Chapter 7

Random Variables and


probabilityy
Discrete p
Distributions

7.2 Random Variables and Probability Distributions


A random variable is a function or rule that
assigns a numerical value to each simple event
in a sample space.
A random variable reflects the aspect of a
random experiment that is of interest for us.
There are two types of random variables:

Discrete random variable


Continuous random variable.

Discrete and Continuous Random Variables

A random variable is discrete if it can assume a


countable number of values.
A random variable is continuous if it can assume an
uncountable number of values.

Discrete random variable Continuous random variable


After the first value is defined
the second value, and any value
thereafter are known.

Therefore, the number of


values is countable

3 ...

After the first value is defined,


any number can be the next one

0 1/16 1/4

1/2

Therefore, the number of


values is uncountable

9/26/2009

Discrete Distributions

In this chapter we will be dealing with discrete,


in the next chapter (8) we will discuss
continuous

Discrete Probability Distribution

A table, formula, or graph that lists all possible


values a discrete random variable can assume,
together with associated probabilities, is called
a discrete probability distribution.

To calculate the probability that the random variable


X assumes the value x, P(X = x),

add the probabilities of all the simple events for which X is


equal to x, or
Use probability calculation tools (tree diagram),
Apply probability definitions

Requirements for a Discrete Distribution

If a random variable can assume values xi,


then the following must be true:
1. 0 p(x i ) 1 for all x i
2.

p( x ) = 1
i

all xi

These are the rules of probability

9/26/2009

Distribution and Relative Frequencies

In practice, often probability distributions are


estimated from relative frequencies.
Example 7.1 on pg. 212

A survey reveals the following frequencies (1,000s) for the


number of color TVs per household.
Number of TVs
0
1
2
3
4
5
Total

Number of Households
1,218
32,379
37,961
19,387
7,714
2,842
101,501

p(x)

0
1
2
3
4
5

1218/Total = .012
.319
.374
.191
.076
.028
1.000

Determining Probability of Events


The probability distribution can be used to
calculate the probability of different events
Example 7.1 continued
Calculate the probability of the following
events:

P(The number of color TVs is 3) = P(X=3) =.191


P(The number of color TVs is two or more) =
P(X2)=P(X=2)+P(X=3)+P(X=4)+P(X=5)=
.374 +.191 +.076 +.028 = .669
P(The number of color TVs is two or less)=
P(X<2)=P(X=2)+P(X=1)+P(X=0)=
.012+.319+ .374=.705

Developing a Probability Distribution


Probability calculation techniques can be used
to develop probability distributions
Example 7.2 on pg. 213

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?

9/26/2009

Developing a Probability Distribution

Solution

Use probability rules and trees


Define event S = {A sale is made}.
P(S)=.2

P(S)=.2

P(SC)=.8

P(S)=.2

SSS

P(SC)=.8
P(S)= 2
P(S)=.2

S S SC
S SC S

P(SC)=.8
P(S)=.2

S SC SC
SC S S

P(SC)=.8
P(S)=.2

SC S SC
SC SC S

P(SC)=.8

SC SC SC

P(SC)=.8

P(S)=.2
P(SC)=.8

(.2)(.2)(.8)= .032

X
3
2
1
0

P(x)
.2
23 = .008
008
3(.032)=.096
3(.128)=.384
.83 = .512

Describing the Population/ Probability Distribution

The probability distribution represents a


population
Were interested in describing the population
by computing various parameters.
Specifically,
Specifically we calculate the population mean
and population variance.

Population Mean (Expected Value)

Given a discrete random variable X with values


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

E( X ) = = x i p( x i )
all xi

9/26/2009

Population Variance
Let

X be a discrete random variable with possible


values xi that occur with probabilities p(xi), and let
E(xi) = . The variance of X is defined by
V ( X ) = 2 = E[( X ) 2 ] = ( x i ) 2 p( x i )
all xi

The s tan dard deviation is


= 2

The Mean and the Variance

Example 7.3 on pg.215

Find the mean the variance and the standard deviation


for the population of the number of color television per
household in example 7.1

Solution
E(X) = = xip(xi) = 0p(0)+1p(1)+2p(2)+=
0(.012)+1(.319)+2(.374)+ = 2.084
V(X) = 2 = (xi - )2p(xi) = (0-2.084)2p(0=.012)+(12.084)2p(1=.319) + (2-2.084)2+ =1.107
Using a shortcut formula
= 1.1071/2 = 1.052

for the variance

The Mean and the Variance

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

= 1.107

9/26/2009

Laws of Expected Value and Variance


Pg. 216

Laws of Expected Value

Laws of Variance

E(c) = c
E(X + c) = E(X) + c
E(cX) = cE(X)

V(c) = 0
V(X + c) = V(X)
V(cX) = c2V(X)

Question 7.19 - pg. 219 PART A ONLY

Let us try this question now

Question 7.19 - pg. 219


Mean ()
= E(X) = xip(xi)= 0(.4) + 1(.3) + 2(.2) + 3(.1)
= 1.0

(pg. 190)

Variance ( 2 )
= V(X) = (xi- )2 p(xi)
(pg. 190)
= (0-1.0)2(.4) + (1-1.0) 2(.3) + (2-1.0) 2(.2) + (3-1.0) 2(.1)
= 1.0
Standard Deviation ( )
= 2
= 1.0

(pg. 191)

9/26/2009

Question 7.19 - pg. 219 - Extension


From the above distribution/information, find the
following:
1. E(3X)

2. V(3X) 3. E(X + 4)

4. E(4X + 3) 5. V(4X + 3)

Question 7.19 - pg. 201 - Extension


From the above distribution/information, find the following:
1. E(3X)

2. V(3X) 3. E(X + 4)

4. E(4X + 3) 5. V(4X + 3)

1. E(3X) = 3E(X) = 3(1.0) = 3.0


2. V(3X) = 9V(X) = 9(1.00) = 9.00
3. E(X + 4) = E(X) + 4 = 1.0 + 4 = 5.0
4. E(4X + 3) = 4E(X) + 3 = 7.0
5. V(4X + 3) = 16V(X) = 16.0

(EV Rule #3 pg.192)


(V Rule #3 pg. 192)
(EV Rule #2 pg. 192)
(EV Rule #2 & #3 pg. 192)
(V Rule #2 & #3 pg. 192)

7.2 Bivariate Distributions

Please skip sections 7.2 and 7.3 and 7.5

9/26/2009

7.4 The Binomial Distribution


Is a discrete distribution with special properties
The binomial experiment can result in only one
of two possible outcomes.
Typical cases where the binomial experiment
applies:

A coin flipped results in heads or tails


An election candidate wins or loses
An employee is male or female
A car uses 87octane gasoline, or another gasoline.

Binomial Experiment
There are n trials (n is finite and fixed).
Each trial can result in a success or a failure.
The probability p of success is the same for all the
trials.
All the trials of the experiment are independent.
independent

Binomial Random Variable


The binomial random variable counts the number of
successes in n trials of the binomial experiment.
By definition, this is a discrete random variable.

Developing the Binomial Probability Distribution (n = 3)


Since the outcome of each trial is
independent of the previous outcomes,
we can replace the conditional probabilities
S2
with the marginal probabilities.

S1

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

P(S2|S1
F2
S2

F3 P(SFF)=p(1-p)2
S3 P(FSS)=(1-p)p2
F3 P(FSF)=(1-p)p(1-p)
S3 P(FFS)=(1-p)2p

F1
F2

F3 P(FFF)=(1-p)3

9/26/2009

Developing the Binomial Probability Distribution (n = 3)


P(SSS)=p
SSS 3

Let X be the number of successes


in three trials. Then,
P(X = 3) = p3
P(X = 2) =

X=3

33p2(1-p)
(1 )

X =22

P(X = 1) = 3p(1-p)2

X=1

P(X = 0) = (1- p)3

X=0

2(1-p)
P(SSF)=p
SS

S S
P(SFS)=p(1-p)p
P(SFF)=p(1-p)2
2
SS
P(FSS)=(1-p)p

P(FSF)=(1-p)p(1-p)
P(FFS)=(1-p)2p
This multiplier is calculated in the following formula
P(FFF)=(1-p)3

Calculating the Binomial Probability


In general, The binomial probability is calculated by:

P( X = x) = p( x) = C nx p x (1 p) nx
where C nx =

n!
x! (n x)!

! Is called a factorial:
If we had 3! it converts to 1 x 2 x 3 = 6
If we had 5! It converts to 1 x 2 x 3 x 4 x 5 = 120

Calculating the Binomial Probability

Example 7.9 & 7.10 on pg. 236 and pg. 237


Pat Statsdud is registered in a statistics course and
intends to rely on luck to pass the next quiz.

The quiz consists of 10 multiple choice questions with 5 possible


choices for each qquestion, onlyy one of which is the correct
answer.
Pat will guess the answer to each question
Find the following probabilities
Pat gets no answer correct (7.9)
Pat gets two answer correct? (7.9)
Pat fails the quiz (7.10)

9/26/2009

Calculating the Binomial Probability

Solution

Checking the conditions

An answer can be either correct or incorrect.


There is a fixed finite number of trials (n=10)
Each answer is independent of the others.
The probability p of a correct answer (.20) does not change
from question to question.

Calculating the Binomial Probability

Solution Continued

Determining the binomial probabilities:


Let X = the number of correct answers

P( X = x) = p( x) = C nx p x (1 p) nx
where C nx =

P( X = 0) =

n!
x! (n x)!

10!
(.20) 0 (.80)10 0 = .1074
0! (10 0)!

Calculating the Binomial Probability

Solution Continued

Determining the binomial probabilities:


Let X = the number of correct answers

P( X = x) = p( x) = C nx p x (1 p) nx
where C nx =
P ( X = 2) =

n!
x! (n x)!

10!
(.20) 2 (.80)10 2 = .3020
2! (10 2)!

10

9/26/2009

Calculating the Binomial Probability

Solution Continued

Determining the binomial probabilities:


Pat fails the test if the number of correct answers is
less than 5, which means less than or equal to 4.

P(X4) = p(0) + p(1) + p(2) + p(3) + p(4)


= .1074 + .2684 + .3020 + .2013 + .0881
=.9672
This is called cumulative probability

Mean and Variance of Binomial Variable


E(X) = = np
V(X) = 2 = np(1-p)

Example 7.11, on pg. 240

If all the students in Pats class intend to guess the


answers to the quiz, what is the mean and the
standard deviation of the quiz mark?

Solution
= np = 10(.2) = 2.
2 = np(1-p) = 10(.2)(.8) = 1.6
= 1.2649

Question 7.90 - pg. 240

We can also solve Binomial problems by using


tables in the back of the text - Appendix B
Table 1

11

9/26/2009

Using the Tables Question 7.90 - pg. 240


a) P(X = 18)
= P(X < 18) - P(X < 17)
= .659 - .488
= .171
b) P(X = 15)
= P(X < 15) - P(X < 14)
=.189 - .098
= .091

Notice that when


we are solving all
the inequalities
are . This is
b
because
we are
dealing with a
cumulative
distribution table.

Using the Tables Question 7.90 - pg. 240


c) P(X < 20)
= .910
d) P(X > 16)
= 1 - P(X < 15)
= 1 - .189
= .811

Notice that when


we are solving all
the inequalities
are . This is
b
because
we are
dealing with a
cumulative
distribution table.

Poisson Distribution
Please skip this section (7.5)

12

You might also like