Download Random Variables

Document related concepts
no text concepts found
Transcript
Chapter 4
Probability
Distributions
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
Discrete Random
Variables
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
Random Variable
For a given sample space S of some
experiment, a random variable is any
rule that associates a number with
each outcome in S .
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
Types of Random Variables
A discrete random variable is an rv whose
possible values either constitute a finite
set or else can listed in an infinite
sequence. A random variable is
continuous if its set of possible values
consists of an entire interval on a number
line.
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
Random Variables
Represents a possible numerical value
from a random event
Random
Variables
Discrete
Random Variable
Continuous
Random Variable
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
Probability
Distributions for
Discrete Random
Variables
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
Discrete Random Variables
• Can only assume 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 (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
Discrete Probability Distribution
Experiment: Toss 2 Coins.
T
T
H
H
T
H
T
H
Probability Distribution
x Value
Probability
0
1/4 = .25
1
2/4 = .50
2
1/4 = .25
Probability
4 possible outcomes
Let x = # heads.
.50
.25
0
1
2
x
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
Discrete Probability Distribution
• The set of ordered Pairs (x, f(x) ) is a
probability function, probability mass function or
probability distribution function of the discrete
random variable X if
• f(x)  0
•  f (x )  1
• P(X=x) = f(x)
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
Cumulative Distribution Function
The cumulative distribution function
(cdf) F(x) of a discrete rv variable X with
pmf p(x) is defined for every number by
F (x )  P (X  x ) 

p(y )
y :y  x
For any number x, F(x) is the probability
that the observed value of X will be at
most x.
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
Proposition
For any two numbers a and b with a  b,
P (a  X  b )  F (b )  F (a )
“a–” represents the largest possible X
value that is strictly less than a.
Note: For integers
P (a  X  b )  F (b )  F (a  1)
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
Example
A probability distribution for a random variable X:
x
–8
P(X = x) 0.13
–3
0.15
–1
0.17
0
0.20
1
0.15
4
6
0.11 0.09
Find
a. P  X  0 
0.65
b. P  3  X  1
0.67
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
Expected Values of
Discrete Random
Variables
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
The Expected Value of X
Let X be a discrete rv with possible
values x and pmf p(x). The expected
value or mean value of X, denoted
E ( X ) or  X , is
E (X )  X   x  p (x )
x
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
Ex. Use the data below to find out the expected
number of the number of credit cards that a student
will possess.
x = # credit cards
x
P(x =X)
0
1
2
3
4
5
6
0.08
0.28
0.38
0.16
0.06
0.03
0.01
E  X   x1 p1  x2 p2  ...  xn pn
 0(.08)  1(.28)  2(.38)  3(.16)
 4(.06)  5(.03)  6(.01)
=1.97
About 2 credit cards
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
The Expected Value of a Function
If the rv X has the set of possible
values x and pmf p(x), then the
expected value of any function h(x),
denoted E[h( X )] or h( X ) , is
E [h (X )]   h (x )  p (x )
x
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
The Variance and Standard Deviation
Let X have pmf p(x), and expected value 
Then the variance of X, denoted V(X)
2
2
(or  X or  ), is
V (X )   (x   )  p (x )  E [(X   ) ]
2
2
x
The standard deviation (SD) of X is
X 
2
X
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
Ex. The quiz scores for a particular student are
given below:
22, 25, 20, 18, 12, 20, 24, 20, 20, 25, 24, 25, 18
Find the variance and standard deviation.
Value
Frequency
Probability
12 18
1
2
.08 .15
20
4
.31
22
1
.08
24
2
.15
25
3
.23
  21
V ( X )  p1  x1     p2  x2     ...  pn  xn   
2
2
2
  V (X )
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
V ( X )  .08 12  21  .15 18  21  .31 20  21
2
2
.08  22  21  .15  24  21  .23  25  21
2
2
2
2
V ( X )  13.25
  V (X )
 13.25  3.64
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
Shortcut Formula for Variance


2
2
V (X )      x  p (x )   
x

2
    E  X 
E X
2
2
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
Mean and Variance of Linear
Combinations of Random
Variables
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
Expected Value of Linear Combinations
E (aX  b)  a  E ( X )  b
This leads to the following:
1. For any constant a,
E (aX )  a  E ( X ).
2. For any constant b,
E ( X  b)  E ( X )  b.
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
The Expected Value of
E [ g (X )  h (X )]  E [ g (X )]  E [h (X )]
Also
E [ g (X ,Y )  h (X ,Y )] 
E [ g (X ,Y )]  E [h (X ,Y )]
Finally
E [Y  X ]  E [Y ]  E [X ]
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
If X and Y are independent, then
E (XY )  E (X )E (Y )
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
Rules of Variance
V (aX
2
 b)   aX b
a
2
2
 X
and  aX b  a   X
This leads to the following:
1.
2.
2
2
2
 aX  a   X ,  aX
2
2
 X b   X
 a  X
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
If X and Y are random variables,
then

2
aX bY
 a   b   2ab XY
2
2
X
2
2
Y
If X and Y are Independent
random variables, then

2
aX bY
 a  b 
2
2
X
2
2
Y
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
If X and Y are Independent
random variables, then

2
aX bY
 a  b 
2
2
X
2
2
Y
If X1, X2, … Xn are
Independent random variables,
then 2
a X
1
a
2
1
1 a2 X 2 ...an X n
2
X1
a 
2
2
2
X2

 ...  a 
2
n
2
Xn
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
Special Distributions
for Discrete Random
Variables
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
The Discrete Uniform
Distribution
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
If the random variable X assumes the
values x1, x2, …, xk with equal
probability, then the discrete uniform
distribution is given by
1
f (x ; k )  ,
k
x  x 1, x 2 ,..., x k
The mean and the variance of the
discrete uniform are respectively
k
1 k
1
2
2
   x i ,    (x i   )
k i 1
k i 1
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
The Binomial
Probability
Distribution
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
Binomial Experiment
An experiment for which the following
four conditions are satisfied is called a
binomial experiment (Bernoulli
Process).
1. The experiment consists of a
sequence of n trials, where n is fixed
in advance of the experiment.
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
2. The trials are identical, and each trial
can result in one of the same two
possible outcomes, which are denoted
by success (S) or failure (F).
3. The trials are independent.
4. The probability of success is constant
from trial to trial: denoted by p.
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
Binomial Random Variable
Given a binomial experiment consisting
of n trials, the binomial random variable
X associated with this experiment is
defined as
X = the number of S’s among n trials
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
Notation for the pmf of
a Binomial rv
Because the pmf of a binomial rv X
depends on the two parameters n and
p, we denote the pmf by b(x;n,p).
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
Computation of a Binomial pmf
 n  x
n x
x  0,1, 2,...n
  p 1  p 
b  x ; n , p    x 

0
otherwise

Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
Ex. A card is drawn from a standard 52-card
deck. If drawing a club is considered a success,
find the probability of
a. exactly one success in 4 draws (with replacement).
p = ¼; q = 1– ¼ = ¾
1
3
4
  1   3 
    
1 4   4 
 0.422
b. no successes in 5 draws (with replacement).
0
5
5 1   3 
    
0 4   4 
 0.237
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
Notation for cdf
For X ~ Bin(n, p), the cdf will be
denoted by
P( X  x)  B( x; n, p) 
x
 b( y; n, p)
y 0
x = 0, 1, 2, …n
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
Mean and Variance
For X ~ Bin(n, p), then
E(X) = np, and
V(X) = np(1 – p) = npq,
(where q = 1 – p).
 X  npq
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
Ex. 5 cards are drawn, with replacement, from a
standard 52-card deck. If drawing a club is
considered a success, find the mean, variance, and
standard deviation of X (where X is the number of
successes).
p = ¼; q = 1– ¼ = ¾
1
  np  5    1.25
4
 1  3 
V  X   npq  5      0.9375
 4  4 
 X  npq  0.9375  0.968
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
Ex. If the probability of a student successfully
passing this course (C or better) is 0.82, find the
probability that given 8 students
8
8
0
a. all 8 pass.
   0.82   0.18   0.2044
8
b. none pass.
8
0
8
   0.82   0.18   0.0000011
0
c. at least 6 pass.
8
6
2 8
7
1 8
8
0
   0.82   0.18     0.82   0.18     0.82   0.18
6
7
8
 0.2758  0.3590  0.2044 = 0.8392
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
Hypergeometric and
Distributions
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
The Hypergeometric Distribution
The three assumptions that lead to a
hypergeometric distribution:
1. The population or set to be sampled
consists of N individuals, objects, or
elements (a finite population).
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
2. Each individual can be characterized as a
success (S) or failure (F), and there are K
successes in the population.
3. A sample of n individuals is selected
without replacement in such a way that
each subset of size n is equally likely to
be chosen.
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
Hypergeometric Distribution
If X is the number of S’s in a completely
random sample of size n drawn from a
population consisting of K S’s and (N – K)
F’s, then the probability distribution of X,
called the hypergeometric distribution, is
given by
 K  N  K 



x
n

x


P (X  x )  h (x ; n , K , N )  
N 


 n 
max(0, n  N  K )  x  min(n , K )
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
Ex. A card is drawn from a standard 52-card
deck. If drawing a club is considered a success,
find the probability of
a. exactly one success in 4 draws (without replacement).
N=52, K=13, n=4
 13   39 
  
 1   3   0.4388
 52 
 
 4 
b. no successes in 5 draws (without replacement).
13   39 
  
 0   5   0.2215
 52 
 
 5
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
Hypergeometric
Mean and Variance
K
E (X )  n 
N
K
 N n 
V (X )  
n 
N
 N 1 
 K 
1  
 N 
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
Geometric Distribution
The pmf of the geometric rv X with
parameter p = P(S) is
g (x ; p )  p (1  p )
x 1
x = 1, 2, …
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
Geometric Mean and Variance
1
E (X ) 
p
V (X ) 
(1  p )
p
2
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
The Poisson Probability
Distribution
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
Poisson Process
Assumptions:
1. The number of outcomes occurring in one
time interval or specified region of space is
independent of the number that occurs in any
other disjoint time interval or specified
region.
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
Poisson Process
2. The probability that a single outcome will
occur during a very short time interval or
specified region is proportional to the length of
time interval or the size of the region and does
not depend on the number of outcomes
occurring outside interval or specified region
3.The Probability that more than one outcome
will occur in such short time interval or fall in
such small region is negligible.
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
Poisson Distribution
The probability Distribution of the Poisson
random variable X, representing the number
of outcomes occurring in a given time
interval or specified region denoted by t is
p (x ; t ) 
e
 t
(t )
x!
x
x  0,1, 2...
where  is the average number of outcomes
per unit time or region.
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
The Poisson Distribution
as a Limit of the binomial
Suppose that in the binomial pmf
b(x;n, p), we let n   and p  0 in such
a way that np approaches a value   0.
Then b( x; n, p)  p( x;  ).
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
Poisson Distribution
Mean and Variance
If X has a Poisson distribution with
parameter  , then
E (X ) V (X )  t
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
Ex. At a department store customers arrive at
a checkout counter at a rate on three per 15
minutes. What is the probability that a
counter has two customers over a 30 minutes
randomly selected?
Sol.   3, t  2
p (x  2; t  6) 
e
6
2
(6)
 0.0446
2!
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc.
Related documents