0% found this document useful (0 votes)
50 views14 pages

ELEN90054 Probability and Random Models: X S K K

1) The document provides solutions to probability and random variable problems from tutorials. It calculates expectations, variances, probabilities and probability density functions. 2) Several questions are analyzed, including the expected number of time slots before an event occurs and computing means, variances, and probability distributions from given probability mass/density functions. 3) Graphs of cumulative distribution functions are used to find probabilities of random variables being within certain ranges or having certain values. Expectations are calculated by integrating probability density functions multiplied by the variable.

Uploaded by

Angelo Wang
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
50 views14 pages

ELEN90054 Probability and Random Models: X S K K

1) The document provides solutions to probability and random variable problems from tutorials. It calculates expectations, variances, probabilities and probability density functions. 2) Several questions are analyzed, including the expected number of time slots before an event occurs and computing means, variances, and probability distributions from given probability mass/density functions. 3) Graphs of cumulative distribution functions are used to find probabilities of random variables being within certain ranges or having certain values. Expectations are calculated by integrating probability density functions multiplied by the variable.

Uploaded by

Angelo Wang
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 14

ELEN90054 Probability and Random Models

Solutions for the Plenary Tutorial of week 5

1. see the Solution of Question 2 of the Tutorial Workshop of week 4;


X 1
E[X] = xk · P [X = xk ] = (−2)(1/4) + (0)(1/8) + (1)(1/2) + (4)(1/8) =
xk ∈Sx
2
X
E[X 2 ] = x2k · P [X = xk ] = (−2)2 (1/4) + (0)2 (1/8) + (1)2 (1/2) + (4)2 (1/8) = 3.5
xk ∈Sx

Var(X) = E[X 2 ] − (E[X])2 = 3.5 − 0.25 = 3.25

2. see the Solution of Question 5 of the Tutorial Workshop of week 4;

In this question time-slots are brought into play, at each time-slot the 5 computers each
connect to one of the three servers. We read the question as “what is the number of
time-slots before at least one of the 5 computers connects to S1 ?”
From the Tutorial Workshop of week 4 Question 5a) we know that the probability that
none of the 5 computers connects to S1 equals (0.8)5 . Now define Y as the random
variable that counts the number of time-slots until (and including) at least one of the 5
computers connects to S1 . Then Y ∼ Geometric(1 − (0.8)5 ). As a result
1
E[Y ] = ≈ 1.49
1 − (0.8)5

The question asks for the expected # of time-slots BEFORE at least one of the 5 com-
puters connects to S1 . This equals E[Y − 1] = E[Y ] − 1 ≈ 0.49.

3. We first note that P [X = i] = 61 for i = 1, 2, 3, 4, 5, 6. From this, we can compute the


mean as
X 1 1 1 1 1 1 21 7
E[X] = x P [X = x] = 1· + 2· + 3· + 4· + 5· + 6· = = =
x∈S
6 6 6 6 6 6 6 2
X

Now let’s find E[X 2 ] and then solve for the variance.
X 1 1 1 1 1 1 91
E[X 2 ] = x2 P [X = x] = 12 · + 22 · + 32 · + 42 · + 52 · + 62 · = =
x∈SX
6 6 6 6 6 6 6
 2
2 91 2 7 182 − 147 35
Var(X) = E[X ] − (E[X]) = − = =
6 2 12 12

1
4.
X 1 1
E[W ] = P [W = wi ] · wi = · (−1) + · 1 = 0.
wi ∈SW
2 2
X 2
E[X] = P [X = xi ] · xi = (0.1) · (−2) + (0.9) · = 0.
xi ∈SX
9
X 1 1
E[Y ] = P [Y = yi ] · yi = · 0 + · 2 = 1.
yi ∈SY
2 2
X 7 7 27 7 + 243 25
E[Z] = P [Z = zi ] · zi = (0.1) · + (0.9) · 3 = + = = .
zi ∈SZ
9 90 10 90 9

Now let’s solve for the variance by solving for the following first:
X 1 1
E[W 2 ] = · (−1)2 + · 12 = 1
P [W = wi ] · wi2 =
wi ∈SW
2 2
 2
2
X
2 2 2 4 4 4
E[X ] = P [X = xi ] · xi = (0.1) · (−2) + (0.9) · = + = .
xi ∈SX
9 10 90 9
X 1 1
E[Y 2 ] = P [Y = yi ] · yi2 = · 02 + · 22 = 2.
yi ∈SY
2 2
 2
2
X
2 7 49 81 49 + 812 6610
E[Z ] = P [Z = zi ] · zi = (0.1) · + (0.9) · 32 = + = =
z ∈S
9 810 10 810 810
i Z

Now for the variances by using Var(X) = E[X 2 ] − (E[X])2 .

Var(W ) = E[W 2 ] − (E[W ])2 = 1 − 02 = 1


4 4
Var(X) = E[X 2 ] − (E[X])2 = − 02 =
9 9
Var(Y ) = E[Y 2 ] − (E[Y ])2 = 2 − 12 = 1
 2
2 2 6610 25 661 − 625 36 4
Var(Z) = E[Z ] − (E[Z]) = − = = =
810 9 81 81 9

Notice that W and X are zero mean, while Y and Z are not. Also notice, that while
their means are different, W and Y have the same variance. In addition, X and Z have
the same variance.
25
With closer examination, we can easily see that Y = W + 1 and Z = X + 9
. Thus,

E[Y ] = E[W ] + E[1] = E[W ] + 1


 
25 25
E[Z] = E[X] + E = E[X] +
9 9

Adding a constant changes the mean but not the variance and therefore Var(W ) =
Var(Y ) and Var(X) = Var(Z) .

2
5. The first thing you should do is plot the CDF so you can use the plot to help visualize
and obtain the answers.

a. There is a jump at FX (2) =⇒ P [X = 2] = FX (2+ ) − FX (2− ) = 3


4
− 1
2
= 1
4
b. P [less than 2 hours] = P [X < 2] = FX (2− ) = 1
2
.
1
c. P [more than 2 hours] = P [X > 2] = 1 − P [X ≤ 2] = 1 − FX (2+ ) = 4
d. P [exactly 3 hours] = P [X = 3] = FX (3+ ) = FX (3− ) = 0 (no jump at 3).
e. P [more than 1 hour, but less than three hours] = P [1 < X < 3] =
FX (3− ) − FX (1+ ) = 78 − 12 = 83
f. We first plot the cdf FX (x) as a function of x. Every jump accounts for a delta-

function in its PDF which is the derivative of the cdf FX (x). We now plot the
pdf fX (x) as a function of x: Note that the generalized derivative of the unit step

function is the Dirac delta function with weight 1.


g.
Z ∞
E[X] = xfX (x)dx
−∞
Z 0+ Z 1− Z 1+
1 1 1
= x δ(x)dx + x · dx + x δ(x − 1)dx
0− 8 0+ 8 1− 4
Z 2+ Z 4
1 1
+ x δ(x − 2)dx + x · dx
2− 4 2+ 8
1 4
1 x2 1 1 1 x2
= 0 + · +1· + 2· + ·
8 2 0 4 4 8 2 2
1 1 1 1
= · 12 + + + · (8 − 2)
8 4 2 8
25
=
16

3
6. (a) The given pdf has 3 separate regions (below 0, 0 to 2, and above 2), so the CDF
will have 3 regions as well. The 3 cases for FX (x) = P [X ≤ x] are:
Case 1: x < 0 =⇒ FX (x) = 0

Case 2: 0 ≤ x < 2
x x
x
u2 x2
Z Z
u
FX (x) = fX (u)du = du = =
−∞ 0 2 4 0 4

Case 3: x > 2 =⇒ FX (x) = 1

Thus, we can write FX (x) as



 0 x<0
x2
FX (x) = 4
0≤x<2
1 x≥2

You should be able to easily plot this yourself.

0.16
(b) P [X > 0.4] = 1 − P [X ≤ 0.4] = 1 − FX (0.4) = 1 − 4
= 0.96
(1)2
(c) P [− 12 < X ≤ 1] = FX (1) − FX (− 12 ) = 4
−0= 1
4
(d) P [X > 1 | X < 21 ] = 0. This is just from using common sense. If X < 12 , then
it cannot be greater than 1. Another way to do this is to expand the conditional
probability formula and the intersection of (X > 1) and (X < 12 ) is the empty
set, whose probability is 0.
(e) Let’s first find the mean. Then we’ll use the alternative calculation for the vari-
ance, so we need to find E[X 2 ].
∞ 2
2
x3
Z Z
x 8 4
E[X] = xfX (x)dx = x · dx = = =
−∞ 0 2 6 0 6
3

2 2
x4
Z Z
2 2 x 162
E[X ] = x fX (x)dx = x · dx = = =2
−∞ 0 2 8 0 8
 2
2 2 4 16 2
Var(X) = E[X ] − (E[X]) = 2 − =2− =
3 9 9
7. a. The given pdf has 4 separate regions, so the cdf will have the same. The 4 cases are:

Case 1: x < −1 =⇒ FX (x) = 0

Case 2: −1 ≤ x < 0 =⇒ fX (x) = |x| = −x


Z x x
−u2 −x2 1
FX (x) = −udu = = +
−1 2 −1 2 2

4
Case 3: 0 ≤ x < 1 =⇒ fX (x) = |x| = x
Z x Z 0 Z x
FX (x) = fX (u)du = fX (u)du + fX (u)du
−∞ −∞ 0
Z x x
1 u2 1 x2
= FX (0) + udu = + = +
0 2 2 0 2 2

Case 4: x > 1 =⇒ FX (x) = 1

We can now write:



 0, x < −1
 −x2
 1
2
+ 2
, −1 ≤ x < 0
FX (x) = 1 x2

 2
+ 2
, 0≤x<1
x≥1

1,

b. P [X > −0.3] = 1 − P [X ≤ −0.3] = 1 − FX (−0.3) = .545


c. P [−0.5 < X ≤ 0.3] = FX (0.3) − FX (−0.5) = 0.17
d.

P [(X − 0.5)(X + 0.5) < 0] = P [X 2 − 0.25 < 0] = P [X 2 < 0.25]


= P [−0.5 < X < 0.5] = FX (0.5) − FX (−0.5) = 0.25

e. P [|X| ≤ 0.5] = P [0.5 ≤ X ≤ 0.5] = 0.25 (same as part (d))


f. E[X] = 0 because of symmetry fX (−x) = fX (x) for all x ∈ R, in other words
fX (·) is an even function.

8. Let X ∼ U (a, b). Then


∞ b
b
x2 b 2 − a2
 
(b − a)(b + a)
Z Z
1 1 b+a
E[X] = xfX (x)dx = x dx = = = =
−∞ a b−a b−a
2 a 2(b − a) 2(b − a) 2
Z ∞ Z b  3 b
b 3 − a3

2 2 2 1 1 x 1 2 2

E[X ] = x fX (x)dx = x dx = = = b + ab + a
−∞ a b−a b − a 3 a 3(b − a) 3
2 2 b2 + ab + a2 (b + a)2 4b2 + 4ab + 4a2 3(b + a)2 (b − a)2
Var(X) = E[X ]−(E[X]) = − = − =
3 22 12 12 12
As a − b gets larger, the variance gets larger.

Next, let Y ∼ Exp(λ). Then E[Y ] = 1/λ (the last step uses integration by parts, find
out for yourself):
Z ∞ Z ∞
1
E[Y ] = yfY (y)dy = yλe−λy dy = .
−∞ 0 λ

In order to get the variance of Y , let us first compute E[Y 2 ], using, again, integration
by parts:
Z ∞ Z ∞ Z ∞
−λy 2 −λy ∞ 2 2
2
E[Y ] = 2
y fY (y)dy = 2
y λe dy = −y e |0 +2 ye−λy dy = 0+ E[Y ] = 2 .
−∞ 0 0 λ λ

5
Then
2 1 1
Var(Y ) = E[Y 2 ] − (E[Y ])2 = 2
− 2 = 2.
λ λ λ
As λ gets larger, both the expectation and the variance gets smaller.

9. Let X ∼ U (3, 5) and Y ∼ U (2, 6). Clearly their means are the same (µ = 4) but the
variance of Y is 4 times as large as the variance of X. If you plot the two PDFs, you
can see that Y is more “spread out” as it is uniform over a larger range. This is what
gives it a larger variance. Remember that we can interpret the variance as the empirical
average of the squared distance from the mean in a large experiment.

10. X ∼ U [−1, 3] and Y = X 2 . The CDF of X is linear and easily written down as


 0 , x < −1

1+x
FX (x) = 4
, −1 ≤ x < 3


1, x≥3

(a)
∞ 3
3
x2
Z Z
1 9 1
E[X] = xfX (x)dx = x dx = = − =1
−1 4 8 −1 8 8

−∞
Z ∞ Z 3 3
2 2 21 x3 27 −1 28
E[X ] = x fX (x)dx = x dx = = − =
−∞ −1 4 12 −1 12 8 12
28 16 4
Var(X) = E[X 2 ] − (E[X])2 = − (1)2 = =
12 12 3
(b)
28 7
E[Y ] = E[X 2 ] = =
12 3
Z ∞ 3
3
x5 243 −1
Z
2 4 4 41 244
E[Y ] = E[X ] = x fX (x)dx = x dx = = − =
−∞ −1 4 20 −1
20 20 20
 2
244 7
Var(Y ) = E[Y 2 ] − (E[Y ])2 = − ≈ 6.75555
20 3
(c) For an arbitrary y we have

FY (y) = P [Y ≤ y] = P [X 2 ≤ y].

Clearly for y < 0 it follows that FY (y) = 0 and for y ≥ 9 it follows that FY (y) = 1.
For 0 ≤ y ≤ 9 we have

FY (y) = P [Y ≤ y] = P [X 2 ≤ y]
√ √
= P [− y ≤ X ≤ y]
√ √
= FX ( y) − FX (− y)

1+ y √
= − FX (− y).
4

6

To get the value of FX (− y), we need to distinguish two cases:
Case 1: 0 ≤ y < 1 : √
√ 1− y
FX (− y) =
4
Case 2: 1 ≤ y < 9 :

FX (− y) = 0.
Finally, we can now put it all together and write:


 0, y<0



 y
 2 , 0≤y<1


FY (y) = √
1+ y


 4
, 1≤y<9




1, x≥9

Taking the derivative, we get the pdf as


0, y ≤ 0




1

 4√y , 0 < y < 1



fY (y) = 1


 √
8 y
, 1≤y<9




x≥9

0,

11. It is clear that Y can only have non-zero probability density in [0, 2].

We’re looking to find FY (y). P [Y ≤ y] = 0 for y < 0, and P [Y ≤ y] = 1 for y > 2.


The remaining case to solve is for 0 ≤ y ≤ 2. First, we will write FX (x) as we will
need this for the final answer. Since X is uniform in [0, 4], we can write:

 1  0, x < 0
, 0≤x≤4 x
fX (x) = 4 FX (x) = , 0≤x≤4
0, else  4
1, x > 4
Rx 1
(check: For 0 ≤ x ≤ 4 , FX (x) = 4
du = x4 ).
0
For 0 ≤ y ≤ 2
P [Y ≤ y] = P [|X − 2| ≤ y]

