Download Extra Topic: DISTRIBUTIONS OF FUNCTIONS OF RANDOM

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Granular computing wikipedia , lookup

Regression analysis wikipedia , lookup

Simplex algorithm wikipedia , lookup

Least squares wikipedia , lookup

Fisher–Yates shuffle wikipedia , lookup

Randomness wikipedia , lookup

Hardware random number generator wikipedia , lookup

Probability box wikipedia , lookup

Generalized linear model wikipedia , lookup

Transcript
Extra Topic: DISTRIBUTIONS OF
FUNCTIONS OF
RANDOM VARIABLES
A little in Montgomery and Runger text in Section 5-5.
• Previously in Section 5-4 Linear Functions
of Random Variables, we saw that we could
find the mean and variance of a linear combination of random variables.
For example, if Y = 2X1 + 4X2 + 10X3 then
E(Y ) = 2E(X1) + 4E(X2) + 10E(X3)
and if X1, X2, X3 are independent, then we know
V (Y ) = 22V (X1) + 42V (X2) + 102V (X3)
But knowing the mean and variance of the
random variable Y is not the same as knowing the full probability distribution for Y .
• Could two random variables have the same
mean and variance, but have different distributions?
1
• ANS: Yes. Consider random variables U and
Z below such that both have a mean of 0
and a variance of 1, but very different distributions.
√ √
U ∼ U nif orm(− 3, 3)
fU(u)
0
− 3
3
Z ∼ N ormal(0, 1)
2
• NOTE:
If you have a mean & variance for Y AND
you know the distribution of Y is normal,
then your distribution IS fully defined by
just µ and σ 2.
This is incredibly useful in the case of Y
being a linear combination of independent
normal random variables, then Y is a normal
r.v., as well. (See Section 5-4 ‘Reproductive
Property of the Normal Distribution’ in the
book. And see the lecture-notes example on
total weight of people on an elevator from the
previous section.)
• In this section of notes, we wish to define
a full probability distribution for a random
variable Y that is a function of a generic random variable X, or where Y = g(X).
3
• Transformations (Discrete r.v.’s)
Suppose we have a random variable X and
we know its distribution. We are interested,
though, in a random variable Y which is a
transformation of X. For example, Y = X 2.
We wish to determine the distribution of Y .
– Example 1:
Suppose X is discrete and has the pmf below...
x
0 1 2
fX (x) 0.2 0.3 0.5
Now, let Y = X 2.
4
x
0 1 2
fX (x) 0.2 0.3 0.5
Because the support set for X, {0, 1, 2}, is
strictly over the non-negative real number
line, the function Y = X 2 is a one-toone mapping from the X-space to the
Y -space over the relevant support
set.
2
0
1
Y
3
4
Y=X2
-2
-1
0
1
2
X
Because of this one-to-one relationship, we
have the pmf of Y as...
y
0 1 4
fY (y) 0.2 0.3 0.5
5
We can generalize this case when the transformation or mapping is one-to-one for discrete random variables. For a one-to-one
transformation Y = g(X) for discrete X,
the pmf of Y or fY (y) is obtained as,
fY (y) = P (Y = y)
= P (g(X) = y) = P (X = g −1(y)) =
fX (g −1(y)).
From the previous example with X ∈ {0, 1, 2}
and Y = g(X) = X 2 we can obtain the
P (Y = 4) as...
fY (4) = P (Y = 4)
= P (X 2 = 4)√
= P (X = + 4)
= P (X = 2)
= fX (2)
= 0.5
6
(support of X is
only non-negatives)
We can use a similar process for obtaining
P (Y = 0) and P (Y = 1) by again thinking
of the inverse function X = g −1(y), which is
√
X = + y in this specific case. Or we could
√
write, P (Y = y) = P (X = + y)
2
1
0
Y
3
4
Y=X2
-2
-1
0
1
X
7
2
– Example 2:
Toss a fair coin 3 times. Let X be the
random variable representing the number
of heads tossed.
Support set: X ∈ {0, 1, 2, 3}
x
0
1
2
3
fX (x) 18
3
8
3
8
1
8
A game is played where a player has an entry fee of $15 and gets $10 for every head.
Let Y represent the gain of the player.
Then, Y = 10X − 15.
Find the pmf of Y or fY (y).
This is a one-to-one mapping from X-space
to Y -space and Y ∈ {−15, −5, 5, 15}.
8
Transformation: Y = 10X − 15
Note: from Section 5-4, we can find...
E(Y ) = 10 · E(X) − 15 = 0
V (Y ) = 100 · V (X) = 75
But we don’t know the full distribution.
Applying the general rule for one-to-one
mapping for a discrete r.v., we have ...
fY (y) = P (Y = y) = P (10X − 15 = y)
= P (X = y+15
10 )
= fX ( y+15
10 ).
y
fY (y)
-15
-5
5
15
1
8
3
8
3
8
1
8
-15
-5
Y
5
15
Y=10X-15
0
1
2
3
X
9
– Example 3:
Suppose X has the pmf defined by
fX (x) = 0.10x for x ∈ {1,2,3,4}.
Now, let Y =
√
X.
This is a one-to-one mapping from the Xspace to the Y√-space
√ over the support set.
y
1
2
3 2
fY (y) 0.10 0.20 0.30 0.40
We can define the pmf for Y using a formula in this case because the pmf for X
was given as a formula:
fY (y) = fX (g −1(y)) = fX (y 2) = 0.10(y 2)
for all possible values of
Y.
Or more formally,
√ √
2
fY (y) = 0.10(y ) for y ∈ {1, 2, 3, 2}
10
– Example 4: (case of NOT one-to-one)
Suppose X has the pmf below...
x
-1 0 1 2
fX (x) 0.2 0.1 0.3 0.4
Now, let Y = X 2.
This is not a one-to-one mapping
from the X-space to the Y -space over the
support set. What are the possible values
for Y ?
y
fY (y)
0
?
1
?
4
?
Because X is discrete, we can easily find
fY (y) by looking at which x-values are
mapped to the possible y-values.
11
2
Two distinct x-values
lead to y=1.
0
1
Y
3
4
Y=X2
-2
-1
0
1
2
X
P (Y = 0) = P (X = 0) = 0.1
P (Y = ) = P (X = −1) + P (X = 1) = 0.5
P (Y = 4) = P (X = 2) = 0.4
y
0 1 4
Thus, we have...
fY (y) 0.1 0.5 0.4
12
In the discrete case when g(X) is not oneto-one, instead of developing an overall
rule, we usually obtain fY (y) in a straightforward manner looking at the mapping
itself (as in the above example).
In the next set of notes, we’ll discuss distributions of functions of continuous random
variables.
– Transformations (Continuous r.v.’s)
When dealing with continuous random variables, a couple of possible methods are...
(1) Cumulative distribution function (cdf)
technique
(2) Change of variables (Jacobian) technique
13