Docsity

Lecture 24: Functions of Random Variables and Expectation, Study notes of Probability and Statistics

Toggle sidebar
bg1
Lecture 24
1. Functions of a random variable, continued
Example 24.1. It is best to try to work on these problems on a case-by-
case basis. Here is an example where you need to do that. Consider Xto
be a uniform (0 ,1) random variable, and define Y= sin(πX/2). Because
X∈(0 ,1), it follows that Y∈(0 ,1) as well. Therefore, FY(a) = 0 if a < 0,
and FY(1) = 1 if a > 1. If 0 ≤a≤1, then
FY(a) = P !sin "πX
2#≤a$= P !X≤2
πarcsin a$=2
πarcsin a.
You need to carefully plot the arcsin curve to deduce this. Therefore,
fY(a) =
2
π√1−a2if 0 < a < 1,
0 otherwise.
Finally, a transformation of a continuous random variable into a discrete
one . . . .
Example 24.2. Suppose Xis uniform (0 ,1) and define Y=%2X&to be
the largest integer ≤2X. Find fY.
First of all, we note that Yis discrete. Its possible values are 0 (this is
when 0 < X < 1/2) and 1 (this is when 1/2< X < 1). Therefore,
fY(0) = P !0< X < 1
2$=(1/2
0
dy =1
2= 1 −fY(1) = 1
2.
This is thrown in just so we remember that it is entirely possible to start
out with a continuous random variable, and then transform it into a discrete
one.
83
pf3

Partial preview of the text

Download Lecture 24: Functions of Random Variables and Expectation and more Study notes Probability and Statistics in PDF only on Docsity!

Lecture 24

1. Functions of a random variable, continued

Example 24.1. It is best to try to work on these problems on a case-by-

case basis. Here is an example where you need to do that. Consider X to

be a uniform (0 , 1) random variable, and define Y = sin(πX/2). Because

X ∈ (0 , 1), it follows that Y ∈ (0 , 1) as well. Therefore, FY (a) = 0 if a < 0,

and FY (1) = 1 if a > 1. If 0 ≤ a ≤ 1, then

FY (a) = P

sin

πX

2

≤ a

= P

X ≤

π

arcsin a

π

arcsin a.

You need to carefully plot the arcsin curve to deduce this. Therefore,

fY (a) =

π

1 − a^2

if 0 < a < 1 ,

0 otherwise.

Finally, a transformation of a continuous random variable into a discrete

one....

Example 24.2. Suppose X is uniform (0 , 1) and define Y = % 2 X& to be

the largest integer ≤ 2 X. Find fY.

First of all, we note that Y is discrete. Its possible values are 0 (this is

when 0 < X < 1 /2) and 1 (this is when 1 / 2 < X < 1). Therefore,

fY (0) = P

0 < X <

0

dy =

= 1 − fY (1) =

This is thrown in just so we remember that it is entirely possible to start

out with a continuous random variable, and then transform it into a discrete

one.

2. Expectation

If X is a continuous random variable with density f , then its expectation is

defined to be

E(X) =

−∞

xf (x) dx,

provided that either X ≥ 0, or

−∞ |x|f^ (x)^ dx <^ ∞.

Example 24.3 (Uniform). Suppose X is uniform (a , b). Then,

E(X) =

∫ (^) b

a

x

b − a

dx =

b 2 − a^2

b − a

It is easy to check that b 2 − a^2 = (b − a)(b + a), whence

E(X) =

b + a

2

N.B.: The formula of the first example on page 303 of your text is wrong.

Example 24.4 (Gamma). If X is Gamma(α , λ), then for all positive values

of x we have f (x) = λ α^ /Γ(α)xα−^1 e−λx^ , and f (x) = 0 for x < 0. Therefore,

E(X) =

λ α

Γ(α)

0

x

α e

−λx dx

λΓ(α)

0

z

α e

−z dz (z = λx)

Γ(α + 1)

λΓ(α)

α

λ

In the special case that α = 1, this is the expectation of an exponential

random variable with parameter λ.

Example 24.5 (Normal). Suppose X = N (μ , σ 2 ). That is,

f (x) =

σ

2 π

exp

(x − μ)^2

2