The UNIVERSITY of NORTH CAROLINA at CHAPEL

Review of Exam 2
Sections 4.6 โ€“ 5.6
Jiaping Wang
Department of Mathematical Science
04/01/2013, Monday
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Outline
Negative Binomial, Poisson, Hypergeometric
Distributions and Moment Generating Function
Continuous Random Variables and Probability
Distribution
Uniform, Exponential, Gamma, Normal
Distributions
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Part 1. Negative Binomial, Poisson,
Hypergeometric Distributions and
MGF
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Negative Binomial Distribution
What if we were interested in the number of failures prior to the
second success, or the third success or (in general) the r-th
success?
Let X denote the number of failures prior to the r-th success, p denotes the
common probability.
The negative binomial distribution function:
๐‘Ÿ๐‘ž๐‘ฅ , x= 0, 1, 2, โ€ฆ., q=1-p
P(X=x)=p(x)= ๐‘ฅ+๐‘Ÿโˆ’1
๐‘
๐‘Ÿโˆ’1
If r=1, then the negative binomial distribution becomes the geometric distribution.
In summary, ๐ธ ๐‘‹ =
๐‘Ÿ๐‘ž
,๐‘‰
๐‘
๐‘‹ =
๐‘Ÿ๐‘ž
๐‘2
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Poisson Distribution
The Poisson probability function:
ฮป๐‘ฅ โˆ’ ๐‘ฅ
P(X=x)=p(x)= ๐‘’ , x=
๐‘ฅ!
The distribution function is
F(x)=P(Xโ‰คx)=
๐‘–
๐‘ฅ ฮป
๐‘–=0 ๐‘–!
0, 1, 2, โ€ฆ., for ฮป> 0
๐‘’โˆ’๐‘–
Recall that ฮป denotes the mean number of occurrences in one time period, if there
are t non-overlapped time periods, then the mean would be ฮปt. Poisson distribution
is often referred to as the distribution of rare events.
E(X)= V(X) = ฮป
for Poisson random variable.
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Hypergeometric Distribution
Now we consider a general case: Suppose a lot consists
of N items, of which k are of one type (called
successes) and N-k are of another type (called
failures). Now n items are sampled randomly and
sequentially without replacement. Let X denote the
number of successes among the n sampled items. So
What is P(X=x) for some integer x?
The probability function is:
P(X=x) = p(x) =
๐‘˜
๐‘ฅ
๐‘โˆ’๐‘˜
๐‘›โˆ’๐‘ฅ
๐‘
๐‘›
, 0 โ‰ค ๐‘ฅ โ‰ค ๐‘˜ โ‰ค ๐‘, 0 โ‰ค ๐‘ฅ โ‰ค ๐‘› โ‰ค ๐‘
Which is called hypergeometric probability distribution.
๐’Œ
๐‘ฌ ๐‘ฟ =๐’
๐‘ต
๐’Œ
๐’Œ ๐‘ตโˆ’๐’
๐‘ฝ ๐‘ฟ =๐’
๐Ÿโˆ’
๐‘ต
๐‘ต ๐‘ตโˆ’๐Ÿ
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Moment Generating Function
The k-th moment is defined as E(Xk)=โˆ‘xkp(x). For example, E(X) is the 1st
moment, E(X2) is the 2nd moment.
The moment generating function is defined as
M(t)=E(etX)
So we have M(k)(0)=E(Xk).
For example, ๐‘ด
๐Ÿ
๐’• =
๐’…๐‘ด ๐’•
๐’…๐’•
๐’…
= ๐’…๐’• ๐‘ฌ ๐’†๐’•๐‘ฟ = ๐‘ฌ
So if set t=0, then M(1)(0)=E(X).
๐’… ๐’•๐‘ฟ
๐’†
๐’…๐’•
= ๐‘ฌ[๐‘ฟ๐’†๐’•๐‘ฟ]
It often is easier to evaluate M(t) and its derivatives than to find the moments of the
random variable directly.
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Part 2. Continuous Random Variables
and Probability Distribution
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Density Function
A random variable X is said to be continuous if there is a function
f(x), called probability density function, such that
Notice that P(X=a)=P(a โ‰ค X โ‰ค a)=0.
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Distribution Function
The distribution function for a random variable X is defined as
F(b)=P(X โ‰ค b).
If X is continuous with probability density function f(x), then
Notice that Fโ€™(x)=f(x).
For example, we are given
Thus,
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Expected Values
Definition 5.3: The expected value of a continuous random
variable X that has density function f(x) is given by
โˆž
๐ธ ๐‘‹ =
๐‘ฅ๐‘“ ๐‘ฅ ๐‘‘๐‘ฅ .
โˆ’โˆž
Note: we assume the absolute convergence of all integrals so
that the expectations exist.
Theorem 5.1: If X is a continuous random variable with
probability density f(x), and if g(X) is any real-valued function of
โˆž
X, then
๐ธ ๐‘” ๐‘‹ = โˆ’โˆž ๐‘” ๐‘ฅ ๐‘“ ๐‘ฅ ๐‘‘๐‘ฅ
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Variance
Definition 5.4: For a random variable X with probability density
function f(x), the variance of X is given by
โˆž
V ๐‘‹ = ๐ธ ๐‘‹ โˆ’ ๐œ‡ 2 = โˆ’โˆž ๐‘ฅ โˆ’ ๐œ‡ 2๐‘“ ๐‘ฅ ๐‘‘๐‘ฅ = ๐ธ ๐‘‹2 โˆ’ ๐œ‡2 .
Where ฮผ=E(X).
For constants a and b, we have
E(aX+b)=aE(X)+b
V(aX+b)=a2V(X)
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Part 3. Uniform, Exponential,
Gamma, Normal Distributions
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Uniform Distribution โ€“ Density Function
Consider a simple model for the continuous random variable X, which is
equally likely to lie in an interval, say [a, b], this leads to the uniform
probability distribution, the density function is given as
๐Ÿ
๐’‡ ๐’™ = ๐’ƒ โˆ’ ๐’‚,๐ŸŽ โ‰ค ๐’™ โ‰ค ๐’ƒ
๐ŸŽ,
๐’๐’•๐’‰๐’†๐’“๐’˜๐’Š๐’”๐’†
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Uniform Distribution โ€“ CDF
The distribution function for a uniformly distributed X is given by
0, ๐‘ฅ < 1
๐‘ฅโˆ’๐‘Ž
, ๐‘Žโ‰ค๐‘ฅโ‰ค๐‘
๐น ๐‘ฅ =
๐‘โˆ’๐‘Ž
1, ๐‘ฅ > ๐‘
For (c, c+d) contained within (a, b), we have
P(cโ‰คXโ‰คc+d)=P(Xโ‰คc+d)-P(Xโ‰คc)=F(c+d)-F(c)=d/(b-a), which this
probability only depends on the length d.
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Uniform Distribution -- Mean and Variance
โˆž
๐ธ ๐‘‹ =
๐‘
๐‘ฅ๐‘“ ๐‘ฅ ๐‘‘๐‘ฅ =
โˆ’โˆž
๐‘Ž
โˆž
๐ธ ๐‘‹2 =
๐‘
๐‘ฅ2๐‘“ ๐‘ฅ ๐‘‘๐‘ฅ =
โˆ’โˆž
๐‘‰ ๐‘‹ =๐ธ
๐‘‹2
โˆ’
๐ธ2
๐‘‹ =
๐‘Ž
๐‘Ž2+๐‘Ž๐‘+๐‘2 ๐‘Ž+๐‘ 2
3
2
the length of the interval [a, b].
๐‘ฅ
๐‘Ž+๐‘
๐‘‘๐‘ฅ =
๐‘โˆ’๐‘Ž
2
๐‘ฅ2
๐‘Ž2 + ๐‘Ž๐‘ + ๐‘2
๐‘‘๐‘ฅ =
๐‘โˆ’๐‘Ž
3
=
1
12
๐‘โˆ’๐‘Ž
2
which depends only on
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Probability Density Function
In general, the exponential density function is given by
๐‘“ ๐‘ฅ =
1 โˆ’ ๐‘ฅ /๐œƒ
๐‘’
,
๐œƒ
๐‘ฅโ‰ฅ0
0, ๐‘œ๐‘กโ„Ž๐‘’๐‘Ÿ๐‘ค๐‘–๐‘ ๐‘’
Where the parameter ฮธ is a constant (ฮธ>0) that determines the
rate at which the curve decreases.
ฮธ=2
ฮธ = 1/2
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Cumulative Distribution Function
The exponential CDF is given as
0, ๐‘ฅ < 0
/
๐น ๐‘ฅ =
1 โˆ’ ๐‘’ โˆ’ ๐‘ฅ ๐œƒ, ๐‘ฅ โ‰ฅ 0
ฮธ=2
ฮธ = 1/2
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Mean and Variance
โˆž
๐‘ฌ ๐‘ฟ =
โˆž
๐’™๐’‡ ๐’™ ๐’…๐’™ =
โˆ’โˆž
=
๐„
๐—๐Ÿ
=
๐Ÿ โˆž
๐’™
๐œฝ ๐ŸŽ
โˆ™ ๐’†๐’™๐’‘
โˆž ๐ฑ๐Ÿ
๐ž๐ฑ๐ฉ
๐ŸŽ ๐›‰
๐ฑ
โˆ’
๐›‰
๐’™
โˆ’
๐œฝ
๐ŸŽ
๐’…๐’™ =
๐๐ฑ =
๐Ÿ
๐šช
๐›‰
๐’™
๐’™
๐’†๐’™๐’‘ โˆ’ ๐’…๐’™
๐œฝ
๐œฝ
๐Ÿ
ฮ“
๐œฝ
๐Ÿ ๐œฝ๐Ÿ = ๐œฝ.
๐Ÿ‘ ๐›‰๐Ÿ‘ = ๐Ÿ๐›‰๐Ÿ.
Then we have V(X)=E(X2)-E2(X)=2ฮธ2- ฮธ2= ฮธ2.
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Probability Density Function (PDF)
In general, the Gamma density function is given by
๐‘“ ๐‘ฅ =
1
๐›ผ โˆ’ 1exp(โˆ’ ๐‘ฅ ),
๐‘ฅ
ฮ“ ๐›ผ ๐›ฝ๐›ผ
๐›ฝ
๐‘ฅโ‰ฅ0
0, ๐‘œ๐‘กโ„Ž๐‘’๐‘Ÿ๐‘ค๐‘–๐‘ ๐‘’
Where the parameters ฮฑ and ฮฒ are constants (ฮฑ >0, ฮฒ>0) that
determines the shape of the curve.
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
๐‘ฌ ๐‘ฟ =
โˆž
๐’™๐’‡ ๐’™ ๐’…๐’™ =
โˆ’โˆž
๐Ÿ
ฮ“ ๐œถ ๐œท๐œถ
โˆž
๐’™โˆ™๐Ÿ
๐’™
โˆ’๐Ÿ
๐œถ
๐’™
๐’†๐’™๐’‘ โˆ’ ๐’…๐’™=
๐ŸŽ ฮ“ ๐œถ ๐œท๐œถ
๐œท
โˆž ๐œถ
๐’™
๐Ÿ
๐œถ+๐Ÿ
๐’™
๐’†๐’™๐’‘
โˆ’
๐’…๐’™
=
ฮ“
๐œถ
+
๐Ÿ
๐œท
๐ŸŽ
๐œท
ฮ“ ๐œถ ๐œท๐œถ
= ๐œถ๐œท
Similary , we can find ๐‘ฌ(๐‘ฟ๐Ÿ) = ๐œถ(๐œถ + ๐Ÿ)๐œท๐Ÿ, so
๐‘ฝ(๐‘ฟ) = ๐‘ฌ(๐‘ฟ๐Ÿ) โˆ’ ๐‘ฌ๐Ÿ(๐‘ฟ) = ๐œถ๐œท๐Ÿ.
Suppose ๐’€ = ๐‘ฟ๐’Š with ๐‘ฟ๐Ÿ, ๐‘ฟ๐Ÿ, โ€ฆ , ๐‘ฟ๐’ being independent
Gamma variables with parameters ฮฑ and ฮฒ, then
๐‘ฌ(๐’€) = ๐’๐œถ๐œท, ๐‘ฝ(๐’€) = ๐’๐œถ๐œท๐Ÿ.
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Probability Density Function
In general, the normal density function is given by
๐‘“ ๐‘ฅ =
1
exp
๐œŽ 2๐œ‹
โˆ’
๐‘ฅโˆ’๐œ‡
2๐œŽ2
2
, โˆ’โˆž < ๐‘ฅ < โˆž, where the
parameters ฮผ and ฯƒ are constants (ฯƒ >0) that determines the
shape of the curve.
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Standard Normal Distribution
Let Z=(X-ฮผ)/ฯƒ, then Z has a standard normal distribution
๐‘ง2
๐‘“ ๐‘ง =
exp โˆ’
, โˆ’โˆž < ๐‘ง < โˆž
2
2๐œ‹
1
It has mean zero and variance 1,
that is, E(Z)=0, V(Z)=1.
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Mean and Variance
โˆž
โˆž
๐’›๐Ÿ
๐‘ฌ ๐’ =
๐’›๐’‡ ๐’› ๐’…๐’™ =
๐’†๐’™๐’‘ โˆ’
๐’…๐’›
๐Ÿ
๐Ÿ๐…
โˆ’โˆž
โˆ’โˆž
โˆž
๐Ÿ
๐’›๐Ÿ
=
๐’› โˆ™ ๐’†๐’™๐’‘ โˆ’ ๐’…๐’› = ๐ŸŽ.
โˆ’โˆž
๐Ÿ๐…
๐’›
๐Ÿ
๐„ ๐™๐Ÿ
โˆž
=
โˆ’โˆž
๐ณ๐Ÿ
๐’›๐Ÿ
๐Ÿ
๐ž๐ฑ๐ฉ โˆ’
๐๐ณ =
๐Ÿ
๐Ÿ๐…
๐Ÿ๐…
โˆž
๐ŸŽ
/
๐’–๐Ÿ ๐Ÿ๐ž๐ฑ๐ฉ
๐’–
๐Ÿ
๐Ÿ‘
โˆ’ ๐๐ฎ =
ฮ“
๐Ÿ
๐Ÿ๐… ๐Ÿ
๐Ÿ
๐Ÿ‘/๐Ÿ
= ๐Ÿ.
Then we have V(Z)=E(Z2)-E2(Z)=1.
As Z=(X-ฮผ)/ฯƒ๏ƒ X=Zฯƒ+ฮผ๏ƒ E(X)=ฮผ, V(X)=ฯƒ2.
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
For example,
P(-0.53<Z<1.0)=P(0<Z<1.0)
+P(0<Z<0.53)=0.3159+0.2019
=0.5178
P(0.53<Z<1.2)=P(0<Z<1.2)P(0<Z<0.53)=0.3849-0.2019
=0.1830
P(Z>1.2)=1-P(Z<1.22)=10.3888=0.6112
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL