Download Chapter 5: Discrete Random Variables and Their Probability

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Gambler's fallacy wikipedia , lookup

Transcript
Chapter 5: Discrete Random Variables and
Their Probability Distributions






5.1 Random Variables
5.2 Probability Distribution of a Discrete Random Variable
5.3 Mean and Standard Deviation of a Discrete Random
Variable
5.4 The Binomial Probability Distribution
5.5 The Hypergeometric Probability Distribution
5.6 The Poisson Probability Distribution
STAT 3038
5-1
Dr. Yingfu (Frank) Li
Introduction




We discussed concepts and rules of probability in chapter 4.
It helps in solving simple problem, but not complicated ones
such as finding probability of getting at least 5 heads in 10
tosses of a fair coin.
We want to study the probability mathematically, so we
assign numerical values to experimental outcomes and
define random variables.
Study the probability characteristic of random variables – the
topic of chapters 5 & 6
STAT 3038
5-2
5.1 Random Variables





A random variable that assumes countable values is called a discrete
random variable







The number of cars sold at a dealership during a given month
The number of houses in a certain block
The number of fish caught on a fishing trip
The number of complaints received at the office of an airline on a
given day
The number of customers who visit a bank during any given hour
The number of heads obtained in three tosses of a coin
5-3
A random variable that can assume any value contained in
one or more intervals is called a continuous random variable
Examples of continuous random variables

Examples of discrete random variables

STAT 3038
Continuous Random Variable
A random variable is a variable whose value is determined
by the outcome of a random experiment
Discrete Random Variable

Dr. Yingfu (Frank) Li
Dr. Yingfu (Frank) Li


STAT 3038
The length of a room
The time taken to commute from home to work
The amount of milk in a gallon (note that we do not expect “a gallon”
to contain exactly one gallon of milk but either slightly more or
slightly less than one gallon)
The weight of a letter
The price of a house
5-4
Dr. Yingfu (Frank) Li
1
5.2 Probability Distribution of a Discrete
Random Variable


The probability distribution of a discrete random variable
lists all the possible values that the random variable can
assume and their corresponding probabilities
Two Characteristics of a Probability Distribution



Example 5-1

0 ≤ P(x) ≤ 1 for each value of x
ΣP(x) = 1
Recall the frequency and relative frequency distributions of
the number of vehicles owned by families given in Table 5.1.
That table is reproduced below as Table 5.2. Let x be the
number of vehicles owned by a randomly selected family.
Write the probability distribution of x.
Example of tossing 2 coins, X = # of heads
X
P
STAT 3038
5-5
Dr. Yingfu (Frank) Li
STAT 3038
5-6
Example 5-3
Example 5-2

Each of the following tables lists certain values of x and their
probabilities. Determine whether or not each table represents
a valid probability distribution




Solution
a)
b)
c)
No, since the sum of all probabilities is not equal to 1.0.
Yes
No since one of the probabilities is negative.
The following table lists the probability distribution of the
number of breakdowns per week (x) for a machine based on
past data
Present this probability distribution graphically.
Find the probability that the number of breakdowns for this
machine during a given week is




STAT 3038
5-7
Dr. Yingfu (Frank) Li
Dr. Yingfu (Frank) Li
STAT 3038
exactly 2
0 to 2
more than 1
at most 1
5-8
Dr. Yingfu (Frank) Li
2
Example 5-4
Example 5-3: Solution

Graphical presentation

Finding probabilities





P(exactly 2 breakdowns) = P(x = 2) = .35
P(0 to 2 breakdowns) = P(0 ≤ x ≤ 2) = P(x = 0) + P(x = 1) + P(x = 2)
= .15 + .20 + .35 = .70
P(more then 1 breakdown) = P(x > 1) = P(x = 2) + P(x = 3)
= .35 +.30 = .65
P(at most one breakdown) = P(x ≤ 1) = P(x = 0) + P(x = 1)
= .15 + .20 = .35

According to a survey, 60% of all students at a large
university suffer from math anxiety. Two students are
randomly selected from this university. Let x denote the
number of students in this sample who suffer from math
anxiety. Develop the probability distribution of x.
Solution




STAT 3038
Dr. Yingfu (Frank) Li
5-9
STAT 3038
5.3 Mean and Standard Deviation of a Discrete
Random Variable



