Download CH3 - WSU Department of Mathematics

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
no text concepts found
Transcript
9/2/2015
CH3: (Discrete) Random Variables
• For a given sample space S of some experiment,
a random variable (RV) is any rule that
associates a number with each outcome of S.
• In mathematical language, a random variable is a
function whose domain is the sample space and
whose range is the set of real numbers.
• To put it simply, a random variable is a variable
that takes on numerical values that depend on
the outcome of a chance operation.
MATH/STAT360(Wang)
CH3
1
Probability Distributions
CH3
MATH/STAT360(Wang)
CH3
2
• For every possible value x of the RV, the
pmf specifies the probability of observing
that value when the experiment is
performed.
• The conditions:
p(x)≥0
∑p(x)=1
are required of any pmf.
• The probability distribution or
probability mass function (pmf) of a
discrete RV is defined for every number x
by p(x)=P(X=x).
MATH/STAT360(Wang)
• In CH3 we will discuss discrete random
variables.
• In CH4 we will work with continuous
random variables.
3
MATH/STAT360(Wang)
CH3
4
1
9/2/2015
0.4
0.3
0.2
0.1
Consider selecting at random a student
who is among the 15,000 registered for the
current term at Mega University. Let X= the
number of classes for which the selected
student is registered, and suppose X has
the following pmf:
We can summarize the distribution
graphically:
p(x)
Example 3.11
1
0.01
2
0.03
3
0.13
4
0.25
5
0.39
6
0.17
7
0.02
0.0
x
p(x)
1
MATH/STAT360(Wang)
CH3
5
MATH/STAT360(Wang)
2
3
4
5
6
7
x = # Classes
CH3
6
Cumulative Distribution Function
• What is the probability that a randomly
selected student will be registered for 4
classes?
• The cumulative distribution function
(cdf) F(x) of a discrete RV variable X with
pmf p(x) is defined for every member x by
F ( x )  P( X  x ) 
• Find P(3≤X≤5)
 p( y )
y: y  x
• For any member x, F(x) is the probability
that the observed value of X will be at
most x.
MATH/STAT360(Wang)
CH3
7
MATH/STAT360(Wang)
CH3
8
2
9/2/2015
Example 3.11 (continued)
Expectation of X
• The pmf of X (number of classes) is:
x
p(x)
1
0.01
2
0.03
3
0.13
4
0.25
5
0.39
6
0.17
• Let X be a discrete RV with pmf p(x). The
expectation or mean value of X, denoted
by E(X) or µX is
7
0.02
• Then the cdf is:
F(x)=
0
0.01
0.04
0.17
0.42
0.81
0.98
1.00
MATH/STAT360(Wang)
E ( X )   X   x  p( x )
if x<1
if 1≤x<2
if 2≤x<3
if 3≤x<4
if 4≤x<5
if 5≤x<6
if 6≤x<7
if 7≤x
CH3
9
Example 3.11 (continued)
1
0.01
150
2
0.03
450
3
4
5
6
0.13 0.25 0.39 0.17
1950 3750 5850 2550
CH3
10
Expectation of a Function
• Since the total number of enrolled students is
15,000, we can find the number of students
registered for a given number of classes:
x
p(x)
#
MATH/STAT360(Wang)
• If the RV X has a pmf p(x), then the expectation
of any function h(X) denoted E[h(X)] or µh(X) is
computed by:
7
0.02
300
E [h( X )]   h( x )  p( x )
• The mean (or average) # of classes per student:
• The expected value for a linear function follows
directly:
E ( aX  b)  a  E ( X )  b
MATH/STAT360(Wang)
CH3
11
MATH/STAT360(Wang)
CH3
12
3
9/2/2015
Shortcut Formula for σ2
Variance of X
• Let X have pmf p(x) and expectation µ.
Then the variance of X, denoted V(X) or
σ2 is:
V ( X )   2  [ x 2  p( x )]   2
 E ( X 2 )  [ E ( X )]2
V ( X )   2   ( x   )2  p( x )  E [( X   )2 ]
• The standard deviation (SD) of X is:
  2
MATH/STAT360(Wang)
CH3
13
1
0.01
2
0.03
3
0.13
4
0.25
5
0.39
6
0.17
7
0.02