= P [−y ≤ X − 2 ≤ y]

= P [−y + 2 ≤ X ≤ y + 2]

= FX (y + 2) − FX (2 − y)
y+2 2−y
= −
4 4
y
=
2

7
Thus 
0, y < 0


y
FY (y) = 2
, 0≤y≤2


1, y > 2

Its pdf is then (differentiate the above):



 0, y < 0

1
fY (y) = 2
, 0≤y≤2


0, y > 2

12. Clearly, the random variable Z can only have non-zero probability density in [0, 3].

We’re looking to find FZ (z). Clearly P [Z ≤ z] = 0 for z < 0, and P [Z ≤ z] = 1 for


z > 3. The remaining task is for 0 ≤ z ≤ 3. This is slightly more complicated than in
the previous question, in more detail:

FZ (z) = P [Z ≤ z] = P [|X − 1| ≤ z]

= P [−z ≤ X − 1 ≤ z]

= P [1 − z ≤ X ≤ z + 1]

= FX (z + 1) − FX (1 − z)
z+1
= − FX (1 − z)
4
To get the value of FX (1 − z), we need to distinguish two cases:
Case 1: 0 ≤ z ≤ 1 :
1−z
FX (1 − z) =
4
Case 2: 1 < z ≤ 3 :
FX (1 − z) = 0.
Finally, we can now put it all together and write:


 0, z < 0

 z, 0≤z≤1

2
FZ (z) = z+1


 4
, 1<z≤3


1, z > 3

13. (a) The first thing you should notice is that for x < −2, FX (x) = 0, and for x > 2,
FX (x) = 1. Further,
Z x
for −2 < x < 0: FX (x) = = (1/2 + u/4) du
−2
x
u2 x x2 1
= u/2 + = + +
8 −2 2 8 2

8
Z x Z x
For 0 < x < 2: FX (x) = fX (x)dx = FX (0) + 1/2 − u/4 du
−∞ 0
1 x x2
= + −
2 2 8

(b)

P [X > 0.4] = 1 − P [X ≤ 0.4]


= 1 − FX (0.4)
0.42 1
 
= 1 − 0.4/2 − + = 0.32
8 2

(c)
1 1 1 1
P [− < X ≤ ] = P [X ≤ ] − P [X ≤ − ]
2 4  4  2
1 1
= FX − FX −
4 2
12
1 (− 12 )2 1
 
1 4 1
= − + − − + +
8 8 2 4 8 2
43
= ≈ 0.336
128

(d)
     
1 1 1
P |X| > = P X> +P X <−
3 3 3
   
1 1
= 1 − FX + FX −
3 3
   
1 1 1 1 1 1
= 1− − + + − + +
6 9·8 2 6 9·8 2
= 0.69

More simply, use the even symmetry of the pdf to write


   
1 1
P |X| > = 2P X > = 2(1 − FX (1/3)).
3 3

(e) The pdf is an even function (meaning that fX (x) = fX (−x)), so the mean equals
zero.

14. (a) The rv X is continuous, since its cdf is continuous.




 0, x < −4
 1
 , −4 ≤ x < −2
dFX (x)  4
fX (x) = = 0, −2 ≤ x < 2
dx 1
, 2≤x<4


 4


0, x ≥ 4

9
(b)
Z ∞
E[X] = x · fX (x)dx
−∞
Z −2 Z 4
1 1
= x · dx + x · dx
−4 4 2 4
−2 4
x2 x2

= +
2 · 4 −4 2 · 4 2
(−2)2 (−4)2 (4)2 (2)2
   
= − + −
8 8 8 8
= 0

This can also be obtained by noticing that the pdf in part a is an even function: fX (x) =
fX (−x).
(c)

Var(X) = E[X 2 ] − (E[X])2