The mean of a discrete variable x is the value that is expected
to occur per repetition, on average, if an experiment is
repeated a large number of times. It is denoted by µ and
calculated as µ = Σ x P(x)
The mean of a discrete random variable x is also called its
expected value and is denoted by E(x); that is, E(x) = Σ x P(x)
Example of tossing a coin twice, x = # of heads
X
P
xP
0
1/4
0
1
2/4
2/4
5-11
5-10
Dr. Yingfu (Frank) Li
Example 5-5


Recall Example 5-3 of Section 5-2. The probability
distribution Table 5.4 from that example is reproduced on
the next slide. In this table, x represents the number of
breakdowns for a machine during a given week, and P(x) is
the probability of the corresponding value of x. Find the
mean number of breakdown per week for this machine.
Solution
2
¼
2/4
µ = Σ x P(x) = 1
STAT 3038
Let us define the following two events:
N = the student selected does not suffer from math anxiety
M = the student selected suffers from math anxiety
Then
P(x = 0) = P(NN) = .16
P(x = 1) = P(NM or MN) = P(NM) + P(MN) = .24 + .24 = .48
P(x = 2) = P(MM) = .36
The mean is µ = Σx P(x) = 1.80
Dr. Yingfu (Frank) Li
STAT 3038
5-12
Dr. Yingfu (Frank) Li
3
Standard Deviation of
a Discrete Random Variable
Example 5-6
The standard deviation of a discrete random variable,
denoted by σ, measures the spread of its probability
distribution.




A higher value for the standard deviation of a discrete random
variable indicates that x can assume values over a larger range about
the mean.
A smaller value for the standard deviation indicates that most of the
values that x can assume are clustered closely about the mean.
Definition of variance - 2



Deviation
Standard deviation = square root of variance

Book’s definition of σ

Interpretation of the Standard Deviation

STAT 3038
 
x
2
Baier’s Electronics manufactures computer parts that are
supplied to many computer companies. Despite the fact that
two quality control inspectors at Baier’s Electronics check
every part for defects before it is shipped to another
company, a few defective parts do pass through these
inspections undetected. Let x denote the number of defective
computer parts in a shipment of 400. The following table
gives the probability distribution of x. Compute the standard
deviation of x.
P ( x)   2
same way as Section 3.4 of Chapter 3
5-13
Dr. Yingfu (Frank) Li
STAT 3038
Book’s Method to Find the Standard Deviation
Recommended Method

2 =  x2P(x) - 2 = 7.7 – 2.52 = 1.45 =>  =
Dr. Yingfu (Frank) Li
5-14
Computations to Find the Mean and Standard Deviation
(X-)2 = (X - )2
(X-)2 P(x)
X
P(x)
xP(x)
0
0.02
0
6.25
0.125
1
0.2
0.2
2.25
0.45
2
0.3
0.6
0.25
0.075
3
0.3
0.9
0.25
0.075
4
0.1
0.4
2.25
0.225
5
0.08
0.4
6.25
0.5
1
2.5
2 = 1.45
σ  1.45
STAT 3038
5-15
Dr. Yingfu (Frank) Li
STAT 3038
5-16
Dr. Yingfu (Frank) Li
4
Easy Example
5.4 The Binomial Probability Distribution
The following table gives the probability distribution for a random
Variable X, the number of DVDs that were returned late in a local
Blockbuster per week.

Binomial Experiment: an experiment satisfying five
conditions

X
0
1
2
3
4
P
0.45
0.3
?
0.1
0.05


1.
Find the probability that one or two DVDs were returned late.
2.
Find the probability that at least one DVD was returned late.


3.
Find X's mean 
4.
Find X's variance 2
5.




Find X's standard deviation 


5-17
Dr. Yingfu (Frank) Li

Notation
n = total number of trials
p = probability of success
q = 1 − p = probability of failure
x = number of successes in n trials
n − x =number of failures in n trials
Formula for X ~ B(n, p)

For a problem, first check if it is binomial experiment by
using the five conditions


STAT 3038
If answer is a yes, then identify n, p, x.
Use formula to obtain binomial probability distribution
5-19
5-18
Dr. Yingfu (Frank) Li
Example 5-10
P( x)  n C x p x q n  x , x = 0, 1, …, n

Tossing a coin 10 times – Example 5-8
Example 5-9: 5% of all DVD players made by a large electronics
company are defective and 3 DVD players are randomly selected
Rolling a die (trial, not experiment, has 2 outcomes)
Random guess for answers of a multiple-choice test/quiz
STAT 3038
Notation and Formula

X is called a binomial random variable and its distribution called BPD
X ~ B(n, p)
Examples of binomial experiment