Using the “Shortcut formula”….
E( X 2 ) 
V ( X )  E ( X 2 )  [ E ( X )] 2 
CH3
14
Binomial Experiments:
• The experiment consists of a sequence of n
smaller experiments called trials where n is
fixed in advance of the experiment.
• Each trial can result in one of the same two
possible outcomes (“Success” or “Failure”)
• The trials are independent, so that the
outcome of any particular trial does not
influence the outcome of any other trial.
• The probability of success is constant from trial
to trial; we denote this probability p.
V ( X )   ( x   ) 2  p( x)
MATH/STAT360(Wang)
CH3
3.4 The Binomial Probability
Distribution
Example 3.11 (continued)
x
p(x)
MATH/STAT360(Wang)
15
MATH/STAT360(Wang)
CH3
16
4
9/2/2015
Binomial Random Variable X
Example: Imagine flipping a coin. We will call
Heads a “success” and Tails a “failure”.
Assuming the coin is fair, then p=0.5 (Heads
and Tails are equally likely). In two tosses
(n=2), we have already determined the
probability of observing 0, 1 or 2 Heads
(successes) using a probability tree:
Number of Heads Probability
0
0.25
1
0.5
2
0.25
This is a binomial distribution with p=0.5 and n=2.
MATH/STAT360(Wang)
CH3
17
• The binomial random variable X
associated with a binomial experiment
consisting of n trials is defined as
X= the number of successes among the n
trials
• Because the pmf of a binomial RV X
depends on the two parameters n and p,
we denote the pmf by Bin(x;n,p).
MATH/STAT360(Wang)
CH3
18
Binomial Distributions with
p=0.5 and various values of n
Binomial Probability Formula
Binomial Distribution with p=0.5 and n=2
n
Bin( x; n, p )  P ( X  x)    p x (1  p ) n  x
 x
Binomial Distribution with p=0.5 and n=3
0.4
0.5
0.3
Probability
Probability
0.4
0.3
0.2
0.2
0.1
0.1
0.0
0
1
Number of Successes
0.0
2
0
Binomial Distribution with p=0.5 and n=5
1
2
Number of Successes
3
Binomial Distribution with p=0.5 and n=10
0.35
0.25
0.30
0.20
Probability
Probability
0.25
0.20
0.15
0.15
0.10
0.10
0.05
0.05
0.00
MATH/STAT360(Wang)
CH3
19
0
1
2
3
Number of Successes
MATH/STAT360(Wang)
4
0.00
5
CH3
0
1
2
3
4
5
6
7
Number of Successes
8
9
10
20
5
9/2/2015
Binomial Distributions with
n=20 and various values of p
Example: Binomial Distribution
with n=3,p=0.5
 3
P( X  0)    p 0 (1  p )30  1  0.50  (1  0.5)3  1  1  0.125  0.125
 0
 3
P( X  1)    p1 (1  p )31  3  0.51  (1  0.5) 2  1  0.5  0.25  0.375
1 
3 2
P( X  2)    p (1  p )32  3  0.52  (1  0.5)1  1  0.25  0.5  0.375
2
 3 3
P( X  3)    p (1  p )33  1  0.53  (1  0.5)0  1  0.125  1  0.125
 3
Binomial Distribution with p=0.5 and n=3
MATH/STAT360(Wang)
CH3
21
Expectation and Variance of a Binomial
RV
E ( X )    np
V ( X )   2  np(1  p )
  np(1  p )
