riables a V

advertisement
Stat 330 (Spring 2015): slide set 12
FX is monotone increasing, (i.e. if x1 ≤ x2 then FX (x1) ≤ FX (x2).)
limt→−∞ FX (t) = 0 and limt→∞ FX (t) = 1.
•
•
2
Definition: Probability Density Function For a continuous variable X with
cumulative distribution function FX the density function of X is defined
as:
fX (x) := FX
(x).
However, there is slight difference from the discrete case:
0 ≤ FX (t) ≤ 1 for all t ∈ R
•
The following properties hold for the cumulative distribution function FX
for random variable X.
Properties of FX
Last update: January 28, 2015
Stat 330 (Spring 2015)
Slide set 12
Stat 330 (Spring 2015): slide set 12
P (X = a) = P (a ≤ X ≤ a) =
It follows that
a
a
f (x)dx = 0.
3
Since the density function fX is defined as the derivative of the cumulative
distribution function, we can obtain the cumulative distribution function
from the density by integrating:
t
• FX (t) = P (X ≤ t) = −∞ f (x)dx
b
• P (a ≤ X ≤ b) = a f (x)dx
Relationship between fX and FX
(i) fX (x) ≥ 0 for all x,
∞
(ii) −∞ f (x)dx = 1.
A function fX is a density function of a random variable X, if
Properties of density function f (x)
Stat 330 (Spring 2015): slide set 12
1
The only difference to the discrete case is that the cdf of a continuous
variable is not a stairstep function.
The function FX (t) := P (X ≤ t) is called the cumulative distribution
function of X.
Definition: CDF of a X is a continuous random variable:
For e.g.,we define a cumulative distribution function (cdf) as follows:
Summing over (uncountable) infinite many values corresponds to an integral.
One basic difference: summations used in the case of discrete RVs are
replaced by integrals.
All properties of discrete RVs have direct counterparts for coninuous RVs.
Continuous Random Variables
Stat 330 (Spring 2015): slide set 12
e−y
0
y>0
otherwise
f (y)dy =
0
∞
Stat 330 (Spring 2015): slide set 12
0
1
e−y dy = −e−y |10 = 1 − e−1 ≈ 0.63.
f (y)dy =
0
t
e−y dy = 1 − e−t for all t ≥ 0.
6
expected value:
E[h(X)] = x h(x) · pX (x)
E[X] = x x · pX (x)
variance:
V ar[X] = E[(X − E[X])2]
2
x (x − E[X]) pX (x)
=
discrete random variable
image Im(X) finite or countable
infinite
cumulative distribution function:
FX (t) = P (X ≤ t) = k≤t pX (k)
probability mass function:
pX (x) = P (X = x)
7
V
ar[X] = E[(X − E[X])2] =
∞
(x − E[X])2fX (x)dx
−∞
E[h(X)] = x h(x) · fX (x)
∞
E[X] = −∞ x · fX (x)dx
t
FX (t) = P (X ≤ t) = ∞ f (x)dx
probability density function:
fX (x) = FX (x)
continuous random variable
image Im(X) uncountable
Compare discrete and continuous RVs
Stat 330 (Spring 2015): slide set 12
∞
t
Stat 330 (Spring 2015): slide set 12
5
FY (t) =
What is the cumulative distribution function of Y ?
P (Y ≤ 1) =
What is the probability that the first major disk drive failure occurs within
the first year?
Continuing the disk drive example...
4
e−y dy = −e−y |∞
0 = 0 − (−1) = 1
Continuing the disk drive example...
−∞
∞
Density and Distribution functions of the random variable Y .
The second condition, f must fulfill to be a density of Y is
First, we need to check, that f (y) is actually a density function. Obviously,
f (y) is a non-negative function on whole of .
f (y) =
A possible density function for Y is
Let Y be the time until the first major failure of a new disk drive.
Example: pdf
Stat 330 (Spring 2015): slide set 12
f (x) =
1
b−a
Therefore
P (U ≥ 0.85) =
0.85
1
1
1−0
= 1.
1du = 1 − 0.85 = 0.15.
We know the density function of U : fU (u) =
To answer that, we will compute P (U ≥ 0.85).
What is the probability, that the next number is larger than 0.85?
Define U as the next random number the calculator produces.
10
The(pseudo) random number generator on my calculator is supposed to
create realizations of U (0, 1) random variables.
Uniform distribution: Example
Stat 330 (Spring 2015): slide set 12
8
if a < x < b
0
otherwise
We say that X ∼ U (a, b) i.e., the random variable X is distributed as the
Uniform distribution with parameters a and b
The pdf is:
One of the most basic continuous density is the uniform density.
Uniform Density
Some special continuous density functions
Stat 330 (Spring 2015): slide set 12
if x ≤ a
if a < x < b
if x ≥ b.
a
b
x
1 1 2b
1
dx =
x | =
b−a
b − a2 a
b2 − a 2
1
=
= (a + b).
2(b − a) 2
b
a+b 2 1
(b − a)2
(x −
.
)
dx = . . . =
V ar[X] =
2
b−a
12
a
E[X] =
9
We now compute the expected value and variance of a a uniform distribution
on (a, b).
The cumulative distribution function FX is
⎧
⎨ 0
x−a
Ua,b(x) := FX (x) =
⎩ b−a
1
Properties of the Uniform distribution
Download