Why not use Excel?
STAT 3038
There are fixed n identical trials
Each trial has only two outcomes, success & failure
Probability of success p remains constant for each trial
The trials are independent
X = the number of successes in n trials
Dr. Yingfu (Frank) Li
STAT 3038
Five percent of all DVD
players manufactured by
a large electronics
company are defective.
A quality control
inspector randomly
selects three DVD
player from the
production line. What is
the probability that
exactly one of these
three DVD players is
defective?
5-20
Dr. Yingfu (Frank) Li
5
Example 5 – 11
Example 5-18: Solution



Let D = a selected DVD player is defective P(D)=.05
G = a selected DVD player is good
P(G)=.95
P(DGG) = P(D)P(G)P(G) = (.05)(.95)(.95) = .0451
P(GDG) = P(G)P(D)P(G) = (.95)(.05)(.95) = .0451
P(GGD) = P(G)P(G)P(D) = (.95)(.95)(.05) = .0451
P(1 DVD player in 3 is defective)
= P(DGG or GDG or GGD)
= P(DGG)+P(GDG)+P(GGD)
= .0451 + .0451 + .0451
= .1353
Formula way

STAT 3038



n = 3, p = 0.05, q = 0.95, x = 1
5-21
Dr. Yingfu (Frank) Li
In a Pew Research Center nationwide telephone survey
conducted in March through April 2011, 74% of college
graduates said that college provided them intellectual growth
(Time, May 30, 2011). Assume that this result holds true for
the current population of college graduates. Let x denote the
number in a random sample of three college graduates who
hold this opinion. Write the probability distribution of x and
draw a bar graph for this probability distribution.

Dr. Yingfu (Frank) Li
Table I in Appendix C, the table of binomial probabilities.




List the probabilities of x for n = 1 to n = 25.
List the probabilities of x for selected values of p
Hence the table is very limited
Using Excel

Binom.dist(number_s, trials, probability_s, cumulative) =
binomdist(x, n, p, cumulative)


P(x 1) 3 C1(.74)1(.26)2  (3)(.74)(.0676)  .1501


P(x  3) 3 C3 (.74)3 (.26)0  (1)(.405224)(1)  .4052
Dr. Yingfu (Frank) Li
STAT 3038
Cumulative = 0, false for cumulative, it gives P(x)
Cumulative = 1, true for cumulative, it gives cumulative probabilities
from 0 to x, i.e., sum of P(0) through P(x).
Calculator TI – 83: 2nd => DISTR => 0 (A)

P(x  2) 3 C2 (.74)2 (.26)1  (3)(.5476)(.26)  .4271
5-23
5-22
Automatic Way to Find Binomial Probabilities
P(x  0) 3 C0 (.74)0 (.26)3  (1)(1)(.017576)  .0176
STAT 3038
Find the probability that exactly one of these 10 packages will not
arrive at its destination within the specified time.
Find the probability that at most one of these 10 packages will not
arrive at its destination within the specified time.
STAT 3038
Example 5 – 12

At the Express House Delivery Service, providing highquality service to customers is the top priority of the
management. The company guarantees a refund of all
charges if a package it is delivering does not arrive at its
destination by the specified time. It is known from past data
that despite all efforts, 2% of the packages mailed through
this company do not arrive at their destinations within the
specified time. Suppose a corporation mails 10 packages
through Express House Delivery Service on a certain day.
binompdf(n, p, x): gives P(x).
binomcdf(n, p, x): gives cumulative probabilities from 0 to x, i.e.,
binomcdf(n, p, x) = P(0) + P(1) + … + P(x).
5-24
Dr. Yingfu (Frank) Li
6
Example 5 – 13
Determining P(x = 3) for n = 6 and p = .30
In an NPD Group survey of adults, 30% of 50-year-old or older (let us
call them 50-plus) adult Americans said that they would be willing to
pay more for healthier options at restaurants (USA TODAY, 2011).
Suppose this result holds true for the current population of 50-plus
adult Americans. A random sample of six 50-plus adult Americans is
selected. Answer the following.





STAT 3038
Find the probability that exactly 3 persons in this sample hold the said
opinion.
Find the probability that at most two persons in this sample hold the said
opinion.
Find the probability that at least three persons in this sample hold the said
opinion.
Find the probability that one to three persons in this sample hold the said
opinion.
Let x be the number of persons in this sample who hold the said opinion.
Write the probability distribution of x, and draw a bar graph for this
probability distribution.
5-25
Dr. Yingfu (Frank) Li

Table way

Excel way


STAT 3038
Probability of Success and the Shape of the
Binomial Distribution

The binomial probability distribution is symmetric if p = .50