Z ∞
= x2 fX (x)dx
−∞
Z −2 Z 4
21 1
= x dx + x2 dx
−4 4 2 4
3 −2 3 4

x x
= +
3 · 4 −4
3 · 4 2
(−2)3 (−4)3
 3
(2)3
  
(4)
= − + −
12 12 12 12
 3 3

4 2
= 2· −
12 12
28
=
3
We could also have exploited symmetry to write
Z 4
Var(X) = 2 x2 /4dx
2

obtaining the same answer more quickly.


(d)
3 1 1
P [−3 ≤ X ≤ 3] = FX (3) − FX (−3) = − =
4 4 2

Again, we could have used symmetry to write

P [|X| ≤ 3] = 1−P [|X| > 3] = 1−2P [X > 3] = 1−2(1−P [X ≤ 3]) = 2FX (3)−1

to obtain the same value.

10
15. (a)
   
1 1
P X≤ = FX
5 5
 2
1 1
= +
8 5
= 0.165

(b)

P [(X > 3) ∩ (X ≥ 1)]


P [X > 3|X ≥ 1] =
P [X ≥ 1]
P [X > 3]
=
P [X ≥ 1]
1 − FX (3)
=
1 − FX (1− )
1
=
5

(c) This is at a point of continuity on the CDF (no jumps), so it must be 0 probability.
Here is just a check to be sure.
     −
1 1 1
P X= = FX − FX
2 2 2
"  2 #
3 1 1
= − +
8 8 2
= 0

(d)

P [X = 1] = FX (1) − FX (1− )
1 1 3
= + −
2 8 8
1
=
4

(e)

P [0 < X ≤ 3] = FX (3) − FX (0)


   
1 3 1 2
= + − +0
2 8 8
3
=
4

(f)

11
Notice there is a jump at x = 0 for FX (x), therefore X cannot be a continuous random
variable. The same is true at x = 1.
Also, the cdf is not piecewise constant, ie it increases continuously in the intervals
[0, 1/2) and [1, 4). So X cannot be a discrete random variable either. It is therefore a
mixed random variable.

 1

 8
δ(x), x=0

1
2x, 0<x<


2


dFX (x) 
1
fX (x) = = 4
δ(x − 1), x=1
dx 
1




 8
, 1<x<4

0,

else

(g)
Z ∞
E(X) = x · fX (x)dx
−∞
Z 0+ 1
Z Z 1+ Z 4
2 1
= 0 · fX (x) dx + x · 2x dx + 1 · fX (x) dx + x · dx
0− 0 1− 1 8
1 4
2x3 2 1 x2
= 0 + + +
3 0 4 16 1
 3
2 1 1 42 12
= · + +( − )
3 2 4 16 16
1 1 1 61
= + +1− =
12 4 16 48

16. (a)
Z 0 Z 2
1 2 1
E[Z] = E[g(X)] = −x · dx + x2 ·
−2 4 0 4
= 0.

This can also be obtained by noticing that fX (x) is an even function but g(x) is an odd
function, so that the product function fx (x)g(x) is an odd function. Integrating this
from x = −2 to x = 2 gives zero.

Since, Z is zero mean, we can then write Var(Z) = E[Z 2 ]. As Z 2 = X 4 ,


Z 2 Z 2
2 4 4 1 1
Var(Z) = E[Z ] = E[X ] = x · dx = 2 x4 · dx = 2(25 /5)/4 = 16/5
−2 4 0 4

(b) Z takes on values between [−4, 4] only. Therefore, FZ (z) = 0 for z < −4, and
FZ (z) = 1 for z ≥ 4. We must now find the CDF for −4 ≤ z < 4. This needs to

12
be split up into two cases because the function has a change at 0. The two cases are
−4 ≤ z < 0, and 0 ≤ z < 4.
Case 1: −4 ≤ z ≤ 0

FZ (z) = P [g(X) ≤ z] = P [−X 2 ≤ z, X ≤ 0] + P [X 2 ≤ z, X > 0] = P [−X 2 ≤ z, X ≤ 0]


