This preview shows pages 1–2. Sign up to view the full content.
ECE 154B Winter 2007
Homework #1 Solutions
1. In order to do some simulations, one must be able to generate samples of random
variables with arbitrary
probability distributions.
Most programming languages
have a command that generates samples for a random variable X that is uniformly
distributed
over the interval (0,1) but we can obtain samples for an arbitrary
distribution by using a nonlinear transformation y = g(x).
a. Find g(x) if the
probability distribution for Y is given as:
p(y) = K
1
y for 0 <
y <
3 and p(y) = 0 elsewhere.
(You must first determine the constant K
1
).
∫
0
3
K
1
ydy
=
1
K
1
y
2
2
∣
0
3
=
1
K
1
=
2
9
f
y
=
{
2
9
y
,
0
≤
y
≤
3
0
,
else
}
=
{
dg
−
1
y
dy
,
0
≤
g
−
1
y
≤
1
0
,
else
}
dg
−
1
y
dy
=
2
9
y
g
−
1
y
=
y
2
9
C
g
−
1
3
=
1
C
=
1
C
=
0
x
=
g
x
2
9
g
x
=
3
x
b. Find g(x) if the
probability distribution for Y is given as:
p(y) = K
2
for 2 <
y <
3 and p(y) = 0 elsewhere.
(You must first determine the constant K
2
).
∫
−
2
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
This is the end of the preview. Sign up
to
access the rest of the document.
This note was uploaded on 11/11/2009 for the course ECE 670377 taught by Professor Wolf during the Winter '07 term at UCSD.
 Winter '07
 WOlf

Click to edit the document details