5-26

For any n, it gives a symmetric bell-shape
For large n, any p, it gives rough bell-shaped
General formula




Using Excel to show such feature


STAT 3038
5-27
Dr. Yingfu (Frank) Li
STAT 3038
=np
2 = n  p q
Examples


Mean
Variance
Special formula



Dr. Yingfu (Frank) Li
Mean and Standard Deviation of the Binomial
Distribution

The binomial probability distribution is skewed to the right if
p is less than .50.
The binomial probability distribution is skewed to the left if p
is greater than .50.
In a cell of Excel type in “binom.dist(3, 6, 0.3, 0)” and hit enter key
P(x = 3) = binom.dist(3, 6, 0.3, 0) = 0.18522
Examples from the book
Tossing a fair coin twice, X = # of heads
Tossing a fair coin 10 times, X = # of heads
Finding any kind of probability
Example 5-14 at page 236
5-28
Dr. Yingfu (Frank) Li
7
5.5 The Hypergeometric Probability
Distribution

Notations







Example 5-15

N = total number of elements in the population
r = number of successes in the population
N – r = number of failures in the population
n = number of trials (sample size)
x = number of successes in n trials
n – x = number of failures in n trials
The probability of x successes in n trials is given by

C
C
P( x)  x N  r n  x
N Cn
Brown Manufacturing makes auto parts that are sold to auto
dealers. Last week the company shipped 25 auto parts to a
dealer. Later, it found out that 5 of those parts were
defective. By the time the company manager contacted the
dealer, 4 auto parts from that shipment had already been
sold. What is the probability that 3 of those 4 parts were
good parts and 1 was defective?
Solution: N = 25, r = 20, N – r = 5, n = 4, x = 3, n – x = 1
r
P ( x  3) 

STAT 3038
5-29
Dr. Yingfu (Frank) Li
The following three conditions must be satisfied to apply the
Poisson probability distribution.






The number of accidents that occur on a given highway during a 1week period.
The number of customers entering a grocery store during a 1–hour
interval.
The number of television sets sold at a department store during a
given week.
5-31
Dr. Yingfu (Frank) Li
20
20!
5!

C3 5C1 3!( 20  3)! 1!(5  1)!

25!
25 C 4
4!( 25  4)!
(1140 )(5)
 .4506
12,650
Dr. Yingfu (Frank) Li
5-30
Poisson Probability Distribution Formula

According to the Poisson probability distribution, the
probability of x occurrences in an interval is
P (x) 
Examples of Poisson Probability Distribution

STAT 3038
x is a discrete random variable.
The occurrences are random.
The occurrences are independent.
C x N r Cn x

N Cn
STAT 3038
5.6 The Poisson Probability Distribution

r
 xe 
x!
where λ (pronounced lambda) is the mean number of
occurrences in that interval and the value of e is approximately
2.71828.
 Mean and Standard Deviation
 
2 
STAT 3038
 
5-32

Dr. Yingfu (Frank) Li
8
Example 5-17


Example 5-18
On average, a household receives 9.5 telemarketing phone
calls per week. Using the Poisson distribution formula, find
the probability that a randomly selected household receives
exactly 6 telemarketing phone calls during a given week.
Solution
 x e 
(9.5) 6 e 9.5
 Formula way

P ( x  6) 
x!
6!
(735,091.8906)(.00007485 )

720
 Excel way:

0
.
0764
POISSON.DIST(6, 9.5, 0) =


A washing machine in a laundromat breaks down an average
of three times per month. Using the Poisson probability
distribution formula, find the probability that during the next
month this machine will have



exactly two breakdowns
at most one breakdown
Solution



Formula way
Excel way
Calculator way
TI-84 calculator way
poissonpdf(9.5, 6) = 0.07642
STAT 3038
5-33
Dr. Yingfu (Frank) Li
STAT 3038
Example 5-20






exactly 6
at most 3
at least 7
An auto salesperson sells an average of .9 car per day. Let x
be the number of cars sold by this salesperson on any given
day. Find the mean, variance, and standard deviation.
Solutions
    . 9 car

Solution

STAT 3038
Example 5-21
On average, two new accounts are opened per day at an
Imperial Saving Bank branch. Using Table III of Appendix
C, find the probability that on a given day the number of new
accounts opened at this bank will be

Dr. Yingfu (Frank) Li
5-34
Three ways
2
 
5-35
Dr. Yingfu (Frank) Li
STAT 3038
   .9
 
. 9  . 949
5-36
car
Dr. Yingfu (Frank) Li
9