√ √ √
= P [X 2 ≥ −z, X ≤ 0] = P [X ≤ − −z] = (− −z − (−2))/4 = 1/2 − −z/4.

Case 2: 0 ≤ z < 4

FZ (z) = P [g(X) ≤ z] = P [X 2 ≤ z, X ≥ 0] + P [−X 2 ≤ z, X < 0]



= P [X 2 ≤ z, X ≥ 0] + P [X < 0] = P [0 ≤ X ≤ z] + FX (0)

√ √ 2+ z
= FX ( z) − FX (0) + FX (0) = FX ( z) = .
4

We can now take the derivative with respect to z to get the PDF:


 0 z < −4


 √1

−4 ≤ z < 0
8 −z
fZ (z) = 1


 √
8 z
0<z<4


0 z≥4

Note that for z approaching 0 the value of fZ (z) approaches ∞. This does not matter,
all that matters is that fZ (·) is an integrable function. Do for yourself: plot the CDF
and the PDF as a function of z.

17. (a) Y takes the values 0, ±1, ±2, . . . so it is discrete.


Let byc denote the floor function (= closest integer ≤ y). The cdf is given by

P [Y ≤ y] = P [Y ≤ byc] = P [X ≤ byc + 0.5 ]

When y < 0, we then have


Z byc+0.5
FY (y) = ex/2 /4dx = e(byc+0.5)/2 /2
−∞

When y ≥ 0, we have
Z 0 Z byc+0.5
FY (y) = x/2
e /4dx + e−x/2 /4dx = 1 − e−(byc+0.5)/2 /2
−∞ 0

13
Its pmf is
pY (y) = P [Y = y] = P [y − 0.5 ≤ X < y + 0.5]
Case 1: y = 0. We have
Z 0.5 Z 0.5
−|x|/2
pY (0) = e /4dx = 2 e−x/2 /4dx = 1 − e−1/4
−0.5 0

Case 2: y = 1, 2, 3, . . ..
Z y+0.5
pY (y) = e−x/2 /4dx = e−y/2 (e1/4 − e−1/4 )/2
y−0.5

Case 3: y = −1, −2, −3, . . .,

pY (y) = pY (−y) = ey/2 (e1/4 − e−1/4 )/2

by symmetry.

(b)
P [Z ≤ z] = P [X − round(X) ≤ z]
Notice that Z ∈ [−1/2, 1/2). Let’s consider the event {Z ≤ z}, where −1/2 ≤ z <
1/2. This is equivalent to:

[
{Z ≤ z} = (X ∈ (i − 0.5, i + z])
i=−∞

For every integer i, there will be some region where Z ≤ z. Each region is disjoint, so
we have a union of disjoint events.
" ∞ #
[
P [Z ≤ z] = P i − 0.5 < X ≤ i + z
i=−∞


X
= P [i − 0.5 < X ≤ i + z]
i=−∞

−1 Z
X i+z ∞ Z
X i+z Z z
−x/2
= ex/2
/4dx + e /4dx + e−|x|/2 /4dx
i=−∞ i−0.5 i=1 i−0.5 −0.5

(ez/2 − e−1/4 )/2


 
sinh(z/2) + sinh(1/4) if z ≤ 0
= + −1/4 −z/2
e1/2 − 1 (1 − e )/2 + (1 − e )/2 if z ≥ 0

where sinh(z/2) = (ez/2 − e−z/2 )/2.


Check that FZ (−1/2) = 0 and FZ (1/2) = 1.
We can now take the derivative to get the PDF

e−|z|/2
 z/2 
cosh(z/2) e /4 if z ≤ 0 cosh(z/2)
fZ (z) = + = +
2(e1/2 − 1) e−z/2 )/4 if z ≥ 0 2(e1/2 − 1) 4

14

You might also like