CH3
CH3
23
0.3
0.2
0.1
0.0
0
1
2
Number of Successes
3
22
Example: Circuit Boards
When circuit boards used
in the manufacture of
compact disc players are
tested, the long-run
percentage of defectives
is 5%. Let X=the number
of defective boards in a
random sample of size
15, so X~Bin(15,0.05).
If X~Bin(n,p), then
MATH/STAT360(Wang)
MATH/STAT360(Wang)
0.4
Probability
Number of Successes Probability
0
0.125
1
0.375
2
0.375
3
0.125
MATH/STAT360(Wang)
x
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
CH3
P(X=x)
0.46329
0.36576
0.13475
0.03073
0.00485
0.00056
4.93E-05
3.34E-06
1.76E-07
7.19E-09
2.27E-10
5.43E-12
9.52E-14
1.16E-15
8.70E-18
3.05E-20
P(X≤x)
0.46329
0.82905
0.96380
0.99453
0.99939
0.99995
1.00000
1.00000
1.00000
1.00000
1.00000
1.00000
1.00000
1.00000
1.00000
1.00000
24
6
9/2/2015
• What is the probability that none of the 15
circuit boards is defective?
• Find E(X)
• Determine P(X≤2)
• Find V(X)
• Determine P(X≥5)
MATH/STAT360(Wang)
CH3
25
3.6 Poisson Probability Distribution
• A random variable X is said to have a Poisson
distribution with parameter λ (λ>0) if the pmf of X
is
e   x
p ( x,  )  P ( X  x ) 
x!
MATH/STAT360(Wang)
CH3
26
Expectation and Variance of a
Poisson RV
If X has a Poisson distribution with
parameter λ, then E(X)=V(X)= λ.
for x  0,1, 2,
• The value of λ is frequently a rate per unit time
or per unit area.
• The letter “e” represents the base of the natural
logarithm: e=2.71828.
MATH/STAT360(Wang)
CH3
27
MATH/STAT360(Wang)
CH3
28
7
9/2/2015
MATH/STAT360(Wang)
CH3
29
0.15
0.10
0
2
4
6
8
10
12
x
CH3
30
• For binomial experiments where n is large
and p is small, the distribution is
approximately Poisson with λ=np.
• As a rule of thumb, the approximation can
be safely applied if n>50 and np<5.
• Find the probability that a trap contains at
most 5 clams.
CH3
Poisson Distribution: Mean = 4.5
Relationship between Poisson and
Binomial Distributions
• Find the probability that a trap contains
exactly 5 clams.
MATH/STAT360(Wang)
MATH/STAT360(Wang)
P(X≤x)
0.0111
0.0611
0.1736
0.3423
0.5321
0.7029
0.831
0.9134
0.9597
0.9829
0.9933
0.9976
0.9992
0.9998
0.9999
1
Probability Mass
Let X denote the number of clams
captured in a trap during a given time
period. Suppose that X has a Poisson
distribution with λ=4.5, so on average
traps will contain 4.5 clams.
P(X=x)
0.0111
0.0500
0.1125
0.1687
0.1898
0.1708
0.1281
0.0824
0.0463
0.0232
0.0104
0.0043
0.0016
0.0006
0.0002
0.0001
0.05
x
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
0.00
Example 3.39: Clams
31
MATH/STAT360(Wang)
CH3
32
8
9/2/2015
Example: Glass Manufacturing
• Suppose 1 out of 1000 windows have
bubbles.
• From a batch of 2000 windows, what is the
probability that fewer than 3 will have
bubbles?
• Binomial distribution with n=2000,
p=0.001.
MATH/STAT360(Wang)
CH3
33
• Is the Poisson Approximation reasonable
here?
• If so, what is the value of λ?
MATH/STAT360(Wang)
Bin(n=2000,p=0.001)
CH3
Poisson(λ=2)
Poisson Distribution: Mean = 2
0
2
4
6
8
Number of Successes
0.20
0.15
Probability Mass
0.10
0.05
P(X≤x)
0.13534
0.40601
0.67668
0.85712
0.94735
0.98344
0.00
0.15
0.10
0.05
Probability Mass
0.20
0.25
x
0
1
2
3
4
5
0.00
P(X≤x)
0.13520
0.40587
0.67668
0.85712
0.94735
0.98344
0.25
Binomial Distribution: Trials = 2000, Probability of success = 0.001
x
0
1
2
3
4
5
34
0
2
4
6
8
x
MATH/STAT360(Wang)
CH3
35
MATH/STAT360(Wang)
CH3
36
9
9/2/2015
Poisson Process
Example: Cars
• If the number of events that can occur in a
time interval are independent with a mean
rate λ and there are t disjoint time
intervals, then X=the number of events
occurring in the t time intervals follows a
Poisson distribution with mean λt.
• There is an intersection that, during the
night, will average 5 cars per minute
approaching it. What is the probability that
exactly 18 cars reach the intersection
during a three minute period.
MATH/STAT360(Wang)
MATH/STAT360(Wang)
CH3
37
CH3
38
Key words
•
•
•
•
•
•
Probability mass function (pmf)
Cumulative distribution function (cdf)
Expectation
Variance and standard deviation
Binomial random variable
Poisson random variable
MATH/STAT360(Wang)
CH3
39
10
Related documents