Digital Signal Processing Reference
In-Depth Information
Answer Observing Fig. 4.26 , we can easily conclude that
PfX>
0 1
=
2
:
(4.228)
From ( 2.305 ) , ( 2.115 ), and ( 4.228 ), we have:
Ð 1
r 1
2
p
xf X ðxÞ d x
x e x 2 d x:
0
EXjfg¼
¼
(4.229)
1
=
2
0
The integral on the right side is calculated using integral 4 from Appendix A for
n ¼ 1 and a ¼ 1/2, and the expression for Gamma function in Appendix C :
2
1
1 þ 1
G
x e x 2 d x ¼
2 2 ð 1 þ 1 Þ= 2 ¼ 1
;
(4.230)
0
resulting in:
r
2
p
EXjfg¼
:
(4.231)
4.9 MATLAB Exercises
Exercise M.4.1 (MATLAB file: exercise_M_4_1.m ). Generate 50,000 samples of
the normal random variable N (1, 9) and estimate its density and distribution
functions.
Solution The normal random variable is shown in Fig. 4.27a for the first 10,000
samples. The corresponding PDF and distribution are given in Fig. 4.27b ,c,
respectively. The estimated PDF is obtained using 30 cells and is shown in
Fig. 4.27d .
Exercise M.4.2 (MATLAB file: exercise_M_4_2.m ). Generate 50,000 values of
two normal random variables with equal variances s 1 ¼ s 2 ¼ 12, and different
mean values m 1 ¼ 0, m 2 ¼ 10. Find the corresponding PDFs in order to demon-
strate how the mean value affects the normal random variable and its PDF.
Solution The normal variables are shown in Fig. 4.28 . Note that the variables are
only moved along the amplitude-axis. The corresponding densities are given in
Fig. 4.29 , indicating that the shape of both PDFs is the same, but that they are
positioned differently on the x -axis.
Search WWH ::




Custom Search