












Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!













Mass Functions and Density Functions
Let’s make tosses of a biased coin whose outcomes are independent. Let X denote the random variable that gives the number of tails before the first head and p denote the probability of heads in any given toss. Then
fX (0) = P{X = 0} = P{H} = p fX (1) = P{X = 1} = P{TH} = (1 − p)p fX (2) = P{X = 2} = P{TTH} = (1 − p)^2 p .. .
fX (x) = P{X = x} = P{T · · · TH} = (1 − p)x^ p
Because the terms in this mass function form a geometric sequence, X is called a geometric random variable
Recall that a geometric sequence c, cr , cr 2 ,... , cr n^ has sum
sn = c + cr + cr 2 + · · · + cr n^ = c(1 − r n+1) 1 − r
for r 6 = 1. If |r | < 1, then limn→∞ r n^ = 0 and thus sn has a limit as n → ∞. In this case, the infinite sum is the limit
c + cr + cr 2 + · · · + cr n^ + · · · = lim n→∞ sn = c 1 − r
Thus,
x=0 fX^ (x) =^
x=0(1^ −^ p) x (^) p = p 1 −(1−p) = 1.
F (b) = P{X > b} =
x=b+
fX (x) =
x=b+
(1 − p)x^ p = (1 − p)b+1p 1 − (1 − p)
= (1 − p)b+
and FX (b) = 1 − (1 − p)b+1^ for b = 0, 1 , 2 ,.. ..
Example An urn contains balls numbers 1 through n. From these r are removed at random. Let X be the maximum value of the removed balls.
If they are removed with replacement, then the distribution function
FX (x) = P{X ≤ x} =
( (^) x n
)r .
The mass function
fX (x) = P{x − 1 < X ≤ x} = FX (x) − FX (x − 1) =
( (^) x n
)r −
x − 1 n
)r .
If they are removed without replacement, then the distribution function
FX (x) = P{X ≤ x} =
(x r
(n r
) (^) = (x)r (n)r
The mass function
fX (x) = P{x − 1 < X ≤ x} = FX (x) − FX (x − 1)
=
(x r
(n r
(x− 1 r
(n r
(x− 1 r − 1
(n r
by the Pascal triangle identity.
For X a random variable whose distribution function FX has a derivative. The function fX satisfying
FX (x) =
∫ (^) x
−∞
fX (t) dt
is called the probability density function and X is called a continuous random variable.
By the fundamental theorem of calculus, the density function is the derivative of the distribution function.
fX (x) = lim ∆x→ 0
FX (x + ∆x) − FX (x) ∆x = F (^) X′ (x).
In other words, if ∆x is small,
FX (x + ∆x) − FX (x) ≈ fX (x)∆x.
We can compute probabilities by evaluating definite integrals
P{a < X ≤ b} = FX (b) − FX (a)
=
∫ (^) b
a
fX (t) dt.
The density function has two basic proper- ties that mirror the properties of the mass function:
−∞ fX^ (x)^ dx^ = 1.
Figure: Integral of density function fX (x). Shaded region has area P{a < X ≤ b}.
Exercise. Let X be a continuous random variable with density
fX (x) =
0 if x ≤ 0 , 1 2 √x if 0^ <^ x^ ≤^1 , 0 if 1 < x.
x, 0 ≤ x < 1, = 1, 1 < x
Exercise. Generalize the notion of mixtures to continuous random variables.
The hazard function h(x) for a continuous nonnegative random variable is the rate of failure at time x. More precisely,
h(x) = lim ∆x→ 0
∆x P{X ≤ x + ∆x|X ≥ x}
If X has cumulative distribution FX and density fX , then
1 ∆x
P{X ≤ x + ∆x|X ≥ x} = P{x < X ≤ x + ∆x} ∆x P{X ≥ x}
= FX (x + ∆x) − FX (x) ∆x (1 − FX (x))
fX (x) (1 − FX (x))
as ∆x → 0. Thus,
h(x) =
fX (x) (1 − FX (x))
d dx ln(1 − FX (x)).
Experimental procedures use data based on multiple observations. Consequently, we will expand on the concepts above to the case of multiple random variables and their joint distribution. For the case of two random variables, X 1 and X 2 , this means looking at the probability of events,
P{X 1 ∈ B 1 , X 2 ∈ B 2 }.
For discrete random variables, take B 1 = {x 1 } and B 2 = {x 2 } and define the joint probability mass function
fX 1 ,X 2 (x 1 , x 2 ) = P{X 1 = x 1 , X 2 = x 2 }.
For continuous random variables, we consider B 1 = (x 1 , x 1 + ∆x 1 ] and B 2 = (x 2 , x 2 + ∆x 2 ] and ask that for some function fX 1 ,X 2 , the joint probability density function satisfies
P{x 1 < X 1 ≤ x 1 + ∆x 1 , x 2 < X 2 ≤ x 2 + ∆x 2 } ≈ fX 1 ,X 2 (x 1 , x 2 )∆x 1 ∆x 2.
For independent discrete random variables, we have that
fX 1 ,X 2 (x 1 , x 2 ) = P{X 1 = x 1 , X 2 = x 2 } = P{X 1 = x 1 }P{X 2 = x 2 } = fX 1 (x 1 )fX 2 (x 2 ).
In this case, we say that the joint probability mass function is the product of the marginal mass functions. A similar identity for independent continuous random variables.
Exercise. Roll two dice and consider equally likely outcomes. Let X 1 be the value on the first die and X 2 be the value on the second. Show that X 1 and X 2 are independent.
Exercise.
Exercise. Simulate the number of ♦’s from 5 cards drawn random from a standard deck. Compare your results with the mass function.
Exercise. Give the mass function for the random variable X , the maximum value on the roll of two independent die.
To simulate this,
x<-replicate(36000,max(sample(6,2,replace=TRUE))) table(x) x 1 2 3 4 5 6 977 3081 4949 7018 8982 10993
For the minimum,
x<-replicate(36000,min(sample(6,2,replace=TRUE))) table(x) x 1 2 3 4 5 6 11036 9097 6878 5027 2943 1019