Survey
* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project
Continuous Random Variables
• Let X be a random variable. Suppose there exists a
nonnegative real-valued function f such that
P(X A) f(x)dx.
A
Then X is said to be a continuous random variable and f is
the density function of X. Recall that the c.d.f. of X is
F(t) P(X t).
• It follows that:
t
(a) F(t) f(x)dx.
(b)
f(x)dx 1.
(c) If f is continuous, F'(x) = f(x).
b
(d) P(a X b) a f(x)dx.
Example of the density f and c.d.f. F for a random variable X
y = f(x)
y = F(x)
This random variable X is called a uniform random
variable over (0, 1). Also, X is the value of a random point
selected from the interval (0, 1).
Continuous random variable—computing probability
• Let X be a random variable with density function fX, where
0, x 0
f X ( x) 2 x, 0 x 1
0, 1 x
• Problems. Verify that fX is a density function. Find the
probabilities: P(X = 0.5), P(0.5 < X < 0.6),
P(0 < X < 0.5 or 0.6 < X < 1).
Function of a random variable
• If we have a random variable X with a known density
function fX, how can we get the density function for h(X),
where h is a given function?
• Suppose X has the density fX where
0, x 1
f X ( x) 1 / 2, 1 x 1
0, 1 x
Can you guess the density for h(X) = |X|?
Density function of a function of a random variable
• We begin with an example showing how to get the density of
the square of a random variable using the method of
distribution functions.
• If X has a continuous distribution function with probability
density fX, then the distribution of Y = X2 is obtained by
FY (y) P{Y y}
P{X 2 y}
P{ y X y}
FX ( y ) FX ( y ).
• Differentiation yields the density of Y:
f Y ( y)
1
2
f
y
X
( y ) f X ( y ) .
The Method of Transformations
• Theorem. Let X be a continuous random variable having
density fX. Suppose that g is a strictly monotone, differentiable
function of x. Then the random variable Y defined by Y = g(X)
has density function
dg 1 ( y)
1
f X [g (y)]
, if y g(x) for some x
f Y ( y)
dy
0
, if y g(x) for all x
• Example. Let X have density 2e–2x, x >0, and let g(x) = x .
It follows from the previous theorem that Y = X has density
function
f Y ( y)
2y2
4ye , y 0
0 otherwise
Expectations and Variances for Continuous Random Variables
• If X is a continuous random variable with density f, the
expected value of X is
E(X) xf(x)dx .
The expected value is also called the mean of X and it is also
denoted as μ X .
• We note that the expected value may fail to exist if the
improper integral which defines it does not exist (as a finite
value). We will assume that all expectations exist.
• Theorem(LOUS). Let X be a continuous r. v. with density f.
Then for any h : R R,
E[h(X)] h(x)f(x)dx .
Formulas for Mean and Variance
• It follows from the definition of the mean and LOUS that
E(X ) E(X) .
• If X is a continuous r. v. with mean , then Var(X) and X,
called the variance and standard deviation of X, resp., are
Var(X) E[(X μ ) 2 ],
X E[(X μ ) 2 ].
• It can be shown that: Var(X)
( x μ ) 2 f(x)dx,
Var(X) E(X 2 ) [E(X )]2 ,
Var(aX b) a 2 Var(X),
σ aX b | a | σ X .
Example for mean and variance
• Example. Let the density function be
2x, 0 x 1
f(x)
0, otherwise
E[X]
E[X 2 ]
1
0
2x 2 dx 23 .
1
x 2 f(x)dx 2 x 3 dx 12 .
0
Var(X) E[X 2 ] (E[X]) 2 12 ( 23 ) 2 181 .