You are on page 1of 204

STUDENT SOLUTIONS MANUAL

Probability, Statistics,
and Random Processes
for Electrical Engineering
Third Edition

Alberto Leon-Garcia

Prentice Hall
New York Boc;ron Stlll Franusco
London Toronto Syd ney Tokyo Singapore t..tadnd
Mexico City Mun1ch Paris Cape Town I long Kong t..lonncal C.
Vice Prc,idcnt nnd Edilorinl OirC<"Ior. EC lnrcia J. I Ionon
A't<lodole Eclilnr: Alice 1)\\o rkin
Edilurial "~'i.,lunl: \\ rlliam Opaluch
Oirt-ctor nfTcom-OsN d Project l\luno~ement: Vince O'Brien
enior 1\lonngin~ Erlifor: Scull l>isannu
Art Oirectur: "cnn\ Beck
Co,er Oc, igncr: Kri\linc Carne)
Art Erli1or: Cm:g Dulle~
MnnuJ'nciUring Mnnngcr: Alan nschcr
MunuJ'ucturin~ On)Cr: I "" McOo\\cll
Cnver imn~e: I oughcre\\- mcg<thlhir mound Counl) Meath. l rdancJ.
Photu l<lf..cn h) A. l.con-Garcra. Nmcnrhcr 2006.

Copyrighl @) 20119 hy Pcn~cm Educnliun, lnc., Upper Saddle Rher, Ne" Jer<~C) 1174514.
All ngh1s reserved. Print ell in 1h1.. Uniccd Slelh!S nf Amerrca. Thi\ puhlicatinn j, prcllcct~.od h) \tlp) rig.hl and permis it'n
shoulcJ he obtarned from the puhh~hcr plior I\\ any prohihitecl reproduction, ~lw np.c i nn rctrrc\UI ,yqcm. or 1ransmission
in any form or hy any mcnn~. clcctrnnic.mcchunical. phulocupying, recording. or likcwisc. I'm inln11na1ion regarding
permission(~) . 'Mile lo: Righls ami Permissions Oeparlmcnl.

Pearl!on b.Jucation Lid .. London


l'caNm I tlucalion Singnpon:. l'tc. I ld.
Pca"'on r Jucntion C'annua. Inc.
Peur~on f duc:uiun Japan
Pearson h.lucatron 1\u,IJalia l'l'Y, I rmited
Pl;ar!.on EJucatmn Null h Asiil. ltcl .. llllng Kong
Pcan.on Cducacu'ln de ~ IC'<rco. , ,/\.do.: C.V.
PcaNm f'uuc:rtion Mala)'ia. Pic. I IJ.
Pcar:.on [Juc;rtrun, Ur,xr Suddlc Rl\ cr. New Jo.:rl!ey

Prentice Hall
is an imprint of

----
llltJX76543l

PEARSON I ~B~-~~ ll7X-II-13-oOXIIX-II


www.pearsonhlghered.com ISBN 10; 0-13-nllSIIX-5
Contents

Chapter I Probabi lity Models in !:: , Jcctri ca l and Computer I ngincering. I


Chapter 2 Basic Concepts of Probabi lity Theory. J
Chapter 3 Di"crele Rand om Variables. 20
Chapter 4 One Random Variable. 30
Chapter 5 Pairs or Random Variables. 54
( 'haptcr 6 Vector Random Variables. 74
Chapter 7 Sum-, of Random Variables and I ong- I crm t\' crage\. 89
Chapter 8 Stati\tics. I 02
Chapter 9 Random Processes. 11 7
Chapter I 0 Anal) sis and Processing of Random Signal-,. 150
Chapter II MarJ..ov Chains. I 63
Chapter 12 Introd uction to Queueing Theory. 177

Ill
Chapter 1: Probability Models in Electrical and
Computer Engineering

@ a) Each c:-.pcriment results in an outcome from a linite ~ample space:


S1 {II. I J S2 (I. 2. 3. 4, 5. 6l .<i1- {0. I. 2. 3. 4. 5. 6. 7. 8. 9)

b) The outcomes are equa lly likely with the conditio11s spccilicd bclo\\:
PII - PI 1/2 if both sides arc eq ually likely (fa ir coin)
P1 - {JJ. f'l P = p; =P6 = 1/6 if the dice is fair
pn = PI - /}'1 PI= P4 = p; =Po= P7 Ps "" = 1/ 10 if the balls nrc identical

@ a) S PIII.IIT.TII.lT} SLRN= (O.I.2.3l


There art: four equiprobable outcomes in the coin tossing experiment We can
generate the same rclati"e frequencies by drm" ing ball" from an urn that holds four
identical ball" '"ith the four labels from S or,., ith corresponding numbers. Alternatively
we can make t\\O dra\\s from an urn containing l\\O labeled balls.

b) 1\ pair of die tosses results in 36 cquiprobable outcomes. Dra"s from an urn


'' ith 36 identical labeled balls will produce the same relati\e frequencies. I he labels are
chosen from the table bciO\\. Altcmativel}. we could m.tkc l\YO dnmo.;. \\ith replacement.
from an urn containing 6 labeled balls.

Toss I

I 2 3 4 5 6
(I. I) (I, 2) (I. 3) (I. 4) ( I . 5) (I. 6)
2 (2. I) (2. 2) (2. 3) (2. 4) (2. 5) (2. 6)
C"t
Vl 1 (3. I) (3. 2) (3. 3) (3. 4) (3. 5) (3. 6)
Vl
0
I- 4 (4. I) (4. 2) (4. 3) CL ~) (4. 5) (4. 6)
5 (5. I) (5, 2) (5, J) (5. ~) (5. 5) (5. 6)
6 (6, I) (6. 2) (6. 3) (6.4} (6. 5) (6. 6)

c) Draw t\\O canh v.ith replacement. S..:kct balls from urn as in part b). but ~i(h
52 52 label pairo.;. Alt~rnntively, we could make 1\Hl dra\\S from an urn \vith 52 balls.
Without replacement: elect balls from an urn as in part b). but "ith 52 x 51
label pairs. Allcmativcl). make two draws. '"ithout replacement. from an um "ith 52
lnbcled balls.

1
2 Student Solutions Manual

@ a) In the first draw the ou tcome can be black (h) or '"hite (tl'). If the first draw is
black. then the second outcome can be h or 1r. However if the first dra" is while, then
the run on ly contains black balls so the second outcome must be b. 1 hereforc .)' = {hh.
bw, ll'b}.

b) In this case all outcomes can be b or II'. Therefore S = {bb. h11, wh. ll'll'}.
c) In part a) the outcome lt 'll' cannot occur so.f;,, = 0. In part b) let N be a large
number of repetitions or the experiment. The number of times the first outcome is II' is
approximately N/3 since the urn has one white ball and two black balls. Of these N/3
outcomes approximate ly 1/3 are also white in the second draw. Thus N/9 ifthe outcome
result is It'll', and thus .r;,,..= I /9.

d) In the first experiment, the outcome of the first draw afrects the probability of
the outcomes in the second draw. In the second experiment, the outcome of the lirst draw
does not aiTect the probability of the outcomes of the second draw.

@ When the experiment is performed either A occurs or it doesn 1 (i.e., B occurs);


thus N.1(n) + Nu(n) = n inn repetitions of the experiment, and

. ( ) + j 'H( 11 ) _- N,1(n) N 11 (n) _I


+ - .
f
. , I 11
n n

Thus.fit(n) = I - fAn).

@ If A, B. or C occurs. then D occurs. Furthermore since A. JJ. or C cannot occur


s~multaneously , inn repetitions of the experiment we have

Nn(n) = N.,(n) + N11(n) + Nc(n)


and dividing both sides by n

Ji)(n) = .fA(n) +.fJJ(n) +.fc (n).


Chapter 2: Basic Concepts of Probability Theory

2.1 Specifying Random Experiments

@ a) The sample space consists of the 1\\chc hour~:


s = (I. 2.3.4.5.6. 7,8. 9.1 0.11,12)
h) A - {1,2,3.4l 11 = {2,3,4,5,6.7,8} D = {I,J,5,7.9, 11}

c) . I n /J n f) = [2.3,4} n {1.3.5. 7. 9.11) = {J}


A n B = [5.6. 7.8. 9.1 0.11. 12l n :2.14.5.6. 7.8} -:c- {5.6. 7.8l
A v ( 8 n f) ) = { 1.2.3.4] v (f2.3.4.5.6. 7.Rl n {2,4.6,8.1 0. 12))
= {1.2.3,4} v {2.4.6.8) = [1.2.3.4.6.8l
(A v /J) n /)' - {1.2.3,4,5.6. 7.8} n {2.4.6.8.1 0.12] = {2.4.6.8}

@ l ite ouiCOill'' of this experiment conc;i!'tc; nf a pai1 of nnmht-r.. (:r.y) whf>re -.r =
nu:nb r of d ots 111 fhst oc:s and y = nmuh"I of dot~ in 'ccond to-.. Therefore, S = ~et
of 0 1 de red pair" ( x : !J) wher....r. yc {1. 2, 3. 4 . .5, G} which arc lbte-<l in t h t> tnhlfl' hPlow:
I/
a) .r 3 -l (j
1 ( 1' 1 ) ( 1.2) ( 1.31 ( l A) ( 1.5} ( 1.6)
2 (2, 1) ( 2. ~) (2.3) (2,-1 ) (2.0) ( 2.0)
3 (:1. 11 (3.2) ( 3,3 ) ( 3..!) (3.0) (3 .6)
1 ( l ,ll (-!.21 (-! ,3' ( 4.4 ) (4.5) ( -!.G l
;; (5.11 (5.2) (5,3) (5.4 ) ( 5.;)) (5.6)
6 (6,1) (G.2J (6.31 ra.o (G.J) (G.G)
Cbcrkmmk~ indicalt" Plcmenh of en-u t ::~ hclow.

h) y r. )
,
X 1 2 3 4 G ;r 2 3 4 .) (j
1 .J
" 1
2 .J .J 2
3 .J .J .J 3
,J .J .J .J .J I
:;
5
6
.J
.J
.J
.J
.J
.J
-J
-!
={
" .J .J (j -J \I .J .J .J ..J
A :- t \ < No? }... N 1 ~ N1 } B =[ V - ClJ

3
4 Student Solutions Manual

d) B is P rulJ,r-t of .4. so wh~n B occurs llwn A also occurs. tlm!:i B implies A

e) A r1 JJ' = {N, '5. N 1


< 6J
:r 1 2 3 -! i.) 6
1
2
3
4
"" ..j

"" " " y


..j ..j
..j ..j
5
6 " ""
f) C = nnmbt'r of dots diJft>t h\ 2'
1 2 3 4 .j t3

2l "

3
4 "
5
6
~--------------~

Comparing the tahles for land(' we see that .I n C - :{3.1).(4.2).(5.3).(6.4)}.

@ a} Each testing ol' a pen has lwo poss ible outcome~: " pen good"(.~) or pen bad"
(b). TI1e experiment con-.ists nf te ~ ling pens until u good pen is found. I hcrcforc each
outcome o fthe experiment consists of a string of"b' s endcd b) a"}{. \\e assume that
cnch pen is not put bac~ in the drawer aner being tested. 1 hus S {g. b?,. bhg. hhhx.
hhhhg }.

b) We 110\\ simply record the numberofpens tested. so,\'= 11.2,3.4.5].

c) J'he outcome now consists of a substring of "b 's" and one x in any order
fullowed hy a fina l g". S = {gg. hgg. xbg. ghbg. hhgg. gbhbg. hghhg. hhghg. hhhgg.
ghhhg. hghbbg. hhgbhg bhhgbg. bbbhggJ.

d) S= [2. 3. 4, 5, 6}
Ch 2. Basic Concepts of Probability Theory 5

@ If \\C sketch the e"ents A and B "e see that B = AvC. We also see that the
intcnals corresponding to ~ I and C have no points in common !>O . I ( -0.

\\ c also sc-: that (r. \I= (r. n)n(-oo. \I= (- 7" .r I n(-o". \1 that is C =A" n B.

@
.:.!_implies IJ ~implic' (
since

@ and then
.4isa
sunset
ore

@ I
1hen~ @J8 since 11 i~ a
~ul1-.c1 nf. I

A implies 0 8" implies .I

@u)
'~

Wake at 11
Sleep at '~ > 11
': > '

2-1 '
flnm nc)(m miJn igtu 6 am

Nt)tc that the problem specifies that the student ''a"c~ up hd~lrc returning to <;leep in the
specified time pcrind. fhis condition co nstrains the sample space to the upper portion of
the square region in the graph above.
6 Student Solutions Manual

b) ..1\sh:cp ut noon" = \\ale up after noon or '"''"-cup and go tn . . lccp before


noon
= {t1 > 6l v ft, < 6} '"here \\C lnhd time from 0 to 2-L

c) student skcps through brcaldasC = {t1 > 3l v (I, .. ll

u) A n n is lound by ta"-ing the intersection of the region'> in parts b) ami c). We


obtain the three triangu lar region ~ sho\Hl bdo''- \\ hich are in!l:rp1 ~t~d lxlm\ .

lz

'-lutknt \\ai-1.~ up :atlcnllll>n


or
:.tudcnt \\ >1..~..... up alkr 9 :un :u1tl
~"-...,bad.. In -.I\X-1' tl\:hr~ m>on
1>r
-.w~.t.:nt ".d.~.-s up nnd ~"'" lY.~CI.
In ... h.:cp hdim.: 7 <1111

IJ 6

2.2 The Axioms of Probability

@ a) rhe s.1111plc space in tossing a die isS : 1. 2. l4.' 6l. I d p fl: ill= J> since
all faces arc equ.tll) li"-cl). B) A \iom I

lh~ dl.:mcntar) c\ cnts (il are mutua II) cxcluc:;i, c so b) Coroll<lr) L


I = p 1 I p:! + ... t p,, = 6 p => [1 = p =t
1
fut i -= I. .... 6
Ch. 2. Basic Concepts of Probability Theory 7

b) We c.\ press each e\ ent as the union o r clcrm:ntar) events and then appl)
Ax iom Ill ':
Pf I) P[> 3 dots] = ?[(4,5.6}] =P[ Hl ] + fi{ Sl] t- /'f {6l] = ~

1'1 B1- Pf odd #I =Pf {I. 3. 5J 1= P[ fI} l + Pf {J} I+ J>f {Sll =~

c) We first lind the clements in each event of interest and then appl) A>.. iom Ill':
PI . I v B I = P[ {I. 3. 4, 5. 6} I = P[ ( I } I +PI P J I+ 1'1 I4l l + I 'I {5l J + PI {6} ] = t
P[A r'l fll - P[ {5}1 =t

PI A' I = 1- /'lA I = i where we used Corollary I.

@ ldentitiP.S of thic type: arc ~hown by applicntiun of th1~ nxiom.;, \\'c begin hy treating
( .\ U D) ;1s R sin~!~ cwmt, then

P{A U B U Cj
= P[(A U B} U CJ
= P[A U B)+ P{CJ- P [(A u B) n C) by C'm. 5
= P{AJ.l.. P(B]- P [.-t n BJ- PIC! hy Cor. Son .1 U B
-P!( tnC)u(B nC)J noel by distlibuti' pwpe..rty
= P(Aj.J. P[B] .t.. P (CJ- P[A n Bj
- P[A n CJ- P[D .., CJ by C'or. 5 on
I P[(.t n D! n (B n G')] \A n C) U ( FJ n C)
= P[llJ + fl(B' P[C']- P[.-1. 'I B)- P[ 1n G'J
-P[DnC] I P [AnBnCJ.

@ J:aeh transmission is equivalent to tossing a fa ir coin. If the outcome is heads.


then the tran ... mbsion is successful. Ifit is tails, then another tran~ mi ...~ ion is required. As
in 1- xamplc 2. I I the probabil ity thatj transmissions arc r~quircd i":

= L~ (-I )
1

Pl . ll = f>li C\ cnl = " ( I )!.t


L -2 - L -4I ) - 1-I --
( I - I =-.
I
t I !~I 4 4 II 3 1
I

c.
Pf/JJ - Pf i multipleof 3l = L:
A;l
-
2
(I)'* =1-I-i - 1= 7I.
8 Student Solutions Manual

PIC I- t (*) =~ t.(*)'- I1-~tt


l I - - I - 2 I ~
=-61
64
1
1'[(' I= I - PI ( I = -
64

PI ,I ~ B) -
1 1
I (_!2_)"
1
=- - - I - - smcc a multiple ol 2 nnJ 3 is u multiple ol 6.
) -~ 63

I 1 20 .
1'! ,1- Bj 1'[ 11 - f[A ~ Bl = - ---- SII1CC
3 63 63
, l "" ( l fJ} u (A n B)] anc.J ( . 1 - /J) ~ ( . J n /J) .

PIA n B~ C! (_!_)"
2
1
= - since A n
64
= IJ nC= (6J.

@ As5umc that the probahilit) of an)' subinh:nal /of 1- 1. 21 t'i propor1innal to its
length.
Pill k length(/).

lf\\c let/ = (- 1. 21 then \\C must ha\tlhat


I = P(\] - Ir- 1.2]] = .{ kngth([-1.2]1 Jk-.:>k=t

a) Pl11 =1 1ength ([ - 1.0))- dl) =t


P(/1] t length ((0.1)) =} 1=t
PjC'] =t length +.2ll =t-T= 1~
,, I(\ /J I = P1 0 ] - 0
PI I n c I = P1 0 1= 0

h) PJi u /JJ = fll(-I.O) u (O.l)] = fl[I - I.O)J t/'I(O.Ill=t


PI 1u c J = Pil- Lo) u <+. 211 =rn -1. o>1+ PI(}. 2 11 = 1 + 1; = +
PI l u Bu CJ = P[f- 1.0) u (0.2Jl - P[S :OJJ = Pj .\ I I

l\o\\ use a' ioms and coro llarics:


/'jl u fl] = I'[ .IJtPJ/J]-P[A " B) =t1t- O=i h) Cor.5
PI I u (' I= P[ .l] +PIC 1- fl[.d..O 1- t I 1z ="'} b\ Cor. 5
Ch. 2. Basic Concepts of Probability Theory 9

l'f . I v B v C J = PI A I+ Pf Bl + PIC I
- P[ ,1n B] - f( .I r1 ('] - P[ B r1 C'I
0) l--q. (2.7)
+ PfA r1 B n C)
= t+t+ ,i -0 - 0-;1+ 0 = I

2.3 *Computing Probabilities Using Counting Methods

@ 'I he numol.!r of distinct ordered triplets 60 x 60 x 60 60 1

@ Th~: numocr of sequences of length 8 = 2 11


"" 1'i6.
f[arhitrar) sequence = correct sequence I = f.;;-.

P( ..,ucccss in two tries] = I - P[failure in l:xlth tries J


.
I - .ill. .lli
LX '~~
" -

@ I he order in \\hich the 4 toppi ngs arc sckciCd docc; not matter so ''e have
sampling\\ itlmut ordering.

If toppings may not be repeated, Eq. (2.25) gives


11
( ) - 1365 pnssible de luxe piuas .
4

II' toppings may be repeated, we hnvc sampling '' ith rcplnccmcnt nnd without
ordering. I he number or such arrangements is
4 4
(' : ) - 3060 possible deluxe piuns

@ I here arc 3' permutations of "hich onl) l)nc cone..,ponds to the corr~ct order:
assuming cquiprohable permutations:

1'1 correct order] =.!. =1.


" I>
10 Student Solutions Manual

1 1
@ The nnmh"' uf "'"Y' of dooo<ing ,\I nut of IOU is ( ,~~ ) . Thi' i; th" tutal nnmhc.
of r>tpuprobflblP outr.011H'S in rhe sample spt1o.
\\'car(' inte-res11 din th~ outrmues in which m nf the clal)~en iHm~ are rle(edi,e and
.\1 - m arc IHmdt'fE'c:the.
The numlJer of ways of <hoo~ing m dr fcctiwR out of /; i:;; ( 1~ ) .

The rmwber of wep of dwo"mg JH -111 nouc!decti,es out of 100 k is ( ~,~0 k)


m
The uumber of way-. of t:hoo,iug m ckfect.inc: om of k
nwl JJ - m nc.m-defectiYe::: 0111 of 100- 1.: is

( ~~ ) ( ~~n--,~ )
f.!. rntcomt''i with k tl~>fP't i\e
'Tutal # of nutcomr~
k ) ( 100 - 1~ ')
( 111 .\1-m
= 100 )
( M

(
I 00 - k) f.. ( I 00 k)
M \/ - 1
b) f[lol accepted I = P[ 111 = 0 or m = II = + -..!...,..----..:_
c~)n c ~n

@ J\s-;uming the lorwan.ls and dcfensemen do not ha\e assigned posit ions, (that is.
lcfi/center/ right for forwards and left/ right for dcfenscmen). then

The number of fomard comhinations (iJ))


(

The number of defense combination::,


( "'2)

The nu mher of goa Iie combinat ions ( ~)

The numl~r of teams ( ~) (;) U) =140.


Ch. 2. Basic Concepts of Probability Theory 11

If the fon' anJc; and dcfcnsemen ha\ e ac;signed po. . itions then the nurn~r of teams
increases because there arc ~cvera l ways to ac;.ign ria) crs to positionc.,:

~(:)X)! x( ~)X 2!x(n ~ 288{)

2.4 Conditional Probability

@A={N1 ~N 1 }
Prom Prob lem 2.2 we have that A ::J B. therefore

P[A I B] = fl_l r"ll = PI B] =I


PI BJ P[ B)
and

@a) PI~ 1-= f.


P(hgJ = JjhJll~ I h]=ixf = ~
P[hbv J = .lt. X.! X 1.I =.!..
~ ~ ~

P[hhhgj = .lxl
I S
xl.xl.
I 3
= 152
P[hhhbol
~
1
b
xl-xl.x.!..x
~ I .I
I =_!_
I~

b) Pfl pen tested I= Pi g]


1'121 = P[hg] b

1'(1J - I'fbb~]
I
P141 - P[ hhhg]
,.
.1. J'

1'[51 = P(bhhhgl

@ a ) P[A] = Plhand rests in last 10 minutes !


P[A] = p\, +p\, ++p(l()=!?, - t
P[ BJ= P\fJ + PH + P~ + Ps9 + p,~, =~ = ,i
P[BIA) = Pj.rl fi !J) = .1 =-"-
1'1 ,1] f. 2
12 Student Solutions Manual

c) PI t
tl =t (( + + (t f I + ... + (t t )
PI B I - t ((1 ) ~~ + + (t )~Q )

@ a ) I he rc5ulls lolhm dircctl) from the de tinition uf' condttiono l probahilit):


/'[ ,I I B]=fl_lnB J
PI HI
I r . I n /J 0 then 1'1 An IJ I = 0 by Corollat) 3 and thus 1'1 A I Bl =0 .
If ,I c II then An B - .I and I'I 1111 I = I ,I A I .
PJBI
I f A => IJ -=> A n B = B and /'l ,fl JJJ = P( RJ - I.
P[BI
1
h)JI' P[AIIJJ = / [. Ir1 B]>P[, I]thcn multipl)ing hoth "iidcs h)/'[//[ \\e ha"c
PIR]
P( . l n fll 111]f>[B].

'A c then also ha ve that rr B I A) = PI I r1 lJ J


>
PI IJPIHJ - PI B]
Pf A I PI II
We conclude that if P[ A I B) > fl[ Al then IJ and A tend to m:cur joint I) .

@ a ) 'A c u.;,e conditional probabilit) to 'io he thi-, problem. I ct I , l nondclccliH~


fhund in tth le">t}. 1\ lot is accepted i r the items in tests I nod 2 an: nondclccti\ c. that is.
iI' 11 n I occur<.;. Then: fbre

f[ Jot acccph:d 1- Pl A, n . 11l


-= PI , '~ I A, Irr .1, I
'I hi ., eq uation .,imply sl.th.:s that "'c must h:l\c A1 occur. and then,,, occur given that A1
a t read~ nccurrcd. If the lot or I 00 items contains k dcfccti\ c Items then

I
n[ . 1I ] -- 1110 A ,
""jj'ii'i'"" <llll1
Ch. 2. Basic Concepts of Probability Theory 13

PI 1.! I t l 1 I= '700( since 99- k of the 99 item" ar~ nondcfecli\ c.

Thus
flint <accepted] ='"'100' x oo-l
100

h) PII or more items in m tested are delecti\c I>99~ (,


~ ?[no items in mare defccti\cl < l 0 o
P[ .l,,,t,._,... A,] = .: X ~ X" X.~";,:', =0.<)1
B) trial and error we find that form= 6 we have
PIA,, A~. I 1 A 1 112 A 1 l = ,: x.. x~~ =0.0133.

@a) ,\ r
n l2
+I
l hannd; 0
- I
.2 -2
I t

h) Pl .X =+2.> = +2J = P[l'=2 IX = 2Jf>IX = 21


-- .ll.
~~ -I
- l.

/)I X =2. > =ll = tt = t


PIX =2.1' =01 =tt=t
PIX =-2.Y =Ol =tt=t
P[X - - 2, }' =IJ =tt=t
PI X = - 2, >' = - 2] = tt = t

c) fll>" --t 2J =tt=f= P[Y= - 2]


/,[) =+ ll =tt= t=Pl>= - 1)
P( )' = 0] =2{ tt)= t = P[J' = 0]

d > PI r = 21 r = k 1= P[ Y = k I x = 2l Pl x - 21
P[J' = k]

Iljl
8-1
- k=2
J. f 1-1 =I
~ k=I
=
V+ =t k =O
0 other k
14 Student Solutions Manual

2.5 Independence of Events

@ For l\\(.) C\cnts \\ e check \\ hcthcr Cq. (2.11) holds lhr the l' cnts A amJ lJ'
PI A 0 :I
8 1- 1'1 J] = += P[ A ]P[ BJ=t 1 ..J
P( I n ( J-= PIPJJ -+= P(.l)PIC1 =1.1
P(/J n CI-1'1{1}1 =-1 =P[/JJI'[C'J -=t~ .,f

1 hcrcl(m: the pairs or cvenb are independent. for three event.., \\C need to check for
pc1im isc indcpcndt:nce as \\CII o" for:
1'1 . 1n B n C I = P( fill=+ - f[ A]P[ BIPI C I :::1 tt = -k. No!

1his rc~ ult implic" that the tripkt ofc\(.!nts is not indcpcm.Jcnt.

@ Tht 1'\'ent A jg the uuiou of the mutually exdusiw C\'etltS A '1 Band A n a~. thus

PIA] = P[A n B 1 P[. 1 n nj by L owUa:y 1


=!> J>[.1 n uc; = P [. ~ J- P[A "" Bj
= P,A.J- PfA]P.B] sinrl"' A hid U 'l'e indrl'~ndcat
= Pl-\j(l- P(BJ)
= P[AJPlBj ==;. A <1111 l1 me ilj(lcpctHknt
Similarly
P B = P[A n Bl- P(A n BJ = P(A]Pf..tj + P{.lr '1 BJ

:::::;. P(A" n Bj = P{B; 1 - P{.-lj) = P B P( 4'1


:::- .lt nnd B arP llldt>pcudl'!rtt.

Finoll~

P[A PIB I
=> Ac fii d B' 11t l ' i tlt:pl'lldiul
Ch. 2. Basic Concepts of Probability Theory 15

@ We U\C a tree diagram to show the sequence of C\>Cnts. I ir... t ,.,e choose an urn. so
A or . I occur-\. We then select a ball. so 8 or fl occurs:

B D [)

Nnw . I nnd B arc indcrendent events ir


1'1 LJ I A I 1'1 BJ
But
Pl/1 1.11 PIIJJ =P[B I A]P[A]+PIB I 1']Pl, /' I
~ PI /J I 11< I - P[ A j) = Pf B I ' IPI 4 I
~ PI IJ I A I =P[ B I A' ) prob. of 8 ic; the same gi\.Cil I m A'. that ic;.
the prohahilit) of /J is the same for 0{1lh urnc;.

~ r, cnts A and B arc independent iff


1'1 A r. /JI = P( .l]P[ B]
In terms o l relative frequencies we expect

/, ./1 (17)
~
= J,( n)fH(n)
~
r~l li cq. ''' rei. l'rcq.'s of .I and 11
Jllllll nccurn:ncc in isol:u ion
u f I lllll.l II
16 Student Solutions Manual

2.6 Sequential Experiments

@d) Pf0orlcrror, l =(l-p)u 01


+100(1 p) 1 p p = IO ~
=0.3660+ 0.3697
= 0. 7357
h) p,.- Plrdrano;;mis..;ion required] = 1-1'10 or I crror:, l 0.2o.t2
P[M rcl ran~missions i n tota l] =( l - p 1<)p;/ M - 0. 1.2 ....

PI ,\1 or more rctra nsmis'iions required] - L (I 1'11 )pj. = 1'1~ L( 1-


1
Pu)P/1
1 If 1 I

= p~'

~al I'! A crrors i=U) JI'{I - pl"'


h) T) pc I errors occur'' ith probabil it) !Jfl. nnd uo 1WI occur'' ilh pmhnhi lit) 1-po.

1'1 k, typo I errors I =( ~,) (f>a l'' (I - pa )"""

cl 1'1 k 1) 1>: 2 crrol'o I = (;,)< Jl( I - u ))' (I - p( I "ll" '

d) I hrl!c outcoml!s: I) re I error. type 2 ermr. no c1ror

@ fl!k tossc' required until heads comes up three timL'<iJ PlhLatls in kth los~ I 2
heads in A I tosc;cs J 1'12 hl!ado; ink - I tosseo;] P[.l l BJ l'[fl].

N U\\ d. .
Jlf I I fl] = 1'[2 hca s m fl~t k - J to,scsl (*-I2 JI' , (I - t') k l
.

k lj \
Thus fl[AIRJPI H] = /'I AIB]p= (
2
J'' <l - J'r 1
1. 4....
Ch. 2. Basic Concepts of Probability Theory 17

@a) PuCI)=f
h) +i p 1(n)
f1,. (11 +I)=~ /}0 (11)

p 1(n +I)~ t p ., (n) +i p 1(n)

In matrix notation. '"e have

IJI, (II + I ).p, (II+ I >I= IJ1, (11).p, ( 11){! ;,]


or
fJ(n + I ) - f'(n) P

c) p(O)
-
=(.!...!.]
2 2
E< I) - E(O)I>
1
E(2)- E( l)l' = E(O)PP = (0)P

In general.
E<n) = E<O>P".

To lind P" \\1! note that if P has eigem aJues J. 1 ).~ and cig~o:n\lcctor~ ~ 1 ~ then

P= r{~ 1] E' "here E has and > as culumns

and
P" -( E/\E ' )(E/\E ') ... (E/\E ') n times
= EA{E 1E)/\ ... (E 1E)/\E- 1
1~/\''E I

Nu\\ I' =[! 1] has eigenvalues l, = I and A2 y, and cigcmcctur< fo - [ :1and


>=[ -~l
l hus
18 Student Solutions Manual

amJ
pUt )= p<O)P"

[ ][1. .
I I l+l"~
I ( I ) '' I 3:! -:l1 ( -1 ) " I]

= 2'2 t-t(t)" t+H I)"


=[.!.+_1 (~ yl.2 _ I ( ~ )"' ]
1

J J .. ) 3 3 -

c) p(n) [ ~ J ns 11 oo

2.7 *Synthesizing Randomness: Random Number Generators

@ lhe l"ollm.. ing Octave code produces a 21) scath.!rgram in tht.: unit ~quart.::
X rand(lOOO,l)
Y ran<.J(lOOO,l)
plot(X,Y,"+")

~), = aU"+ fJ shouiJ map onto [a. h).


a) \\hen l 111 0 \\C want }~, - /1 a h }
- I \\e want r = (J. . fl ~a h jJ - b - u
II

rr h a fl= a
=> ) II = ( h - (I)(/, + {/

h) I he l(liiO\\ ing Octm e code computes th~ ..... mplc mean and \aria nee of 1000
C\amples of the random variabk~ in the abm c experiment:

a = -s
b .. 15
Y = (b-a ) rand(lOOO,l ) +a ones(lOOO,l);
mean (Y) \ <\m1putc' ....unplc mean
cov ( 'i, Y) \ Com pull., ,,uuph: 'uriance

In a le"tt \\e obtained:


I'll' ar (Y)- 5.2C70 \ S. ~- 5

1~
1 1
cov('i,Y) = 34.065 \S . = ) ). '1 1
Ch. 2. Basic Concepts of Probability Theory 19

2.8 *Fine Points: Event Classes

@ I n I lumcr"s sample space j{r) = R. _/{g) G. and /{1) (, . llomers e\'ents are
quite simple: 0. I R}. fG). {R.G} = SH. We shm\ the idcnlilic-. by 1!\aluating the rcle,ant
C\ cnts in each idcnt it):

n) .f
1
( { R}v {G}) = / - 1( { R. G: )= :r. g. tl
anti somt:
f 'U RIJ uF' ((G}) = {r} u lg.l) =lr. g. I} )

./ (1 R) n ~R. G}) =/- 1({R}) = [r}


1
b) )
and S<l lllC
1 1
.f ( : R}) n / UR. G}) = {r l n {r. g. t} = { r l /

c)
and same

2.9 *Fine Points: Probabilities of Sequences of Events

@a) UA, - U [u+f,. h-+,]= (a,h)


Jl II

@a) n [a
,
f,. h+ ~~l= [a.h]

~a) lim = PfA, J= Pllim


,, r. " , ..
AJ =P[a < x <h)

~a) lim = 1'1 .1,, ]= P[limA, ]=


n to#: '' r..
P[a ~x~hl
Chapter 3: Discrete Random Variables

3.1 The Notion of a Random Variable

@ a) I he underl}'ing ramJnm e~pcrimcnt invohco; the outt.:ontc~ ur a ttl'\S of a fair


die. thus \' -:- p,2.3. 4.5.6l p 1 = P! = p, = p 1 = P<- p,.-:. ''here p , = fll Lill
b) r he mapping from s to s, is: c) I he mnppmg implies:
s s,
I 0 ,,, r oI ''I . J.
~ f>

2===--=-==* 1 1'1 \ - II- p . 1- Pl =i


3
4~2 PI X 21 '' I P~ = i:
5
6 3

u) I he nc\\ mapping maps a pair of outcomes ofS to each va lue in S1. o;o
PI ) = -., J = J>~ 1- I' ( = 1."
c) X - 0 corrcsponuo., to II}: } 0 correspond" to ( I. 21 .

@ a) S = fOOOO,OOOI. ... III 11

b) ,\' 00 10 1111
~ ~
2 15

c) Pu- 11a- fJ, ... p ,< -=t;

d) PIOhh
I l hI J = l.xl
~ 8 = ..L
11

I
p,, = j J, = ... = 1'7 =l i
, , I

1}II1 - ,,. -
11
-
-
f>'I~-
-...!.
l.?

20
Ch. 3. Discrete Random Variables 21

GV Dra" l\\O bills" ithout replacement:

2nd bill
I, 1:! I 'I 50
""'
I,
11
~

")
1

~
2
2

..0 51
....
VI
2 2

J,l 2 2 X

50 51 X

Outcomes along I he diagona I cannot occur because sn mrl ing j., \\ ithout rcrlaccment. A II
other outcomes ha ve probability -kt = ~~ .

/,I \' - 21- = ,~ = f since 72 outcomes gi'c .\ 2


~
P( r - 511 == ~ = -rli =+ since 18 outwme<. gi' c r 5 1

3.2 Discrete Random Variables And Probability Mass Function

@ tl) Since the rrobabilitics must add to llllC. \\e hm c:


Pr f fJ,+ p ~+ p4 = p,(l+!+t++) =ft p,

3 4

I~

1'1 X >81 - L
I X
"' = I~> = +
IS
1'1> '> 8J L, p; = 8x J~ = ~~ =7
'~

I rom Problem 3.7b:

a) I,, \' > 21 - I - 1'1.\' = 2 J = t


P[.\' >50 J= I'[ X =5 I]= t
22 Student Solutions Manual

3.3 Expected Value and Moments of Discrete Random Variable

I d \' 1+ 2 + .. + k
\ k + (k - 1)+ .. + 1

=> s = ~I - k<k i I)
A L_. ")
' I -

I!\' I -
'' .L "" .=
1\

lt L_. f
I I
If> ~
..L 1 = .!i2 = 7-
c;
I~ A

hi \ 2 l = ~ 'L>l "" i2 = Wt i )(Ut l )


L_. lo
' I
- ..L l ~tll~ 111 - ~
\' )
- '" It - 1

V f\ RI \" J =~-
1 ( ~)1-
1 - JHI ~ n~- "'
- ~

I I

I [u+lf - i ]= L: <3i 1
+3i + I>=Ji i + J ...!....!.!l +~
I

) mcc the -,um is te le!;coping: L [ (I + I)' - P] = (k 1 I )\ - I


I I

therefore L>=t[<k + l ))- I -J "~..- ' -k ]='' ~.Hflt.


I
1 1 1

Wilhoul n.!plm.:cment:
xf +51xt = ': = 11 .80
1~'1 .\' 1-: 2
Fl X , I = 4 X 1+ 5 12 X * = ~ 21 17

VA RI \' I -: :c~, - ( ~Q )
1
= 9~~ =384. 16

@ a) /; l g< \ )j = Cl.f (X)] A = IX > 101


< I<

- ""[) 4 (i)fl[X = i] = I fiX = il J-eering the \alucs fllr , .. hich 11= I


. I I

~
~ ] -!'
I +=o. 11 n
p1 [I += L
II ~
I
,_,
Ch. 3. Discrete Random Variables 23

3.4 Conditional Probability Mass Function

k=I
k =2

b) /'j.\' - li [N = IJ = P[X = k,N"'= I] = Pj .\ -li.N,.,-11


"' P[N"' = I] 1/2
'iO

(){)( ~ )+(~ )( ,!-5}- v


){ -;,
1'[.\' - k I N, = II = (sec wble helov.)
(~ )( ){)- 1/
){ -;1 k 2

Carlos
0 I 1
..,
I~~,
-;; 0
.s:::
2
I I I
~
~ 2 0 25
0.25 0.5 0 25

@ a ) PIX - ij lsl draw = k] k = 1,50


% j=2
JJI X - iII sl draw = IJ={ 9 since 8 (lf'rcmuining bills arc "I"
u J = 51 .

I j = 51
/'I \' = j I I st drow =50] = { . since all remaining bills arc 1"
0 OtherWISC

b) /I \" j btdra\\ = 1] =2xt +51 xt


/[.\' j ist draw =50]=51

c) Fl \'j = 1XII]x 1~ +[ ..\' j50] x 1 ~


= ~ x ;~ + i~ = 1~ . which agrees v.ith the 'inlution lor Problem 3.25.
1

Fl \' l l=(4 X.! +1L)~+ 51: = ll + ') (J.L) = ~2'1


' 9 10
Q 10 IU - Ill lit

V1\RI X I= it+ 2( ~~) -( 11~8 t =38~. 16. '"hich also ugrccs \\ ith Problem 3.25.
24 Student Solutions Manual

3.5 Important Discrete Random Variables

@a) .)'= [1. 2,3,4, 5} . l = f(> 31


P[l , = 0] =-f J'[JA= 11 =t
E[J I J = 0 X 1-t I X 1.5 =1.
J ~ ~

b) S= [O, Il A = {0 .3<~< 0 . 7}
P[f I = 0] = J>f'::; O.J[+ P[O. 7 <'::; I] = 0.6
f>[ I 1 = I] = f>[ 0.3 < t; $ 0.71 = 0.4
[7 ,] = Ox 0.6 + Ix 0.4 = 0.4

@a) A,= fll, < 0.25J intersections


A,'-" = IL', > 0.25}

b) i'[ N = 41 = ( ~ } 0.}5 )'(0. 75)' = 0.0865 since the order <lues not matter

c) rl, = {U, < 0.25} F[ .l1A2 ,tl 8,B,C,.C7 C8 ] - (0.25)' (0.5) (0.25)'
8, = {0.25 < l I < 0.751 = (0.25)"(0.5)' = 6.10 x l0 5

r, = {U, > o.75J

d) rhe three events lhrm a rartition or the sample space. so the number (lr
occurrences of the three events has a multinomial di stribution :

I) We can usc the multinomial probabilities as f\.lllows:

P[ N, = 4, N 1 = O. N, - 4] = B! (0.25) 1(0.5)"(0.25) 1 = 0.00107


- 4! 0! 4!
Ch. 3. Discrete Random Variables 25

( ~ ) p'=qn-A u!
11. J.!(u - ~)!p (r-k+l)p
- ( n ) ,.'<-lqn-kl = u! q = l:q
k- 1 . (1.:- 1)!
tn + l )p -1(1- q) =
1
.;.. (n + l)p - 1. =..:....(,_1-_k_-_,;_
l):.. . .p
kq kq kq

l> ) Fitl:lt ..;uppo..:e (n + l)p j,. not ;m integer. l h t'O rm 0::; k $ [(n + l)pJ < (n + l)p
( n ;- 1 )J'- ~ >0

p;. (n + 1 )p - k
- =1 + >1
Pk- 1 J~q
~ }?J.. increas{'l) CIS k increases Irom 0 to I( 11 + l )pj for /.: > (11 + 1 )p ~ [( n + 1 )pj
(n +Up-/.:< 0

111; (n+1)p-k
--=1+ < 1
Jli;-1 hf
~ Plr decren,c_c: ns k inrrcac:f"'S bcyo::Hl [(n -J l)t>)
:. l'k nttnins h~ maximum at /.:"M.H = [ru 1 lp] +
If (rl + l}p = k.\IAX then r1bon impliffl that.

@,, ().()1 N= # oferror-fiee characters until the first error.

n) 1'1 N- k 1- (1 - p)AfJ k = 0,1 ,2....

. s

h> /I VI - _Lk(l - p)~ p= (l - p)p_Lk cl - p >'


! -1. ' {)
I 1-p
=( 1- p)p '=-- hy Eq. (3. 14).
{1 - (1 - p)) p

,_
c) 0.99 = /'f\ > k,, ] = I<t - p)( p = p(l - p)A ' _L(l - td
I I I I

= (I - p ) l flfll ~ P - 1- 0.99 1 I= 1.004 x 10 ~


26 Student Solutions Manual

@Note: The probkm statement shoulu read: r ind the number or employees
requircu ~o that more than 4 orders are \\ailing i-. less than I0" o

PIX > 4] < 0. 1 ~ f[X ~ 4] > 0.9

since a ...L=.i
"I' II

I r II 2 then f[.\ ; 41 - 0.891. lhcrefon: I\\ 0 cmplo) ccs art! almost sullicicnl to
allain 0.9.

fll .\ "" 0 J = e " 1 - e ' ~ = 0. 082 I

@ lh c Octme to plot the pml:

a .. 0.1; \ "~c i t ~ mean of' Poi-.-.un RV


j (0:20]; \ ( Jl:IICr.ttc .unt) nl '<I hit:'
stem( poisson_pdf(j,a)) <11.:m:r.ttc and plul pml ' ,1 1u~."S

@ I= 10 ]J = 0.1 7!JI = 1
J.: = 0 J:_J !.=2 A= 3
Bi nnmiol 0.34~7 0.3S7 0.1937 0.0~74
Poisson 0.3079 O.:i6i0 l.1~30 O.Oti 13
II= 20 p = 0.05 np =1
1: = 0 "'- 1 k=2 J, = 'J
Hiunmial 0.3.:J80 11.3ii4 O.JSSI 0.06
Poisson 0.367!) o.:l67!> 0.1839 0.0613
II - JQ(J p = 0.01 np= 1
k=O ~ I 1.:=2 A= 3
Biuomial 0.3f3G 0.3GD7 0.184!> 0.()61
Poissoll 0.3G79 0.3679 0.1839 0.0013

\\'c :-ec that fot 1lp = onc::tnut. as n inaeasec:: cllul 1J cl nc R"C" t lte ;\l'ru rar.y of the
approximation improves.
Ch. 3. Discrete Random Variables 27

~
~ \' lllll'f'orm .Ill 1 f 'l
' ")
-......... )
4 ,\ p =[ .\' =./'] ='i
I

a) l~:t { he uniform in {I. 2..... 8}. then\' U- 4. su


/~ IXI =-2 E(t r J-4= ~/ 1 -4=0.5

and
VARI \ I VAR[UI = rs:~ 11 = ~;

h) l~p l-11-2.\ 1 +3 1= -2E[X 1 j+3


= 2[VAR(X) + (X 2 J]+3

:::; -2[ 1f H0.5/]+ 3 = -8

VARI>'I = t:lf 2 ]- [11 2


=41.:.1XJ]- 12(X 2 J+ 9 -(-8) '

VARI J' l= 4(-lf ) - 12( '~') +9-64 = I05

~ II
~/)~ - = ctrHJO ~ In 1000+0.57721 - 7.485
<'woo k

flj .\ < 10] - -1-i:~=.-SL= 2 93


=0.3913
Cw," 1 1 .I Cwoo 7.485
Pf X> 990] =1- P[X ~ 990] = 1- c.,..1 = 1 -~NO + O.S?72.J =0.00 134
c11 I() In I 000 +0.5772 1
28 Student Solutions Manual

@"I! need to calcuiJte fJ the fraction ofpopulation \\ilh \\l'alth less thank. and HI.
the proportion of \\Calth <mned b) the population that has \\~ulth k or lc<t..,:

1
PIX =.l. l =< l -p>Jl fork=1.2 ....
A

I~= /)IX ~ AI- cip'- 1 = 1- p'


I

I. iq>' I Lk>'
'
I

II', _ I I--=-':-'-- = (1 -p'


1
)-(k I l)ji(l f')
I L .i'P'. I
"---------
i'c1/ I
1' I 1' I

Ill ,, {I - p"' ') _{I- p"'" )- (m< l)p"'il- p))


L .iP' I
II clp 1-p

Wll11 o
Ch. 3 Discrete Random Variables 29

3.6 Generation of Discrete Random Variables

@ a ) I he foliO\\ ing Octa\e commands" ill give the rl!qucstcd plots:

X (0:1:10);
lambda = 0.5;
figure;
plot(x, poisson_pdf(x, lambda));
figure;
plot(x, poisson cdf(x, lambda));
figure;
plot(x, 1-poisson_cdf(x, lambda));

X (0:1:20];
lambda = 5;
figure;
plot(x, poisson_pdf(x, lambda));
figure;
plot(x, poisson_cdf(x, lambda));
figure;
plot(x, 1 - poisson_cdf(x, lambda));

X (0:1:100];
lambda = 50;
figure;
plot(x, poisson_pdf(x, lambda));
figure;
plot(x, poisson_cdf(x, lambda));
figure;
plot(x, 1-poisson_cdf(x, lambda));

@ a) 'I he l()llowing Octave commands generate the requested plot lbr part a). Parts
b) and c) arc done in a similar manner.

v [0 1 2] ; \ I >dine th-.: sumpl-.: -.pa~.:c


p - [1 1 1) /3; \ l klinc pmf
discrete_rnd(lOOO, v, P); \ Gencrutc I 000 sump h.:'

-
Chapter 4: One Random Variable

4.1 The Cumulative Distribution Function

@ \'and } tm: discrete rnndom variables:

/. I 2 3 ..J 5 6
.A(~) 0 I I 2 2 3
}'(~) I I 2 2 3 3

,<.,' , - 10.1.2.31 P -- (.L .L)


l. (I
1. 'h
(l '(,

,\' (1 . 2.11

I 111 1 j(_l)
~ -1.-
......._

- }{

II I 2 I

sf( = {,. : o< ,. <. 21


R- J,,' + J' '

1--t---f-..o
.,

30
Ch. 4 . One Random Variable 31

I or 0 r < 2 _I _

R is a continuous random \ariable.


(I

@ \ is a continuous random variable.


r ,{x)

() 2
Pl.\" ~ 0 I= F, (0) = t
P[I \' tl < I] = P (-I < X - t < I] = P[- r< \' < { ]
"" P( -t<X~f]=F,( I .5)-F ( 05)
=t{}+ l)-t(--1+ 1)
= 1 (}+ 1+!- l) =t
P[ r >-t] = t -r [ .r ~-t]=l --\-(-!+ 1) =7.

0.75~
1

I I I I I I I X
- 1 0 I 2 3 4

\' i<~ a random variab le of mixed type. so ''C have tn watch out for \alues '"here
the cdf IS not continuous.

b) !'[X ~ 2] = 1-fe-201 = 0.9954


0
I'[X = O] = I-te- 2' '= 0.75 usingpropcrt} (\ii)nlthccdf

\\here \\C tool.. the limit from the left to exclude the point X== 0.

Since the cdf b conLinuous aL x =6


32 Student Solutions Manual

P(2 <X < 6) = P[l < X $ 6] = P(X ~ 6] - I'[\' S 2)


= l -+e-~t 6 ' - I ++e 'Ill= 0.0046
P( \' > 10] = 1- /'(X ~ 10)
=1- (t -+e-:!' 10, ) =5. 15x l0 10

4.2 The Probability Density Function

@ We lind c through the normalization condition:

I- c rI( I X, )dt =c [ xl' I - ~ I~, J / , (x)

= t:{2-{-2]=tc:

--~------~-----+------- X
-l $x~ l ()

F, (x) =.!-4 J'(1- l'


1
)c/v
f~
I .

'[ I' - -,1_,]


= ..... r -1 l

-""""f"L~---:_+~-----+-------+
- 1 ()
X

.\ b a continuous random variable.

FIX 01 - o
fl 0 < .\' " 0.5 j - F, (0.5) - F_\ (0)
~ ~ [<t +I)-t(t+ I)) -1[1 -1)
-- ll!l

~'II \ tl < t I = /'[+< X < i ]


=i[(~+l)-t({+f +I)]
-t[(++l)-*((tl' + t)]
=0.2734
Ch. 4. One Random Variable 33

@ I rom Problem 4.6


O ~ r~1
2
FH(r) = (1 )

a) \\.c obtain the pdfby differentiating the cJf:


/1 (r) =,1, 1 ,. (r) = 2(~)(t) = f

h) ~'r R > l.j 1= f!.r dr = .l.i.l2


l :! ! = ...!..[4-
t 1
..l..J= .!!1.Ito Il l
I <

@n)
~
{~.75c5{x)
x <O 0.75 0.5
./ \ (x) ::. x=O ____._L==
_ o._' , '"
0.5e ~f x>O
0

h) To lind the probabilit) that X = 0. \\e need to integrate the delta function:
II I

P[X = O] = J<0.75o(x)+O.se-2 )tlr = Jo.75o(r)dr = 0.75


" "

@X is a di ...crctc random variable and so arc random variables that arc defined as
functions of X. The pdf of X consists of8 eq ually spaced dc llu l'unctions wi th mass 1/8.

1
n> r\,r) - I I 1
tc><x- j)

x< - 3
l+.l < - < _.:..!.
, _ .x_ 1 ' .i = - J ..... J
34 Student Solutions Manual

.L 1M~-
I I --+-1---fJ--+-1- - fl-,lfliftl--+j---+ X
J -2 -1 -J .., - 1 0 I

Thl! mapping Irom X to ) and the pdf and cc.H or> nr\! as shn\\ n he low:

0)
3 -2 -1 0 2 3 4
15 -5 I 3 5 15 29

f
.) 5(1' -l 29) + 1.8
(J') - lR o(I'+ I S) +l.b'(
A .I'+ 5) + lo(
M I' - I) + .lrY(
H . I' - 3 )

F 1(1)
Yx
X
Ys
Yx
2l) 15 5 )

@ I h\! condit ional cdr given B b obtained using J q (4.23)

/ 1 [{X ~xJn( X>0.25J] fl[0.2'\< \' ~ r}]


/ 1 (x I IJ)- - - Pr .r > o.25J -
')1.r > o.2s1
0 X< 0.25
=- F 1 (x)- F, (0.25)
{ X> 0.25
,_r, (0.25>
.\ < 0.25
r
e +e - 1.!.-l
=-- =I - t' .\' ~ 0. 25
e

'I he cond itional pdf g i n~n B is obtained using I 4 (4.24 ):


Ch. 4 One Random Variable 35

.\"~0.25

X < 0.25
-'t
- l (! - ,~ _1.1
2 = 2e- ... = X ~ 0.25
- I .!!fl
- ,e
{
0 X 5 0.25

.\ given IJ is a shilled exponential random variable.

~
~ n ) J"'l'olll t Il P. 11e fi mtw11
. . oi" cont1'Jbonl'.J
. 1 proI>n 1'1'
11 uy we IlRYP:

,_. . b.
F' r.r Io ..:::: X ~ J =
r f{ x s , }r {a :s x < ,, }1
n( ... , . ,. IJ
.~ - (J::: .-\ !:: )

----4---------~
J ----------~~ X
(l II

From the nhO\e fitrure we 3ee that

l' for :r < n


{x $ x} n {n ~ x ~ b} =
{
{ ,, s x ::; .r} for 11 < ' < [,
. {a$ X $ b} for r > b

P[~J =0 .r < o
P[o <X< hJ

P[n S X < b} =
1 .r>h
Pfa $X $ uj

b) hfr!tr 5 X~ b) =
J' < IJ
36 Student Solutions Manual

Thus if :\ has pllf:

/:t:(x)

~~l.----!.-.-1~ (l b
.. ;r

I ht~l h. (.cia ~ X :5 b) j,.,

1\
I
I
I
I

a [,

4.3 The Expected Value of X

@ l , (.r) - +(1 - x ' ) - I ~ x ~ I. so th~ ~:-.p<:dcu valu~ is then giv en by


HIXI t L.r<l - x2 )dr =~ [ r; [, -.lit]=o
I he second moment is obtained in similar ll1~hion.

l j.\ 1
1
=i f, X
1
(1 - x ! )dx =+[-fj~, -tl', J= :[i-i]=t
I he ' ariancc is then
V'\RI .\ ] = /.l.\ ]- [.Y] =t
1 1

@ ./ (.\l =f o(.r) +r2e!r


1 r > O.
/.,I\] ...: 1 -~/ 1 {r)dr= O ++ f2xe 'tl.r -++=t
'----y--l
Ch. 4. One Random Variable 37

mean of exponential R V

EIX )= J.'x l,(x)dT = O+t [ 2x~e-~'cl\=+1=t


1 2

'--y---1
f . second moment of l!\l')(lllential RV
'-;ec Prohlcm 4.48 for a solution of this integral.

l hing l q. (4.28), we have:

f iXl = J,( 1- F,.(x))dx=t ["'e '-'dr =+t= t


1
j,

'
- -a [e ' 2 ;:,.: ]~ + m = m
&u L

a~ I (r - Ill} 2 e _, ~IT' dr = I
.. ,: I'!e ,: I' JrrJ ell.
J2;u &a ,
_&a {[ u 2ye '
1
2u~J: +u~ J>-'~ 1rr'((\'}
- a2 where we used integration hy purls with
-~ J ) ~
u = .1' d1 = ye- ' -u

@ /1 X J = f 1
X I , dT +
;r( l +x)
Jc;r( l +x") /.r
X ,

( onc;ider the latter term:

J';r(l_,+X"
I
_.-,-f/r
)
=_I_ In( I + x:! >I' = In( I - y) ~
2;r 2;r 0
V"J

Thus the integrals do not exist~ E[X l docs not cxi~t.


38 Student Solutions Manual

rp I= f~ g(x) I (x)tlr \Hitc th~: intcgr:tl into thrcl! parts

=-a~(, (x)dr + f>:/, (x)c/, + J, /, (.r}c/x


= - a F, (- a) + [ :~:1 (x )dr +a( I - F, ( u ))

/1) 2
J- a' r 1 (- a)+ [x~fr(x)dri-o'(I-F,(u))
Vi\ HI r] = [> , J- EfYf

b) Fll' l =- (l)fl[l'5- I] +( I)P[J


'---v----'
~ II+ fI.___.,.__._,llc1r
rtf! 0
le I .le I odd even
2 l

=0 = ()

= (.' I 1- 2 X+ fX~e-.d\' = .'-I + 5e I 2- (W I 2

e ( r~ + 2x + 2>1: from .t\ppcndi\ B

@a) y

b ----------or-----

" (\' Cl)

ll '' a
,\'

\\ c ''rite the general e\.pres~ion for the C\~ctcd '.tluc in lhc terms:

/1>'1= -h/'1 X 5 - h]+ hF[X ~ h] + 0 x P[- o 5 .\ 5 ol


+ [ /., (x +a)/, (x)d, + [ ,- (' u)f, (.r)clr
Ch. 4. One Random Variable 39

%nilnrly. the second moment is:


E[)'~ I=- h~ I'[ X ~ hl+b1 P[X ~ hi
-f 1''-4<x+a}!
, (b-tl)
l , (x)tl\' + jr, _K_
(" 11) ( \ + a)' ( , (r)dr

and finall)'

b) II' Xi~ a Laplacian random variable. then


- oo < x <oo, a = l. h -2.

/~' I>' I --2PI X ~-2 1+ 2P(X ~ 2l+ f 2(xt l)e'clrt J' 2(r l)e-'c/, ...., 0
~ ~ -----------------
te' tel = ()

Fl> 1
1- 4 x t e-1 + 4 x te 2 + 4 f 1 (x + I)2 e' ch: ~ 4 f( r - I) ' e 'dr

= 4e<' +sfcx-l) 2 e 'clr

@a)
0 x S cl
F 1 (r) - f 1 (d) cl ~ r ~ 2c/
F, (2d) F, (d)
I x ~ 2d

./\ ( \" c/ .$ X ~ 2t/) = ----''-'' -- -


r (r)
F r (2c/) - f , (c/)

r,
.
I
(x) = --
2xma.~

x + xma
F \ (.r) = '
2x,.,
I
! , (xld 5 x ~ 2d)= -------
. 2d + X111 ~, - d - t, " cl
40 Student Solutions Manual

b) Ef X I d < r < 2dl = I~ xf, (x I d


..
~ X ~ 2t/ )dr = ly.::.t/ dr
I

1
= I x '' =-I (4c/ c/
---- =-
3d
1 1
J
d2 d d 2 2 2

VARIX I d ~.\' ~2ciJ= [x 1 f,<xld~.\<2d)clY-E'I \ l d ~ X ~2dl

~ r :: tl~ -e~'}
I x' ~., 9d' 7c( 9d 1 d '
=-- - - = - - - = -
d 3 " 4 3 4 12
.,
~ ~' x
c) E[(.A -ctl d <.\ <2d]= f' - cb: -2c J'' -x dr + c-J
, ., , '" -dr
I
lid l c/ l r/

=7c1
1
---2c
3
(3d)
2 +c,( dI)d =c,-Jed t
1
7tl
- -
3
d) 2c - 3c/ + 0 = 0.
3d
c =- This is the midp()int of the inlcrvnl (d. 2d).
2

c) E[(X-q(x))~]= [ ., (x-q(x))' ~ dr
-\111\

where M = 2R and Aid 2xm0 ,. In eftcct. we're adding the contributions to the mean
square error from the m intervals. Note that c:k denotes the representation point in the in
kth interval.

The dcrivntions in parts c) and d) can be used to show thatc! - kcl t 4=<k+!>d,
that is. q is the midpoint of each interval. Therel()rc,
I

L _d_ : ' ' (x - (k +!)d)


I
1
E[(x - q(x)f] = dr
A -If 2xmtt\ ' d

=- d -xM x!t_ -----.,. -cf (lrum


. part b)
, ,- I? 12
-'m:t\ -

=-
12
since there arc AI terms in the sum. and since Md - 2.rmil\ This is the same result that was
obtained in Example 4.2 0.
Ch. 4. One Random Vanable 41

4.4 Important Continuous Random Variables

@ o) 11 X S d J= I (d) =I - e-u d>0

l,kd ~ X ~ (k+ l)d] =F, (Ck+ l )d)- F, (kd)


=e-Au -e- A-1'' = e-.u'' (l e '' )

P( \' > kd] = 1- P{.\' ~ kd] = 1- F , (kd) = e -l t .t

b) Finu XA. k - I. 2. 3. 4 such that

Fx 11)

~,: ----------;;-:---

;~ ~((- X1 2 ~ T3 I t

x, -In-.1
In 1 ln5
X, = -' x~ = T
- A A

() x)
\!( I i
= ,;:;- eI . ~'dI= I - I
,;:;- J'e I 1
t II
"2Jr .r V 2Jr "
1
= 1- - - r' e_, 2 (-dt') where 1 = - 1
1

& JTJ

=1- I ")
I' e
I
- 1' '2
dt , = 1-Q(x)
-!C

@ a ) We start b} linding the conditional c<..lls:


1, (.\' , V S y l .\' = + I)= F ,. (y - 1)
I~ ( .\' + N ~y IX = -I)= F, (y + l)

Nc\l. \\C uiiTerentiate to obtain the conditional pdls:


42 Student Solutions Manual

t!
+ I) -f,(y!X -+1) = } , (1' - 1)
c(l'

.r. (.1' .\ - I ) = / , () I) =
a&
I e 1 It !o

b) Dec1dc o.. if .f1 <.r IX = - I )f[ X = -I]> .f. <Y I X - I) /'I \" = -t II

J) l
3e I ' .n >I

-4)'
2a
(I)
, > In -
3

'I here fore decide ..0.. if y< ;


2
In ( i) = r.
c) J he conditional probabilities or error an: gi' en h~ :
r 1')
/'[X rv < T I \' + II - l'f N < r - I] - <I>( --;;' ) (~cc I 4 4.50}

1'[ .1 A 2: T I I -1) /'[ ,\'2:/ +1]=(1-<l>('a l))


d) I he o\crall probnbility of error i'i then:

r[ r , N < T 1.,. - + 111'1.\' = + 11' P[ x + \ ~ 1 1' 1WI r - - II


= p,<l>( ~~~ I }~{ 1 - Qr<T~ I))Jp,

4.5 Functions of a Random Variable

@a>
L-( \ a) ={ X - a
0 X~a

X>a () (,( X

Nntc that the \aluc oL\'in the intcnal (0. o) are mapped onto L = 0 :
Ch. 4. One Random Variable 43

0 : <0
P[X ~a]= l -e-u
1
2'': =1-e 12
== 0
1'1/ ~ :1 =
P[ X -a ~ :] = P[ X ~ : 1- crl => 0

fz (=) = .L r (:) = (I - e- y. )c5(:) + .~ F . (: + cr)


= (1 - e-~ )15(:)+ fz<= +a)
=( 1- e Y, )8(z)+ (z I tl') (., -c:rd l 2rr:
2 0 z

@.\'has nontero probability massatO. so >'wi ll have thi'i massa ty =- 4(0) +2=2.

y =g(x) = -4x + 2
2 / \ (x)
~('>(,\)

First we find Lhc cd f of Y:

I; (y) - PI 4X -t 2~y] = P[-4X ~y-2 1


= r[x ~ 2~, J -oc < .1' < 2

P[X ~OJ = I y=1 since PI r ~ 2] = P[X~ 0] = I.


=- { P[x~ ~;' ]=+e-1 1'+) y <2

.l'
0 2

/\..,expected, the cdl'has a discontinuity aty = 2. We obtain the pdl'b) diiTcrenliation:


44 Student Solutions Manual

.t; (y) = ,~. F; (y) = fe -(1-f) (t)+-tJ(y- 2)


=te (l ~ ) +j-o(y-2)

@ a ) In general the cdf of Y is given by:

0 y<-b
P[X:::;; -b] .1' = - h
P[ ,~ti (X +u)::=;;y] = F\ ( \" y - a) -b < )' < 0
F;.(y) =
P(X ::=;;a] y=O
Pf ,~.,(X -a):::;; yJ = F r ( h/,C' y+a ) O<y<b
I y=b

Note that typically. the cdf will have discontinuities at y = - b, 0. and h. The cdf and the
corresponding pdrare shown below:

Fr(Y) has discontinuities


aty= - b. 0. b.

------------- y
b 0 b

Pl- a :::;X :5 aj()(x)


P[X:5 - h]6(.x + h) ( I - P[X:5 h])J(t- b)

y
0 b
Ch 4. One Random Variable 45

@ a) lht! eq ui valent event for {Y:Sy} is {1 .\' I : rl. thcrcl(lrc:


I (y) - P[j \'15 Yl = P[-y 5 X 5 yj
y <O
y~O

Assuming \ is a continuou<; random variable.

I
. I
{I')
.
F.'(r)
I
= f I (r)+f
.\
.(- .rv) for .r > O.

b) lhccqui va lenl event for {c(v < >' :S y + c(l 'l is shown bc luw:

!f T d!l

Therefore
Pb < }'!Sy + t(l'] = P[v < X :S y + c(vl + Pl -y- c~1 <X !S-yl

:) .1; (y)c~\' = / , (J')l(l' + / 1 (- y) I c(r 1


~ t;C_r) -/1 ()')+ / 1 (- y) fory > O.

c) If.f,(x) is an even function ofx. thcn.f\(x) /I( x) anu thus /)lr) 2 / 1{y) .

@a) Fnr y < O PI>' !S y ] = 0


For y > 0 PI >'~ yJ = P[ex :S il = PIX < ln y l 1\(lny)

:. !; (I') :. {0F, (In y)


y50
y >O
ror 1> 0
f. ( r) =.L
.). r/1
F1(.r) = F'I (In v) .L
h In)'=.!. { (In r)
11

b) If \ is a Gaussian random variable. then


y50

y>O
46 Student Solutions Manual

4.6 The Markov and Chebyshev Inequalities

@ a) For a unifonn rC1ndom ,-a..,able in 1-11. b) we lmw


&(XJ =0

-b 0
E:xnl"t:

ChebysheY Bonncl ~ive-

<T~ h~
P'IX - m > c] <
-
---
I'!
= -
3t~

PJY- m , > c]

1
bound

c
h

b) For the Laplacian random Yariahle [.\j = 0 and L-lRIXJ = 2/n 2

Exact: PIIX- 111j > cj = P\ XI > c] =e-<> ~


2
UUlmd: P!IX- m I > c] ~ --::;-;i
ac

P[I.Y - ml > rj

c
L 1
n
"
Ch. 4. One Random Variable 47

4.7 Transform Methods

= =-------
iw( b - (-b)) 2jwb

Hl .\' l =-1 d, ( w) I
J' c:I II' ... o

-h--1'-h [-J.b2
2
+J...b2]
2

- t (h - h) = O

E[ \' 2] = 1
- ct'\(w)l
2
I
I
l II'
2 ,.;{)

I [ I 'h' I . ' ]
= j(h-a) --o +-ua " "

= f<h.! +ah+a~) = ":

~ E[XJ -

=
-
E[\"2] -

-
l'AR[XI -
48 Student Solultons Manual

c <=) I' (nJ"' (1 - pt ' ='


* . k
I( '~J(p.:). (l - p)" A
A II k
= Jp.: + (I p)]' from Binomiall heor\.!m

/IN] C/ (:> 1: ,= n(p: + lJ) ' ' !' I_ ,= np


F[\'' 1 /~ [ NJ (j~( - ) 1.,= 11(17 l)f Jp~l I
1
(11 11)Ji

V1\RI N] - n 1 p - np' + np - (np) 1 =np(l - JJ)

~r ={.\'' \\ilh probabilit} p


r2 \\ith probability 1- f1

.\ cq t.l<' '-' l =EIF''I X -~\ 1 Jp + [e '' IX=X2 J(I -pl


- Fk '1 Jp + E[e j(l - p)
..I, A,.
p - - + (1 - j J ) - -
\ + ..!1 " + ;"'2

4.8 Basic Reliability Calculations

R(t) = P[T > t] = loo fr(t')dl'


- {: _~ To
I <u
11<l<n+To
0 i > 7o

oo 'P
AfTT F =
la 0
R (l)dt =a-! ..2.
2
Ch 4. One Random Variable 49

1>) r (t ) =- R' (t)


= { a+ ~0 - t a < t < n + To
R(t) 0 elsewhere

i-a
c) R(t) = I - ~ = 0.99::. t = o + 0.01.1-;,

~ Each C(lmponent has reliability: lt'1 (f) = t -t


a) R(t) =?[system working flt lime]= PI~ or more working 111 lime t]

= ( ~ ) (c-1)2( 1 - c- 1) + ( ~ ) (e-')J
= 3e-:u- 2e-31

MTT F - lXJ R(l''!ll' = fooo (:3c- 2


''- '2e- 31')dt'
3 2 5
- - - =-
2 :~ (j

b) Now R1 U) = ll (t ) =
2 ,-: and R3 (i) = e- 1/"l. U(t) = P[2 or more working at.
time i)

= R1 (I)R~{t)(l - R3(t)) + R1 (f)( 1 - R2(t)) Ra(t)


+ (1 - R 1 (t))R2(t)R~(l) + R1(t)H1(t)R3(t)
= c-'2t(1- e-t/2) + :lc-t(J _ F..-t)t-t/'1 + c,-2rr;-t1~
= t;-2t + 2r.-31/2 _ 2e-5' 2
50 Student Solutions Manual

4.9 Computer Methods for Generating Random Variables

@ a ) The foll ow ing Octa\ C code g i\ CS r ig urc 4.5.

X= (-5:0.1:5); \ \n,l) ol ()(lint' hd\\~o:L n 5 and )


pminus = noLmal_pdf(x,-2,1); \ ( ondtllllnal pdf !;!i' en 2
pplus = normal_pdf(x,2,l); \ <. onJ itiunalrxlf giHn 2
plot(x,pminus)
hold on
plot(x,pplua)

b) Let m 0 and rr - I. then we need to comrnre {_)(a) and e ''

X= (0:0.1:5]; % <.'hcrnol'l' hound unl) ' aliJ li 1r u 111


q = 1-no1mal pdf(x , O,l);
chern c exp(-0.5 *x. *x);
plot(x,q)
hold on
plot (x, chernl

0
O <U~-} u -te'
produces negat ive values o f r
,. - In 2u

f<U < I 11 =I +e '


produces rositi"e value-; or.r
x=- ln( 2(1 - u))

The fo llm\ ing Octa\ e commands gene rate the requested sample and plot:

X= (-6 :0.01:6);
u = rand(l, 1000);
\Multiply all values by discLetely generated -1 or 1
z = -log(u). discrete_rnd(length(u), 1- 1 1), [0.5 0.5));
figure;
hold on;
\Normalize to 2 because bar width is 0.5
hist(z, l -6 :0.5:6), 2);
plot (x, laplace_pdf (x) , "1") ;
Ch. 4. One Random Variable 51

@ l"hc foiiO\\-ing Octave commands describe the fu nction for performi ng the
rejection mcthm.l and the code to call the function :

function z = gaussian_rej ection_method(N)


z a zeros(l, N);
k - 1;
while k < N
while true
ul rand;
u2 = rand ;
xl -log (u~) ;
i f (u2 < = e ." (-((xl-1). "' 2))/2)
z (k) = x l.*discrete_rnd(1, ( - I 1) , (0.5 0.5)) ;
break ;
end
end
k k -t 1 ;
end
end

X [ - 4:0.01: 4 ];
z "' gaussian_tejection_method (10000);
figure;
hold on:
hist(z, (-4:0 . 125:4], 8);
plot(x, normal_pdf(x, 0, ~). "1");

:. X , is exponential wilb pa rameter ,\= I, and fx, (:1.:) = r.-x.


II X 1 is accepted, its pdf is given hy:

'[1 < \' 1 . J_l ,. d] _ P({X1 accepted} n {.r _ X 1 < 'J.' + ,J;r}
_ " < ' + ch< \.l acceptt> - fJ[ v I]
' \ J lli'CCJif.C

"here }' \'I and X is a 7ero-mean, unit-va riance rnndo111 variable.


Student Solutions Manual Ch. 4. Ot
52

4.10 *Entropy

@ t) ll~=log6
h) llxiA = log:J
lJ 1i - X ~p = log G-log 3 = log 2

@~ ) ll1 = logi

b) X= 4, 1 = 3 or 5, Hr = log2

@ \i 1
nuifo11n H\. in [-a,a], .f-x. xk) = 2c .

]\

- -log 6 - ~ fx(x~:)6 log {fx(x,..))


k=\
- -log tJ. -log (Jdx))
1
- -log 6 - lo110 -
2a
liQ ... = -log 6 -lvl! (fAiil(~r))
I
- -log 1::::. -lug -
tl
1 1
Ho - IlQ 1 == log -(I - lo''0 -'211 = Jc,CJ ::!
0

fhe Jiffeance of the dilfc!rcnlial cul.ropy log(a- (-a)) -log(a- 0) =log 2


Ch. 4. One Random Variable 53

~ 3 31 I 1 1 J 1
~ IIx - -2 Slog B- B log B- 16
log J6 - 2
32
log :l:l
3 4 5
- l.06 + 8 + Hi + J6
- 2.0bils

X p Codeworu
I .1/ 8 0
2 3/8 10
3 1/8 110
4 1/ 16 UlO
.5 lj;32 11110
6 1/32 11111

@~cl
P - Ce .a Ca'
'
1- L'~ =( a+Ca 2 +Ca'+Ca~
{
2 FJX I= I xCa+ 2xCa~ +3xCa' +4 xCa 1
('- 0.64.a 0.66
I~ - 0 42. /~ = 0.2 8.[~ = 0. 18. P. = 0.12
Chapter 5: Pairs of Random Variables
5.1 Two Random Variables

@ a) The underlying sample spaceS consists or the pair of outcomes in Carlos and
Michael's e>.perimcnts. The random pair (X. l) is generated for the pair from S b) the!
mopping shown helm\ :
s
...
')

~ 02
~
..c
0
II 1'2
~ 2 ~ @

b) 1 he probabilities for (X. )) are determined from the prooahilitics of the


eq ui va lent events in S. Por example. the eq ui va lent event for (.\ ~ 0. )' = I} is the subset
{0 1. I Ol ofS.
J>f X= O.r = OJ= P[ {00}) = t,
P[X = O.Y = lj = P( IO LI OJ) =+t+tf =+
P[ .\'=OJ' = 2 J = P[{02.201] = t. +I~= t
PI X = I Y =I] = fl frJ II) = 1
n[ \' = I } . - ') ] - J>[ I 1 2 l ,l]-- 1..U.1 + .l.l - .!
J - ... -
I
, ... 11-~

Pr .\ T - - 1] --,1>
- 2}' -- J_

@ a) S={X+Y>3l=[Y>3-X} b) {e I > re'l = P' < (' I-J}


Not product form Not prod uct fonn
J'

7I

54
Ch 5. Pairs of Random Variables 55

@ C) !min( r.n>O}v{ max(X.}')<OI


IIHfiC \ I) II

Not product form.


hut union of product form
IIIA\1 \. l) II

5.2 Pairs of Discrete Random Variables

@ We show the joint pmf of (.X: >1 below hy identifying tht.: probability mass at the
valut.:s (x,, y 1) in th ~: plane. We show the associntcd marginal pm r.-; of \' nnd Y along the
corresponding margino;;.

u) J' l' b) .I' 1'


.., Sh iflto
2 r., :ih X. 2 xh ~ K, %., 2 I
4
higher
\aluc<;
,,
,.(I )(b Y.r. ~ '}!,, y, oft

() .. X 0 Y.~oo 0 ~
X
() Y...
0 2 0 2

y.,.
() fh
I
v...
I
2
'X
'%.
0 :r
I
%,
.,
'I x '-.hill In higher
Hlluc'> ll I.\

@ i) W<:. obtain the marginal pmf of X ( J) by ndding the prohubilities along a row
{column ) in the array of joint probabilities.

P[X = i] .L ;{ :- 1.0. 1:
0 I P[ r = i] = t
' i E {-1.0. 1}
- I X. y,: 0 Yl
P[X>O ] = P[X - l l=t
~ 0 0 0 y, Yl
P[X ~ r) = P[(X. }') e !C- 1. - 1).(0.-1).(1.-1),
y,: y, 0 ~J
(0.0).( I. 0).( 1. 1)I]= t+ t+t = 2
y, y, y,
P[X = - }'j = PI(.\'.}') e f(-1.1 ).(1. - I).(O.O)n = *
56 Student Solutions Manual

5.3 The Joint pdf of X and Y

@ a ) The vector (X. }) as::,umcs va lues in the triangular region s hO\\ Il below. The
joint cur
is eva luated sepamtCI) in the four regions indicated below. In each instance \ \C
consider an arbitrary po int (x. y) in a region and calcu late the probabi lity lhnt (X :5 x.
r < y} by finding the area of the overlap hetween the triangular rcgion and the g iven
region and normali7ing b) ~. the area of the triangular region.

10 /\rea oftrinnglc is lh

O< y<x < l R i.'gKIII I

rnanple 1c.:lun~le
""""'~
PIX ~ x. r ~ .rl
T + y(x - y)
X
= 2 (xy- '; )

y < x.x> l

PI /\' -< x. Y -< J l = .;:. + y( 1


y; - .r)

( '"'}
x > l. y< l
f(.\' s xY s .1 l = l
Ch 5. Pairs of Random Variables 57

1 he figure <;hm\S the C\pre \~ ion


for the juint ccl r in each of the
regions.

b) I he marginal cdf is found by applying property (iii) of the cclf '"hich involves
taJ...ing the limit of one of the variables to inlinity. In this problem, the cdf reaches its
limiting value at finite value<;. Thu!> the limiting value of/, 1(x. y) as x increases is
attained at Fu( I. y) (sec Region 3 above). Simi larl} F, 1(x, y) npproaches F., 1(x. x) as y
(Region 2).

1'1 \' S xl : ;: ; Fu (x, oc) = x 2

PP SJ'l "" Fu (oo.y) = 2{ I'-':)

c) "L\' s-t . r :5~]= (!) =t since(+-~) is in Region 2


2

n[l.I <"\' -J4<


I
<' -1J
< 1 ) .l

-
- rI. \1
(lI l~ )- F \I (l~ l.)-
J
F.\I (l.I ..!)
I
+ F \ (l.I'~l.)

-O)' -2{Ht)-H4f)-(t)' +-(tf


-l.
-I

\\here we used Eq. (5.9c).

@ W e need to check that the properties ofa cufarc satisfied

1- .-
1 x>l.y > l
I" ( ' . .1') ={ 0 . ,

F\ (x} = lim Fn (x.y)::;::; I


I "
elsewhere

all x > I
+--!- ' I '

F,(x) cann()t be equal to I for all x. theref(m: it is not a \alid cdf.


Ch. 5. Pairs of Random Variables 59

@ a ) Fur 0 !:,ru !: xu we integrate along the strip indicated below.

(ro. .l'ol

F 11 (xu,J'o) = r r
lQ' 2e 'e 1 dx

= 1-e 11''- 2e- ' {1 - e 1


)

J'or 0 < Xu < J'u WC 110\\ integrate as Sh O\\dl bcJO\\.

l" ( l' I
~~~ XnYu)= ' ~' I L
fr,, ') e
I ,. I
lX

= 1- 2e-2'" -e '

P) I he marginal curs are obtained b) ta"ing the nppropriatc limitS of the joint
nlr:
58 Student Solutions Manual

5.4 The Joint cdf of Two Continuous Random Variables

@ a ) I he joint cdf is found O) integrating the joint pdf: For x > O.y > 0

F (x. r) =
\) "
J'J'( (.\". r' )dY'dl'' = J'J.e-.r' ~c/r' J2 ,,
1 J' ' ) ' 12
,,. ell' = (I - e

.r ! )(I - e_,.: )

h) We lind the probability of an event invoh ing \' amJ > hy integrating the pdf
0\ cr the region that corresponds to the evenl. In the Cihe below. for curh \'alut: u r' "~:
integrate the joint pdfo,cry from minus infinit) toJ,.

r[5 }J- r(.' 2ye I (~}lte I 1(1.\"

12
=[[ -c ]: fe- 1tl\

= -t
'
I (I - e (
1

I
)e ' clx

c) F1 (x) =Jun I ,1 (x.y) = 1- e-T =' x >0


'"
b) prnpt.!rt) (iii) ufthc joint cdf. and so

d r,x - d (I - e_, 1) -2e


L.' ( ) - J. ' Ill
x >O
dr dt
F(y) - 1-e ,; y>O
/
1
(,r) = 2ye_,.: y >0

Altcrnati' el} \\e could ha\e inll.:gmtcd the joint pdf using Eq. (5.17uh).
60 Student Solutions Manual

= j 'x J--,
I e r 'a'
rdrd8
2,T(r
''here \\e lctx - r cos O.y r sin()
/" Jre
- -,
a ,
r" ">n
ur
1

= I- 1!
-w 2.,.:

5.5 Independence of Two Random Variables

@ lhc table beltm ~hows the probabilities fo r thc pnirs nf outcomc~.


N I 2 3 4 5 6 Outcome ol too;s
X 0 I 2 2 "'
.) I ull pair.,
J' I () I 0 0 Remainder
p(x.y) X, X. Y. X X: X
The table heln" shO\\'> the joint pmfand associated rnmginnl pml~.

.I'
0
Note that :
() X ){.
~ I K. }{ 7{, Pj) 01 -1 /,j) - II
2 X. X. Yo P[ \ ()I * PI \' = 31
3 X. fll .\ - II -+.= fll X = 21
Yu
~ ~

1' 1 , (0.0) t: p 1 (O}p, (0) => X and ) arc nut indcpcndcnl.

@ F 11 (.\.l ')-(1 -e 2
}(1-e )=F (x)/~ (.1') all.r.y
=:> , \ nnd r are imlependcnl

@a) P(a < X S h.l < ci]=P(a<X 5 h]P(J's cl]


=(F1 (h)-F1 (a))/; (c/)

\\hcrc thc lirsl cqua lil) f()llows from the independence ofXam.l ).
Ch 5. Pairs of Random Variables 61

@ .\'and }'are independent and uniform in the intcn al l- I. I I


/ 1 _, (x.y) =f - l <x< l. - l <y< l and

/ 1 (.\' ) =t - l <x< landj, (y) =j - l <y< l.

= ..n
I ( :! )
2
= ..nI (J)
:t -w
_ l

b) 1'[4 X < U ' < 0) - P[X <1) P[) < 0]

-- J.(.i)
2 4

c) 1'[ \) < f] = I - P[ .\T > t ] = I - 2 f cl\ ' ~ complement of ,-.hile region

= I- t Jr:~ dr ( I - tr)
= 1--!-[ r - ! ln .\ ]~
.ty<l.
= 1--!-[1 -f-! ln 2]
=f+f ln2.
- I

d) l'[mu:-.(X.l) <t]= P[X <t]P[r <1]=-fxf=t.

} -1 0 1 } ";! -1 0
X x l I 1
a) -J
0 !
~
[]]]
~ ~1
..
0 l l !
1 2

} 0
-~ _y2 I
b) -l
i I! IJ
0
0
2 I
62 Student Solutions Manual

5.6 Joint Moments and Expected Value of a Function of Two


Random Variables

@ 1 he e\pcctcd 'alue of a sum of random 'an.tblcs is the sum l)l the c:-.pected
'values of the indi\ iduJI random \ariables.

n) e[(> l ) f.p: -1- 2Xl f- l - = f( \'"~) + 2 \ ) i E{l

b) V 4/l[..~ + l '] = ((X + F)]- f[X -r) 12


= f(Xz) + 2f[X l ') + [1"2 ) - (X]2
-2f!X]E_} j- f l' j2
= I \ R[X 1 r \ AR[Vj + 2jt"[ \ }"j- .\It'[) JJ

I up:] 4- VA R[l ! if f.[\' 11 f( X']P') Lha is, if X ami } are

@ i) f.IXJ =-Ixt+ Oxl+lx+=O


/: I)') = 0 ()'has the same pm fa!> \)
f[ \T] = ( _ , )( - 1H +(- I){ I H= 0 => X and r :m.nr thogonal.
COV(X.}' ) = fi.U]-[ ,\1[}1 = 0 => \' and} arcuncorrdatcd.

lin\\ ever .\ and } an.: not independent since P[ X - 1. r - .1 J~ Jl [ \ 1 JP (} - iJ


ii) /:'1X I II >'I = o as he lore
I~ l .\'}' 1- ( I )( I H+ (- I ) ( I H+ ( I )(- I H+ ( I )( I H 0
=> X and r are uncorrelated and orthogonal.
lurthcrmnrc .\"and >'ttre independent since f[X = i.r- i] 11 [ \' = i)Jl[r - i]. forall
i.j.

iii) f:.'[ X] - I [> ) = 0


l![X> 1= (-1){-l)t+(l){l)t=f
=> .r and r arc not uncorrelared and not orthogonaL

X and )'an: not ind~pcndcnt c;ince P[ X= i. Y = i ] 7: P[ \'- 1] 1'[ r = i].


Ch 5. Pairs of Random Variables 63

NO I E: Probkm 5.67 refers to Problem 5.28.

) t[X = t Vj = 0
&[X}) = 1' j_./t-z- :r.~dydx
-1 -..!1-" ;z:
= 0
=> p = 0 orthogonal & unconelated

ii) &( rJ = P ] = o
&(.\ } = rl ;_l-l :rydyd.r = u
1-t -(1-lxl
~ p =0 orthogonal & uncorrelatetl

iii) (.Y] = ~.r' 2.t(J - = ~ = r[l]


x)d:r

1
)

2x (1- x)dx = ~
1
2 2
t:'[X ] :

V AU[ X]=~- ( ~) = -
2
1

t:!,.\' } j =
G 3. 13
1' l.l-r
2rydyd-.c: = 2 I
1' x( l - '.l') tl = Y,
r.
1 (~) :.!'' 0 -
i2- 3 - _ _1
p = 1 not orthogonal & uncorrclatcd
18 2

If we view this as a quadratic equation in/, then the equation is nonnegati\e and
therefore has at most a double real root. Therefo re the di scriminunt is nonpositive:

( 2 1~'[.\")' 1)
2
4 E[X 2 1 E[ Y 2 ] ~0
=> EI.\T I2 ~ EI X 2 ]EI1 ' 2 j
1'1 \TJI ~ ) E[X 2 ]E[Y 1 ]
64 Student Solutions Manual

5.7 Conditional Probability and Conditional Expectation

@ rhc conditional pmls tal-.c a column or nm of probabiliti~s from the joint pmf and
rcnormnlize it to have unit mass.
a)
y % ~ f'( '.:)
2 Y.,. )(h Y...
0 I fJ(.\' I .I ==)-..:.---
/'{ )' =
=)

X X
x. r... 0
fl( ,.I y = I)

I
0 ., .\' p<xly-0)
0 0

c
()

y,
..,
X
'Y p(ylx - 0)

Y: ~
I
., I' pCylx I)

l' p(.l l x=::!)


2

d) I he conditional C\pccted value is obtained w~ing r 4 (5.49b). and the C\pectetl


'aluc is obtained from l'q (5.51 b):

l [X IY- 2 j - Ox f+ I x-:!-+ 2x-1-= ~


Er x 1-" = 11 = ox+. 1x t =t
E(Xu=- Ol o
1I,~ [ \ ' J~ 0 X _1.
lit f l:! X Jl.. . f!. .2. - j_
II ~ 7 X lb - 8

H[ }' I X =0 I 0 Xt + I X++ 2 Xt = t
E[ )' I X = IJ - I X+ +2 X* = !
El }' I X =21 - 2
L'f ) _ 1 S ~
') I _
r. 1- 1 xu, rzXv,+-Xu,-"ji;'
!~

@ a ) 1 he conditional pdf 1s found using fq . (5..t5):


i) f.1 (I' I\")- .fll ( \,.J) = ; - I X< I. .JI7 5. .1 'Jl7
11 (r) ;.J1 -x 1

I
ii ) l<tlx>=-
1
2
- - l ~.r~ l. - (1 - lxl)$y~1 -l xl
1-lxl
.,
iii) .f, (I' I X)=-( - O<x< l 0 <1'< 1-x
2 1-J:)
Ch. 5. Pairs of Random Variables 65

b) I he conditiona l expected va lue is found u~ing Cq (5.4Qa) anti the expected


\aluc is found ll!-ling [q (5.5 1a):
2 -r-;
i) /: j) I rJ = ') ~'
J ,..-
y
r
J
-
dy -= 0 fur all x => FP 1- 0
- -JI-
1 (..J.r

ii) L:.JYJxl=-!-.
, _,_, '-11-t'l
J yc~r=O lornllr ~ fi>'I = O
2

iii) Ell., X] =
{I- J}
f y dy = (1-.t}.
I
.
--
2
I (I - t ) ( I -.\)
=...;.__
2
0

1(1 -x) r '


,~., n- f
(I
X 2 ( l - X) dt = J( I - X c/r
2 0
r
I

= f( I - 2x + x 2 }i"
II

=[1- 1+t]=t.

= <ausc;inn pdf\'.-ilh mean m! + p: (.\-m 1


)

.
an d "anance CT!, (I - p ' )

~im ilurl). I , (xjy) is a Gausc; inn ptlf\\ith mean m1 -1 p ~ (y - m2 ) anti variance


a. (I p ' ).
66 Student Solutions Manual

r A+o)
r(k + o)
=
r(o)k!
" )Q ( I+.A
( l+A 1 )'"
~

getlf'J alization fl>Jll l of


of Binomial Binomit'll
Coefficient dist.

N i!' called tlw gcn,t ali zed Binomial RV.

C(NJ fo~ ( 'lr'JR(r}dr - fo-x rfn(r d,- [UJ- I


&(N 2 ] - fooo f[N2 jr)fn(r)dr = f<r + r 2 )fn(r) = &[RJ + t'[R2 j
\ . AR(NJ - &(R2] ..L &{R] = f[Rf = l '.4R[R] + f.(R]
a o
- ,\2 + ,\

5.8 Functions of Two Random Variables

@ I .ct X, be on exponentia l random variable with 1/A. I 00. Xl be a Raylei gh


ranuom voriablc with El \', I= a.J;r I 2 = I 00, and '/' min( \' ,\'_, ).

a) P[t t]- P[ \'1 >t)f[X1 >t] =e-"'e_"',


P ( I < 1] = I - e All! "'

b) P[l t0 >t l f'>t 0 ]=P[T>t+l, T>t,]


_ P(rT > I+t ,}r"''(T> t0 J] r[l' > t +to]
- P[7 > t0 ] f[f' >t0 ]

= I > (}

\\here /u 100 and T lu is the aduitional time.


Ch 5 Pairs of Random Variables 67

c) P( I > I +1 1 1T > 11 ] is given abme. "here I is the total time.

I ct t' = H /0 then

@a) p 11 (m)=P [ M = m]
- P[ K + N = m]
Ill

- LPIN = nlP[ K = m-n]


, u
,
- L p, (n)p~. (m-n)
''II

Therefore the pmfofa sum of discrete random \ariahles is the convolution ofthe pmfs of
the im.li'vidual randnm variables.

b) \\ c evaluate the summation from part a)" here \f and A arc binomial:

, 0

-t("]p'(l-
,., I
k )p"' '( I
p)" '(
m-1
p)' ,,.,

_1l'(l -piw"'i:(n)( k )
,_0 I 111 - 1

/1
( Ill
~k)

therefore the sum of independent binomial random \aria hies is also hinomial.
,
c) P11 (m) - LP, (l)p~. (m-1)
"
68 Student Solutions Manual

., ,_,
~ a.t -n. a, -tl
- L. - e x - e
1 I /! (m-f)!

= a ,(:
m 1 '" ' ' I I Ill.I ( _
{.( , )'

m! ~~ t!(m - /)! a2

( 11~)-
(1:

a,+ a , )m e (a' ~a.)


.
( m!

Therefore the ~lllll of independent Poisson random vnrinbll.!s b abo Pniso.,nn .

@ /. .\T. .h ! (X,J') I,O ~ x ~ I.O ~y~ I.

F (.:) = 1'(/. ~ .:]


- r[ \} ~ =]

= =+ f r (~l'lf
T

== + f=/x clr .: .ry

= =+ (.: lnxf
=:-.: ln.: X

f (:} = ::. /~ (:)


= l - In = -~
O s .:~l

othcm ise

@ \'. }art! RJ) leigh random \ariables "ith a. = fl = I. / XIY. l"or: > 0

p [/ :] = I' [ \' !}' ~.:]


= P[.\ ~ =r]
Ch. 5. Pairs of Random Variables 69

r[~ s :] J Ix xe_... -' f = Iv ve_,.: '


I
t
T

~

= I.lb xe -:
' ' [e-(.
)! ' ]

= f cLr xe :('~Y
I -~
= =
(t+ ~1 -) :! +I

x=--
ll' += 11"- .:
2 .\'= - 2-

' I ( II' + z II' -


: . .fuz (ll', : ) = 2_/n -2- ,-2-
z)

b)

= ~ f , ( 11' ; ).!t (w ~ ; ) Rl!gklll UI'Jninl


fuz ( II' ::) Z I \P<I I'll! Ill i.tl

- -e
I ':=) -f ...~=j
. e . ' - - - - - - -.\"
2 '---rl '---rl

II' ;;> - ; 11' >z

=-e .,. for 11 > 0. - 11' <:: < u


2
70 Studont Solutions Manual

5.9 Pairs of Jointly Gaussian Random Variables

{' I ,~/21
.In (.r.y ) = - - - -
2m:

I he solution imolves matching the coellicients of the pl)lynumial in the c'\ponent


of the (Jaussian pul:

cnc fr. o f' r, => I , , = 2.


2( 1- p )cri
, I I
coc 11 1
0 () )' ::) (

2 1- p
' )

a; = 2
' - 0

cm:IT. of'.q => ( : .p - 0


. 2 I

,.. hi1.. h implies that

a1
2
=4I and a 2 = I.
2

@a) y

/0
Ch. 5. Pairs of Random Variables 71

b)
!I

o I
/:, } IX= ;r.J = m - fl (.r.- m 1 ) = -;-px
a1 2

c) ' l'h( riots iu pa.rlli a) a.nd b) are tlw s;unt' uuly wlw11 f1 =I. lu this t'<t<:e E[''j.'(--"
Jj- .~J, i (',
1
tiln u = 2'' t<m
')
_fl =
tan tl
2 ttlll
, = v:;1
0

1 4
o = - un1an - - 0
2 ;3

V AR[XIvJ + E(XIy)
2
\\ here w a.'>!lume [..\1 = (} ] = 0
'l
= ax(1- .,
p) ..J..
( ax )z
p-y
0"}'
2
= E.([X'2Y pJ] = (Y2 f.j.\ 2 IF]]
2
- t.'(a~ {1- p 2 )Y2 + /'~1. 1 ]
IT}

- n}af.-(1 - p") + p2 a:
2
t'[Y1]}
<7y ..._,_..
~lmwn llclow
::1 :

f10m 1 ;1hlc in Appendix A


wlt,.rc n:.t =!I

r (~J
72 Student Solutions Manual

r (~) = ~r (~) = Hr 0)
= ~vhf
us 2~\l'i
$.u 2 ( tzf
1
- 3a

5.10 Generating Independent Gaussian Random Variables

xl I
- - = ln - -
2a, 1- u

= 2a~ ln--
2 1
\'
1-u
I
x= 2cr 2 1n--
l -u

I h.: hlllowing Octave cod\! produces the imcrsc:

function z rayleigh_rnd(s)
u = 1and;
z s . * <2 . * 1 og (1. I (1-u l ... <1 I 2 l ;
end

~I he li.lllm.,ing Octave code generates the requco,flu pnir!'. and plot:


X notmaJ_rnd(0,2,1,1000);
N normal_tnd(O,l,l,lOOO);
Y X + N;
Xt y. I (1 + 1/2) ;
etr X1 - X;
figute;
hi s t (err , ( - 3 : 0 . 2 5 : 3 ] , 4 ) ;
m .. mean(err)
v .. var(etr)
Ch. 5. Pairs of Random Variables 73

Problems Requiring Cumulative Knowledge

@ a ) The number of items bet\\ccn consccuthc inspections ss a geometric random


variable \\ ith pm r

PI \1 -m] = p( I - p>"' k = I. 2....

b) The lllllC between in!>pections is the sum or the /If mtcrarrival time~:

1/
T =L:X,
1 I

where the X, arc iid exponential random variahlcs "ith mean I .

/, (/) L' .1, (I I,\/ = i)P[ ,\1 = j J


I I

I he sum ufj independent exponential random variables is I rlang:

f (I I \1 = .) = A.e- J' (A.x) '


. I } (j- J)!

I hl!refore

l (f) - f. A.e .tr(A.x) ' ' J( l - )' I


./ ...J
J-1
('-J)I
1 . I p

l ~ (A.x(l- p)) '


"' I
- Af?e ...J
, , (j - 1)!
=A pe 1.1 e hH - rt
- A.pe ,.r
:. T i<:> an exponential random variable.

c) Choose p so that

0.90 - pt T > t] = e-r


I I
==:> p =-ln--
0.90
Chapter 6: Vector Random Variables

6.1 Vector Random Variables

@ a) l he prohnhilit) is giH:n b) the volume of the !'>phcn::


P[\ 2 -r Y1 +/ <. . r) = 4 JTr'~= r'. r I
3 4JTI

/4 = I if the Ath llnl\\ is black Since the urn hac; I R, anu 2 W. 1'114 I] =t.

a) lfthe hall is put bad, in the urn. \\C have tlm:c Bernoulli trials:

. . ( 3 )( 1) ,~,. (2 )'' t,.,.q


pl (l.j.k) = - -
. il itk 3 3

The vector of runuom 'arinbles is then:


\ = 11 +I,+ I , X e f0.1,2.3}
) = min(/,.1,. 11 ) r e fO. IJ
l=ma\(1 1 .1,,1 1 ) Z e {O.IJ

unu the joint pmf of J ( \ , }./.) is tletermined by the 1()110\\ ing. marping.:

l
X ) /
000 0 0 0 Pl [OOOl =(tf
001 0 I 1
I Pl [l 0 I] = 3 (t )( t )
010 0
100 0 I Pl[20Jl =3 (~ )' (+)
011 2 0 I
101 2 0 I Pl [31 11 = (1 )'
110 2 0 I
Ill 3 I I

74
Ch. 6. Vector Random Variables 75

I he marginal pmf\ are found from the joint pmf:

1
PI \" =0J =(f ) P[r =OJ= 1- (+)~ 1,/ - 0I =(f)'
fl( .\' = IJ =J (+)( ;l Pfr=IJ =(tf /'[/. 11 =1- (t f
2
?[ \' = 21= 3 ( t ) ( t)
P( r = J J- ( +)I

We obtain k by integrating the pdf and selling it equal to one:

n)

b) h l ' l .r,y)- ~ J;:(x I !I+ z)dz-; (.c; 11; ~~


\\here we intcgrnted over z. The conditional pdf o r /. given X and ) is then:
!xvz(:c,y.z)
/7(Zj.r, !J ) =
f.n' (x . y )
= .1:r+u+z
+ Y "t', 21

c) The marginal pdfofXis tound by intcgrnting the joint puf'ofXand >':

1
l, (X) =t (X + y + t) CO' = t [.\)I:, + 1
2. [ 1- t .rl:, J=f l.r + II
76 Student Solutions Manual

{):;ing lbc resull from E\ample 6.7

= /x 1 lXl}fx:(c2lx,)Jx,(xslxhx:z)
I 1
= 1-
Xt
-
r2
for 0 < .13 < :r2 :r, < l.

rl -d.c.- =- 1') d 1 In3 -IJ- - -In :r:;,


h,t.r:l) = f
r
d.r3
.I"Z": X1:r2 0 l'~

WP cuultl also lind the mar~inal pdf of X 2 by noting from the way the cxperirrlf'nl i!! dP.fined
that:

Thu~

b:. (.r
Clearl) X1 i uniform in {0,1). Nevertheless we carrj out thf! integral to lind fx 1 (:r.1 ):

h 1 Xt) = r 0
1
tfX2 { .
Jo XtZ2
Jr.s

= r~ J.r.~..!.. = ' o< ;(. < 1 .


lo x1

@ l'hl.:joint pmror r,. x~.x).x-1 is multinomial :


:1)
J>l \ ', \'2-
.\,., - .\ 2 ' \''-
- X, , ~\ '~ --.\:~ ] -- I n!
I I I (')''(I)'
-; I (')''(I)''
i 8
.\'1 . .\",. \ 1 ..\ I .

Pl .\

h) I h~ margin.! I pmf oL\1 \~ i s obtained by summing 0\t:r '.:r:


Ch. 6. Vector Random Variables 77

=
( 1 ) '' ( 1 ) '
J ~- L (n -.r
,
I -. '
r )'
."
"'
' ~ I ( t )' (t )" .., .rl '

xl !x~ ! r,:ll x~ !(n -.rl-.\'l-.\'t )!

={ !' ) (+)':
~ l1!
.;__;c._.:.....;...;______ _ ( -I i -I ) "-' .1.

(n -xl -x2 )! ' 3

w hcr~: '' c u-.cd the Oinomial theorem for the ~umrnat ion.

6.2 Functions of Several Random Variables

@ a) Z. = [ V J= [ 1
(! 0l 0 J [ .~~~2 l IAI =I
lV

-------
1 1 1
A

-Yt - =U
X.--.

x2 - V- X1 = V- U
x3 - tl'- x.- x2 = w- ''
(!f.)
fz_(u, u. w) = f.xIAI I ,_,!!.
~=
= h:(u.,.- u, w- )

b) fz.(u,t.w)

a) Let the au.iliary function be ll' = l" then

J (z- .w\
'
=I (1~-=F 0
-~~-=
l
I= __ u_
(I - z J~
aud

= fxy :w ) lwl
Jz,w(z.w) ( 1 _ z'w (i-z)2
78 Student Solutions Manual

fz(z) = j.~ fxl'


-':\")
(-=
-w-,to) ___:._u.;...!>)~
J- 2 1 - 2
(
du

h)
fz(z)

'L hat is Z is uuif. di;,t . in {0.1 ].

6.3 Expected Values of Vector Random Variables

@ /[MJ =thl \'.1 +!EIX2J=1f+t-}= l J.= I

I . \ ,1 - \I
N Ull!llUl - .\' -~=~ I
' ' ' ' .tlCll 1

/If J =E[t(X1 -M) +t{X)-.\l)~]


2

2
=tE[t(xl-x2 ) ]
=f( !.l.\'1 )-2[ .\ 1 ]EIXl]+fX; l]
= l[...t.-
a _.: '-) + ..l..J = 1. = 1..
j_j_
..1 ,t 8 4

FIM /' 1- r~[1(.\ , +X2)t( XI -xl f]


= rl; [ ( .\',' - X J) (X 1 - X2) ]

=.1.1b [''[ \''1 - \': \'


2 I - "' I " 2
v~\' + '\"1 ]

- t /I,\ 1' 1-t IX, JE[XJl


~
,

To find EIX' l for an c\poncntial mndom \ariahlc. ll'l! lhc thanu.:h:rbtic function
in E:\amplc 4.43.
<J) , '"(II') I = - 6j). I = -6_j). = /C[X ' l
). ~
1
o ( ). - jw) o

~ Fl \ ' ] = ;,
Ll \II l=tf--t=t.
Ch. 6. Vector Random Variables 79

@ a) Using the pmrs found in Problem 6.5a:

FJ \I = 3xt= I

[)']=1x(1)' =z17
( / J = I (I -(t) I)= ~~
X

Ne;\l, \\C c.tlculute the joint moments:

ur t
E[., , 1= 3 x 1x =
E[ .\'7. J t+
= IX IX t+ 2X IX 3X I X 1
27 =I

F[ L/.1 =1 1 *r =
1
x x( 27

f~l X 2 I = 12 X t + 22 X t + 3, X ( t ) = ~:
1

~p 2 I=I ' X ( t)' =211


r z 1=1, x -rr = ~~
2

Finall} the covariance matrix is:

111'J
27
1- l xJ.!?_
I

~ 2(~1~)~~
1'1
l
.l
27 ,,

=[~ ..
2
:!.7 l7
~~.

n: !~:
8 I~!
!1 ~ 17:

@ a ) 'I he linear trans formation oft = (U .V,IV) 1 in tcrmr; of J: =(.\'1.X, . X,)T is:
u-x,
r' =.\' +.\'
1 2 mi =Q K J.. - I :l iid Gaussian
w- x, t X 2 -+ _\ ,
and so

> - [:
I
~ ~]x
I I
I rom Lq. (6.3 I):

A,-,IKiA'=AA'=[: Om~ O}[: ~ i]


80 Student Solutions Manual

o) !"rom I q (6. 10c)

K = K,A'=.I'=[~ O :J

@ ~) 1'( w) - [ejrd'J = !ei'L'(rXHl'+clJ


- eiu'cox.l:'(mc, hu)

b) ''(w) - e)ll'C<h. :\!,Y


r (aw , bw)
- + 2wl).Pl'(tVJ + W:~)lu,ct1w,t~c/,u
e.JWC<f>v(w1
- d cPu((a + 2b)w)~~((a + b)tt)
11

- e'u.-c exp [- ~(aw + 2bw) ] cxp [-~(aw + bw)~]


2

- ""'c exp [-~u2 (a 2 + Jab; lb7 ,- a7 + 2ab + b2 )]

- e1"'c exp [- iw 2
(2a 2 + 6ab + 5b
2
)]

j\'(v) - 1
/2(2a' + fiab + :'ib
2 2
)
exp [
2 </1
(v- c 2
+ Gab I 5b2 )
l

( IJ. () - +<TJ{t-l) ,
.. - e

X 1 nnd .\'2 are im.lep~'ndent

Gx,,.\ 2 (= z1) - E[zf'z2 -~) = l lzf']E[z:l''-]


- G1 (zJ)G'2(z2)
= 67'0th-1l+ .\ -1)

In Problem 5.C)2 '"c ootaincd these results using the convolution ufthc pml" of.\, and \~ .
Ch. 6. Vector Random Va riables 81

@ a) J irst '"c need to find the eigenvalue~:


del [ 1-...! ~] 2 , (
y; I -A =( 1-J..) -..L=,{
,, -2,{+.!1=(,{
II>
-1.)
~
A. -1.)
I

Nc~t. \\C find the cigcmeclors:

[
I
11
Y.][e,]
I e
=f[e,]
e
11 l ~

e1 -1le -1. e
1 2 - I I

te, t-fel =0
e1 - If, IJ '
L', " II'
e, [i-JrJ' e, -[i.-iJ'
In the last step. \\C normalized the eigenvccto~ so they have norm I .

h) P io.; gi\-cn b)' the matrix \\<ith the eigenvec tors ao.; co lumns:

Pinolly we veri I} that P diagonalizes the transl(lrmation matri\:

l' ' AA 1'- (l)


J2
1
I
[I -11][1 Y.][l I] [Yt ()]
Y. I I -1 0 X

c) rrorn ... q. (6.41 ):

\ ""' /I}
= [I I][I'] [I] -Jr[ I] -Jr[I' 1',]
-j; I - I
I
y1
= r,

1
7 I
+ l',
.- - I
= I
+
y, - y.!

82 Stuclent Solutions Manual

6.4 Jointly Gaussian Random Vectors

K l
\

[x~- 1 .\'2 ][~.1 X


~]['~~ 1 ]= [x1 -l '"~
1 x,][ 3(.' 1 1
b) IJ (r)
/ 1 ,\ 2 (\ 1 - I ) tJ.\.1.

=1[3(x - 1
2
1) t.\ 1 (x 1 I) l .\ , (.r1 I) 1 Jx;J
= ~ [ (x1 - I)' +xi +t r , ( r 1 - I) J
C\P {-~C)[ (x1 - 1)
2
+ x; + ~ x2 (.r1 - I)]}
2Jr.fi

"here '' c 11'ed the mt:.tn anti


\'ttriancc lor m, anJ k., .
t!\p {-~<x2 ) 2 ' (312)}
!, ( ~ ! > .ffiJJ/2

d) A = [~ ~] I [-1~I]
- .J2 P--
- 1
for K,

A=I'' -J2I [ I ~I] K, = A =[~ ~]


-1
m,
J:?
I
:]
c) tlcti K, I 2 K -1-[1 OJ
' - 0 ~
Ch. 6. Vector Random Variables 83

@>a) A. [~ ~] Q~ =[X0 ~]
M o ~] [y, () y,]
A,= 0 I 0 Q, = 0 I () lkt[K, J=2
[Y. o M
-Y. 0 !.

h)

=
ex+H 1
x, - 2 + ,;[!- :)( "1 - 1)+ ox;])'}

t662'
~ we necu to co cu ate:
.I ' ' <J) 1( w ) - - J.' .,IAII . 1'11c terms 111 t '1e expo nent are:
= e Jlll/11

[wI
.l 1[']= .
w2 O jwI

-l(w
..! I

-l[J.ll'~ - U'1
--~21 II' 2+! 2
. !ttl J
84 Student Solutions Manual

6.5 Estimation of Random Variables

@ ) r
i) ii) iii)
\ 0 - I 0 X 0
I Jl,. Yt. - I ~ ~ y, ~
,K }(, y, y.
"
0 0 0
Jl,. }{. y, }(, y, ,K

From Problem 5.61 vvc have the terms needed to cvaluult: l q. ((L55):
COVI.Y. )' 1- 0 COV[.\'. )'] = 0 COVI Y.rl =f
V/\Rf\ j - ( l) '~ t{l)' +
VARIXl =t V/\R[ \') =f
=t'
VAR(YJ =-f Vt\RPI =t
VARI> I pq =0 l.1
p ' - () P \l = ~~ = I

\' - 111 \ 0 1' = 0


A

a) )' = Pn <T, +m ,= Y =X
0" ,

@ I ir~l \\C {1btain th~.: marginal pdfs. so "e can calculate the rcquin:d moments.
/( .\ . .J'. : ) = t (r + y + :) 0 ~ X < I. () < y < I, () ~ : ~ I
((x.y> -+[x ty+ !] O~x~ I, O:S: I' I
f(x) +[x + l] O~x5 1

a) I he moments ore then given b;:

,., '\ I : -f 1>(X+ I) (b' =1[t + t ] = t t =i - I p I II / I

;I
'
\' 2 1-- 11 j(' , .2 ( ,. + I ) (/, -1.[.!
' ' l -1

+ .!.)
- l
_ 1. 2.. _..::..
- l 12 - II
1
'
v \RI \ I =,'~- ( tY = .~- i: = o:~~ = .~ =v \Rf I > \ \RI / 1

1:[.\T I =t f. f xy( x+ I +t)dr =t[f. f. (x y t-.\/ +t.,y)cl\(~\'J


2

= jr '" [ "~ +
I 1 2 +]
~ + x .!. +.!. _ =1. [ +J. + ~
l J. ++.q.,
~ = J1
l .::,;. 11o
I I I
Ti Ti 11
Ch. 6. Vector Random Variables 85

(. O VI \' }' ] -11


- "' -
(1.)
'I
1
-
-
99 - 1()(1 -
lH -
-=.L
31~
almost uncorrclatcu
- COV[.\.Z] = COV[1'.LJ

I he optimum linear estimator for r given.\' anu /.IS:

.\ = ( a1.a2 )[x- m\] + m1 =-0.04( x+ y 2( ~)) +~ =- 0.04(x + )') + 1.08(t)


: -m/.
" here from h .,. (6.63a)

"] - [
[a
2
VAR[:\'~
CO Vj,\ ,7. 1
COVIX,Z]] '[C.OVIY..
VAR[Z]
. '---------------'
COVP,%1
~\'1] = [
-
n:
l
21
!'] [=~J =[=0.04]
Ill!
I
0.04
nt

6.6 Generating Correlated Vector Random Variables

det IK- ,\II - ..\2 - l);\ ;


.\1, ..\2 :1 \/2 eig~>mnl ues

The u 11 houv1m.d Pigcnvcctors are:

A
-
p D 112 = [ ."0 10 I
1.94 107
1.163
- .4~190
121
A = [ .80l01 I.16:H2 J
1.9!101 -.1 '190
Check
\ l+- [ .80101 L16342 J[ .8010 1 J.tl:H07 ] = [ ~ 1 ] I
It l.9ll07 -.48190 l.lG3 J2 -. 18190 I 4
86 Student Solutions Manual

@a)
t; lk] = ~CfX~:) + ~CIX~:-d = 0

C0\1( \ ~ l'i-) Eflili.) = ~Ef(X;. + X.t-,)(XJ:' -t X~-dl


+( \",. \";,.r.!.. xkx,._, +- xl_,.\.~; + .\~:_,x". ,
Sinr.e the X~;; 's are independent. lhe above terms are all ZPlO txn:pi when 1.: - For 1. =- k' -1
or J.. =
l.l I 1. 1'11,.11

1 ! f)
:j" I
0 0
! 1 ! 0
... /( = 0
I
1 11
t
1
.j 0
whrH'
UO\ { ." XJ) - \
0 CO\I(X" .\ n) = ~
! 1 !
0 0
ol
0 I
4
1
~

h) 'I h~ ltlllo\\ing Octa\e code generates a sequence nf 1000 ~ampk~:

X n ormal_rnd (O,l,l,lOOO) ;
Y (X+ (0 X(l:length(X)-1)))./2;
cov(Y);

1\
I
= [X11 y,J
X
I' - [ YJi]
)!.;,

a) Consider n causa l trnnslormation matri~:

[ah O
('
J[ X - y;][a
.X 0
-~
bJ =[ I OJ
(. 0 2

a OJ [ Xa y; h - ~ c: J [ I OJ
[ h c -Yz a -Yz h +~ c = 0 2

Match terms lnr the entries in the matrices in the kli-haml !"ide to th1.' ctlrrcsponding
entric-. un the right-hand side:

a=Jf
Ch. 6. Vector Random Variables 87

~ah -tac =0 :::> 3b = c


} h z-the: +-}c2=2
j h2 -h(Jh )+1(91J2 ) = 2
12h
1
=1 !f
=> h =
=> (.' = 3/f = Jf = Jf
I hcrcfi.,rc:

0 J and
, J_
[.ffi
JX..JX
A K.1 A 1 = [ O
' 012 .

Problems Requiring Cumulative Knowledge

a) If \\e assume the signals are zero mean. then th\! cornpon~.:nt~ of~ correspond
to the jointI) Gaussian random variables in [~. 5.1 H "hich arc transferred into an
independent pair 1 b) the inner transformation given in I ' 5.45:

A--
- J2
I [ I I] I I

h) Consider how two consecuti ve bloc "-s Kt and jl arc lranslimned into It and Y-,:

"hich C\pnndcd gi' es:

}"
I I I 0 0 x,
>; I - I I 0 0 ,r,
r, -Jf 0 0 X,
)' 0 0 -I
I x-~
A'
88 Student Solut1ons Manual

I he em ariuncc mntri\ for 1: is:

(j + per 0 l...r
- 2- -~
l
, .
() u ' - pu- -,-
1'0 _!!._
II\ t' = 2
!!:._
~
{'0
T (]" + pa ()

J1<1~
(tn
--2- - -,- 0 (1 prrz

It can he seen that the components of I are not inucpemlcnt.


Chapter 7: Sums of Random Variables and Long-Term
Averages

7.1 Sums of Random Variables

@ 1~1 X+}' +L] = E[XJ t- EJfl+ E17.] =0


a) rrom l:q. (7.3) we have

VARIX + r + Z] = VARIX] + VARI )'I-t VARI 7 1


+ 2COYI.\'.)'}+2COVfX. Lll 2C0Yil'. l l
= I + I + I + 2 (t ) + 2 (t) l 2 (-f )= 4.5

b) From Eq. (7 .3 ) '"e have

V/\RI \' + f -i Z ] = VARI .\J + VAR[r] + VARI / I -3

@ a)

= J~<Pz("'-')l..,=o = J! <f>'y(a....,)ll~> (lw)lw=O I <P~ (lx..:)b<Px(a....:!t.,.=o


1
b) f [Zj . .I
- a[XJ + b[1''] = JE[Xl - 7 HI r I
f[Z1J - -t~(~>
- (ci>:~ ( o~ )a 1 <I>d lx..) -'- 2<1>:\' (aw )atJ1 ~ ( &w )b + ~ x t cu.: )<I>'{ (b...: )b:l]t.=O
- a b2 [Y 2 J 1- 27b(.\")(} J
(.A. .'J -1.

ll AR(ZJ - (Z2 ) - (Zf = a 2 \ 'AR[X) + b2(} ] VA R( rj = 91 ' t R( .\ I + -t91: IR[> I

89
90 Student Solutions Manual

@ #) Note first t1mt

E.(S/~ = n) = [t .~\;~] =
k=l
nE[X) ,

thuc:

f{S) - f[[S/1Y)] = E[.VE.[ Y]) - VJ( XJ

t:[S'JN = uj - & [t,x. t.x,] -t,t,c[~,X,]


2
- n[ \ ) -t-n(u- I)'"[.X]l

since E[X1 .X 1 ) = ( x:z] if i - j and E[XaXJ] = t:[ ') 2 ir i "f:. J. 'I hus

( " 2 } - t(XE)\ 2 ] , .S \'- 1)f(.\1 1


= E. YJE.(..'\ :!] + t( V7 )[X" f( ~'jf[ 1 2

I hen

\ r\Hr...,, - t!S' 2 1 E[S} 2


- f[N]t"f r 2 ] + [N 2 )[X~] f[N ]t'IXJ.z- &[N]2[X] 2
- f.[N]l AR[~\] f- VAa[N]E[.~'\f'

b) HN>t note that

Tht>n

[z5 ] - E([zs-IJ\)
- f.(G~(z))
- ..."'w rv] (z)
Ch. 7. Sums of Random Variables 91

7.2 The Sample Mean and the Laws of Large Numbers

- -=-

@ F o r n - 16. Fq. (7.20) gives

P[j \f . Oj < t J~ I - _ 12_ = I - _I _I


'" 16c 1 16 c 2

Since ,\/If, is a Gaus~ian "ilh mean 0 and variancc1c;


12
r>[l \111, - OI < L] = r[ -c < AI,1, < c]1- 16, . = l -2Q( ~)
= I 2Q( 4c)

Similar!) for 11 = 81 we obtain


I I
r [IM - OI <~:. J~I ---2
~~ 81 c
P[IM 81 - Ol < t:] = 1- 2Q(9c)

For example il't: =f

P[l \1 ,,1 < !] ~ 1-lfr = 0. 75


1

r>[l \1,,1 <1] = I-2Q(2.0) = 1- 2(2.28x 10 2 ) = 0.954


P[IMul < !] ~ 1-xh = 0.951
P[l \/ ,1 <+]= I- 2Q( 4.5) = 1-2 ( 3.4 x I0
11
1
')

Nolc lhc signiricanl discrepancies between lhc bounds and the exact values.
92 Student Solutions Manual

7.3 The Central Limit Theorem


,
@ The rdc\ ,tnt p<tr.tmdrr<; are n = I00. m - np 50. a - nptf 25. 'I he Central
Limit I hron:rn thrn g 1\C<;:
P( 4 o ~,v:s; 60) = P[ 40 - 50 :s; V-m :s; 60 - 50 ]
~
.fjj o- / 1.5
..._____.

~ Q( -2 )- Q(2) = 1- 2Q(2)
- I 2(2.2R) x l o-z = 0.9544
1'[ 50 N <55] :::: {?(0) - Q(l) = y- 0.159 =0.441

@ n NO). 1 1
/(S ,] - nA- 20

1k-!
1.-+~ e-(cr-:ZO),/Z(?O)d.,.
... a. per Eqn. 7. 2H
/2;;{20)
e-(k-20)'1 to
as per Eqn. 7. 30

A comparbon of the c\act value of P[S'n = I.. I am.J the a htl\C nppro\imation i~ gi.,en
bciO\\ :
~ Pui .,~on npprox. k Poisson apprux

0 11.000000 0.00000 1 21 0.084605 O.OSiOil:l


l 1},000000 0.000010 22 0.0760 I :1 0.0!:)0'117
3 O.tlUUOtP 0 OOtlOt' I ~3 0. 06fi 1 O.O'tT2:32
0 0000 I:J () 0 (1(11 ~ ~ 21 0.05!)731 0.0597%
5 0.000051 0 000321 2.1 0.0-14587 0.0177 1!:'
G 0.000 163 0.000(\Gij 26 0 03-1298 0.03G26S
i 0. Otlll.i :!:3 0.001 'W1
.,-
_, 0.025 10() 0.02G:.w~,

~ o.0111 :ms 0.00!!~37 28 O.OIS117 II Ol~OlU


9 0.00290S o.oo~:i:tJ 29 0.012!11;1 0.01177-1
10 0 005816 0 00i322 30 0.008343 0.007,122
11 0.0111575 O.Olli74 31 O.OO.j3":.! 0.004331
12 0.01 iG2j 0.01 lilt) :~2 o.oo.J364 0.00213i
13 0.0271 I 'i 0.026205 :n 0 00203~ 0.001304
J1 0 0.1S731i 0.03fi'2G.., 34 0.001 l99 0.000664
15 0.05164\J 0.047i4~ .Ia 0.0006&3 o.ooo:Ll
16 11.064561 0.05Q71Jb .iti o.oooa.:o 1).00014 ..
li 0.075954 0.071Zl2 .n 0.000205 0.000064
18 u 081393 0 lb0717 38 0.000108 0.000027
ltl 11.0 g 31) 0 OSiOOtl .{9 0.000055 O.OUOO]{J
20 0.0 88:1;, 0.0:>9206 .tO 0.000027 0.(10000 I
Ch. 7. Sums of Random Variables 93

@ 1 he total number of errors S 1111r is the sum of iid Bernoulli rondom variables

.c... , = r, + ... + ..,,.,


1:.[ c..., .~, I =- I OOp = 15
VARI \',,.I = lOOpq = 12.75
I he Central Limit I heorem gives:

PfS~t"' < 2UJ = 1- PfS, 00 > 20J

= I-P[S100 - 15 > 20 - 15]


Jl2:i5 .f0.. 75
~ I-Q(I.4) =0.92

@ h~:
I number or faulty pens in the duration nf I~
wcd,s b a Poisson random
\ariable \\ith mean 15. According to Problem 7.34 "e have

for a > 15
Thcrcfhrc
t.> " '"1" ' ~).... - ' 5 =0.0 I
~ - aln (.~ ) t- a 15 =In 0.0 I
11} trial and ..:rror we lind a= 28, so the student <;houiJ bu) 28 pens.

*7.4 Convergence of Sequences of Random Variables

u, UJ = e

ll2(~ ) = ~
l/3( ~) = ~

0
94 Student Solutions Manual

c'

1 - - - %1 l~)- t -<t-1 )

- Z2(~) = ' -2(2(- 1}


0 1
1

Ch. 7. Sums of Random Variables 95

b)

U,.( ) = ~

! {
"'
{
. 2 {
3 (
4
...
I I l
n
1 2 3 4

W,(O =<en.

~eJ

{c2

!e
4
ee
...
I _I _l
n
1 2 3 ~ 5

Yn(e = cos 211'n( = cos i"


.

+1
...
I
0 n

-1
1
t 3 4 5
96 Student Solutions Manual

1 2 3 1 5

@ \\ <.' arc gt\'en 1hat .\" X ms and ) ~- }' ms. i"'cmsirlm


2
((( Xn + \ n)- (X+ }'))2] = E[((Xn- X) I (1 n- \')) 1
= E (Xn- :\), [() } )2 ]
-f 2 '[(X - X)( l n l .

Tl e firl!l lv.o terms approaclt iero :::ince X,. - t \ ' and )';.- }' in me11n square sense. \\e
need tu how I hat the last tenn a)so goes to zero. This re<1uires the Schwarz Inequality:

When the iw.:qur~lity is applitd to the third tem1 we hnw:

El(l'\,t+lr.}-IX+l')) 2 j ::; E[(X"-.\f] t l[(\'n-1fll


+2/t:I(X,,- XF1JBI()~ - V)'l]
= tJE!!Xn- XF] ~ .Jqp
(l ll!l 1l _, 00

'J u ptO\'o~ lht ~r.hw<nz IJlcqunli ly WP take

nul 111inimi:t.<: with rc~pccl to c:

_i{B(Z 1 j- ~aE ZH') ~a.: E[11'lj) = 0


da
2[ZW) + 'ln C[li''J u
Ch. 7. Sums of Random Variables 97

E[ZWi
:::} minimum attained by a = Efll'~]. Thus

. r _ 2 _ E(ZWJ 2 e[ZW] 1
0 $ E[(Z +a l1 )~- E[Z J- 2 8(W2J + I:;(W'll

:::;- E[Zil'F < E(Z 1 j


E tPJ
:::;- E(Zll') < JE[Z2JJ E[W2) as required

*7.5 Long-Term Arrival Rates and Associated Events

@ l.d ) he the bus interdeparture time. then

r- .\'1 + .\'1 ++X,. and [}"] - ml:.l \', I- ml'

long-term bus departure rate =-I- = -I .


Eln m7

@Show {N(I) ~ n] ~ (S, ~ I}.


u) We lirsl show that {N(t) ~ n} => {S,, ~ I}.

rr (N(f) ~ nl=>t ~s,,I)= X,+Xl+ l X VIII

~ .x, + + .\', =s,


=> l'l <t'I
f l:' , -

Ne\t we -.ho\\ that {S., ~ t} => { V(l) ~ n). If {S, <;; ll then the nth event occurs
bcl(.m! time 1

=> V(l) is at least 11

=>{:\(l) ~ nJ ..J
98 Student Solutions Manual

h) 1'1 \{l ):... n) = l - 1'[\(f )~ n + l]


= I - 1'1 S, ~ tl

=1-(1 L(a7~
' k.
e""''')
=L e-UI( a l)4
0 k!

but .\ , 1 i~ an I rlang RV 'IO b} Cq. (-L57) \Ye have lhat \'(1) 1s u Poi ~son 1<IIH.lom Htriable.

@ flw intl'ntp lnnHH'llt tinH! is

,. { X, if \', < 3T that is, ittm l11cnks dow11 hdnrr :lT


J,, = 31' if .Y, ~ 3T tlwl is, item j.; 1cplnced at timr- aT

whcu the X, ar,. iid t'.Xponcutinl m nt!orn \'ariablt!s with ownn X,J T.
Th mean "f .V, i :

t[.\,) - fo 3
T x-f~ -~ITd.r + 3TP( x > 37'] T l - (' )

a) Thcreture the

lon.!!;Lerm
1 1
rep latement
. [X) = T(l c-3 )
ratP

b) I..t>t
1 X,~ 3T
0 X,< ~~ T

'I heu
f!CJ = P (X, ~ 3Tj = ,- 3

:. loug ttrm JBI P at whirl! '';orkiug compoueut-.. m,. 1 cplnc d I"


Ch. 7. Sums of Random Variables
99

@ a ) Sintl' the age a(/) is the time that ha clupscd fmm the Ja.,t arrival up to time 1.
then

c, - I' a(t'>dt' = I' t't"' =2x~


., he figure bcJm-. ShO\\S the relation beh\CCn u(l) and the (' ' s.
1

c) I rum the abO\ c figure:

11
lim -I
I "" I
r au'>dt' = lim-1I 2:
j, I >Y
'"' r
IJ, I
'
au'>dt'

I ',,,
= Ilim -
. ... I~
' CI
t=l

d) For the residual life in a cyc le

c: f ' r(l')dt' = f ' <X, -t')dt' = -~,' -('


1

-:>same cost as f(1r age of a cycle.


100 Student Solutions Manual

*7.6 Calculating Distributions Using the Discrete Fourier Transform

@ I ht.: f'o llowing Oclnvc code produces the required IT I s:

N 8;
I? .. l/2;
n = [ O :N-11;
ems= fft(hinomial_pdf(n, N, P), 16);
%You can also evaluate the characteristic function ditectly ...
%w ~ 2.*pi .* n . /N;
\ems"" (1-PiP. e."(j. w))."N;
pmf ifftlcms. cms);
figure;
stem([1:16), pmf, "b");

@ f he li.>IIO\\ ing Octave code produces the ffoT to ohtain th~ pdl ol i:
function fx ift(phix, n, N)
phixs [phix( (N/2+1) ::tl) phix(1: (N/2))];
fxs f f t.(phixs) ./(2. *pi) ;
fx [ftshifL(fxs) ;
end

N = 512;
n = [-(N/2): (N/2-1)];
d 2. *pi. *n./N;
alphnX 1;
alphaY 2;
phiX l./(1 1 alphaX."2. *n . "2);
phiY 1./(1 1 alphnY."2. *n . 2);
phiZ c phiX. *phiY;
pdf ift(phiZ, n, N);
figure;
plot(d, pdf, "b");
hold on;
plot(d, ift(phiX, n, N), "g");
plot(d, iCt(phiY, n, N), "r");
Ch. 7. Sums of Random Variables 101

v ,.
a, ~n - A1 + "'2 + ... + ..,,1n, ,c.,,.
~ . ('
ts
.
~auss1an

E[S,.J - 1l }I
l AHI <;',.] E{it.\1 - m) + ... - l.\"11- m)j 2)
= (o- 2 ..!. pcroz\- (pJ 2 + 0'7 ~ 7w 7 ) + (pl-r2 + u 2 + pa 2 )
+...+ (p~ ~ a2 +paz)+ (l)(Tl + 172)
na"J + (l ~ 2(r?- 2) -1 l]pt7 2
(n + (2n - 2)p)r.r?

b) Suppose n;::: m.

Xm+l + Xm+2 + ... + Xn also (!;tussian


Sn- Sm -
E[Sn- Sm] = (n- m)~
VAR[Sn-Smj- :(n-m)+2(r1-mjp-2J!Ju 2

c) Assume n < m .
.I.
rvSm.Sn (
w1,W2 ) _ E[!;.j""lSm+J~"lStt]

- E[E!eiw!S,.,.+.r..-:zs"ISm]J
E[eJwtSm [~~"lSniSmJJ

_ E [eSm {exp [jw n1 - "'~"' f( n


2 m ~ 2(n - m )I- 2p]]}]

- exp { jw1mfl- T[m


w2
u 2
f. (2m - 2)pll

exp { jw 2 nJ- w~a' f(n- m) + 2(u - "')I'- 2p]}

d) No, since,\', docs not satisf) the Cauchy criterion.


Chapter 8: Statistics

8.1 Samples and Sampling Distributions

@ p = I 0 l'T~ - 4 11 - 9

=1- Q( -t) = 0.0688

h) P(min(.\"1 Xq) >8]=P(X1 > 8] P[X, > R] ... P( \',, >R]


=P[X, >Rf
=Q( 8 1f Q( - l f
= .02 112

c) P( ma~(.r, ..... X., ) < 12]= P(X, < 12). ..1,[ \,, < 12]
= (1-Q{' 2!"')f - (1 {}(1))"
=.02 112

<
d) P[lx, toj 1]= P[ x:-2 / -Jo
..r;;
<-'- ]
2 / J*;;

=P[.,[,; < ~-IO < J,;] -= 0.95


2 21.[;; 2

= "[ - 1.96 <X:: 1,0 < 1.96]


~ ..r;; = 2(1.96) 11 = 4(1.96) - 15 166 = 16

102
Ch. 8. Statistics 103

I h~: Octave command to generate 100 ~umplcs of groups of9 is:


norma~_rnd( 10,4,9,100)

I'o find the sample mean of each group of9usc the fnllm,ing Octme command:
mean(normal_rnd(10,4,9,100))

r rom a <;ample of I 00 we found:


0.07 = 1110 had values less than 9 v~. 0.0688 (the theoretical value)
7

0. I 9 = ,::, had ma,x of group less than 12 vs. 0.2 I 12 (t he tlu:orclical value)
0.18 - ,:~, hnd min of group less than 8 vs. 0.2 112 (the theoretica l va lue)

l'hc maximum and minimum were obtained using the following coue:
max(normal_rnd(10,4,9,100))
min(normal_rnd(l0,4,9,100))

@ a).\'isuniformin[O.O]. E[XJ=1

, ,,_*t x, =1-
I I
=> e= 21i1,

b> !:JGJ =E[2ti x ,]= 2-!;I E1X 1=2fr r1


J-1 1 I

VARIil = E[( 0 -2E[X ]n = E[ (f.~ .Y, -2 /:] I' In


= ..' [( ~(x, l'l))'] - },1

= ;;- c[f. I(
I I I I
X I - E[ X J)( \'1 - I I \' n]
=-;- t !:.[( XJ - ELXJ)] +II H[ x j
2

II rJ] / r \',- EIXJ]


-1 I
Cl

=..!.nVA R[X]

~f,V/\ RfX].
104 Student Solutions Manual

8.2 Parameter Estimation

\', is Pobson. a = 4.

a) f.lci1 I= r.: [X,; r_] = ~ flX 1] + ~ Fl X 1 j- u unhl.t\cd

VAR fti, ]- VAR [ X, +.\'~ ] = VARlX I _ a


2 2 2

b) hlal l ~~ [ \'l;x']=a unbiased

VAR ifx, I= V/\ R [ r~ + X .1 ] =VA RI X I=E:_


2 2 2

c) h[a 1 ] H[ \',+32 r. ]= _!_fX


3
2
] + f[ \' , j= a
J
1
unh1ascd

VARf li, J = L:."[(-tX 1 +fX~ -af] + E[(~ .\' 1 - 1 u .,tX~ a) ]


2
=~E[(x,- a) ]+t t [(.r2 -af] t o
-l.
- ,, r.' .l+ l! a -~a
9

d) Fja 1 l 1.[ \,+ X , ;X,+X.. ]= EfXJ - a llllhia..,cd

V/\Rjti,] VAR[.\'J = a
4 4

= 7; np - ;-[ npq + ( np )
2
J
= p - ':: - ti = ( p- p~ )- '::
'--v---' ;;.
\iJJq,~

crBemobn.

b) A s //~ (/) ti =~ p. .. a-,; ~p(l-p) .md a; bcunsistcnt


Ch. 8. Statistics 105

c) Ef0',~ ] = p ( 1- p) - "( 1 r) = p (I - p) ..........__...


11
( 1--!;) => c =,
n-1
II

<.1) M Sq a-;]= E[ (a,; - p ( I - p)) J 1

=E[(a,:)"]-2 ~ p( l - p)+Ji(J-p)'
1<1 f''1<11 II
II

~ E [ (a,; rJ- p' (I - p)


2

J= E [ ~l (I - ~~ + ~~~ )]
2
E[ ( a,: ) J= H[ (*) 1
( I - f.)
2

= .J... E[ k 2 I- 2
, El k J+..!, E[e )
3
'' n ......___.._. ,,
"'""'''""fir;!
ln{lll\ctth'

These moments can be found liom the generating function discussed in the deri vation of
Eq. (4.86). Taking the first four derivatives of the generati ng function and evaluating at
- I. we obtain the first four moments of the binomial random variable:

G~ (I) = E[N ] = m1
=> m1 = G~ (I) = np
G~ ( I) = E[N(N - I)] = E[N ' -N j = m2 - m1
=> m1 = v~. (l)+m 1 = n(n - l)p 2 - np
G~(l) = E[N(N -I)( N - 2)1 = m, -3m2 + 2m1

=> m, = v.~ (I) + 3m 2 - 2m1 = n( 11 - 1


l )(n - 2) p + Jn(11 - l) p ' - np
( ;~-'
1
(1)- E[N(N - I)(N - 2)( N -3) 1= m4 - 6111 1 +11m2 -61111

=> m"' =G,/ u{ l) + 6m 1 - 11m2 + 6m,


= n(n - l )(n - 2)(n-3)p +6n(n- l )(n - 2)/ -1 7n(n - l)p 2 + llnp
1

where we used the fact that:

G~. (1) = np. G~ (I) = n(n - l)p' . G,~( I) = n(n - l)(n - 2)p'
G_~.1l (I) = n(n I )(n- 2)(n- 3) p '.

We can now proceed with the calculation


2
-;,'- E[k 2 l = ,:- (n(n-1)p - np) = (1-f.) p
1
-+,- ~ p '
-.l. rk ~ J =-~
11 n
(n(n-l)(n- 2)p' +317(n-l)p~ - np) ~ -2p
1
Student Solutions Manual
106

..L
,, J~ [k I =.L
4
,., . 11(1t - l }(ll-2)(n-3)JJ
1

l ., J
4 6n(n - l )(n - 2)p +7n(n - l )p -+ ll np - )o Jl

'l hll<i r[(cr; )2]-) 1/ - 2p 1 +p~ = p~ (l - p)~ and ~ 1 " 1 (a; j 0 Sl) the C~timator IS

com.i-.tcnt.

@ Us ing thl.' md hnd in Example 6.22, \\ e find that the folln\'.ing mntri>.. gi ve~ the
dcs ircd covariance matri~

JJ -I
2 2
A
J3 .,...
2

You can usc the.! l()l km ing Octa\ e command~:

x n o t ma l _tnd(O,l,2,2000)
y A x
plot(X,Y,H+H)
cxyl = y(l, :) . yC2, :)
z teshape(cxyl,20,100)

hlst:(mean (z)) \ ..L "1.""


~ ~
" 1,' . "Ill"' n mean
mea n (mel'l n (z ) ' )
'
\ f. o 1 unknown me ans and vari anc e o
fo r i l : l OO
mx( l )., mean(y( l,i: i +2 0) );
my(j) mean(y(2 , i :it20)) ;
cxy2(i) (xy( i )-20 *mx ( i ) my(i))/19
end
h lot(cxy2)

mPan(cxy2')
Ch. 8. Statistics 107

8.3 Maximum Likelihood Estimation

@a) j(.r)-~e
f}
n x~ O

} ( , ..... , ,.. IB> -n-e


-
I
" I
I B
f, t' -
- -,
(J
I
f}'
L'
,
II

. I ,
In /(x1. .... x, IB) =-nlnB - -
() 1
L \" I
1

0 =d- In .f.(x1 , ... ,xn I B) =--+-,


n I "...JX => nO
1
dO () ()
' I
o~.u =-
II
.L:x,
I
II

h) Hy invariance property:
I
A~ll =-
... -= n
8,1._ .!..'Lx,
11 I

Tr) the direct approach an)\\O)':

n -..IL
/(.r, ..... x, I A)= A"O e
'I

0- ..!!__In
d).
f(:r 1 , ... ,x, I A)= .i_[n In A A
d).
L:x~]- ': - L:x,~ i = - 11
-
II.
L:x,

c) 0,.. 11 =.!_ fx,.a scaled version or n-rrlang random variab le.


/1 I I

From Cq. (4.73):

~~~

= -8.-
I
~ /,.(y)
.fo (+)
=- -,-, y > 0, "here .f, is n-Erlang.
1\11 y-

...
d) 0" 1 is unbiao;ed and consistent because it i~ a sample mean.


108 Student Solutions Manual

rB.29' 1 < > _ na+ 1)


~ 1 ' -- .\
. fl 1_
--x
1 u 1
smce ,~(a+ 1) = a 1(a). () <" X < 1
I (a) a

d d ~
0- -ln.f(x1 ,, ) =-LJ - Ina +(a- l)ln .r, )
t!a cia ~I

- L'(I
1
- I (l
t- lnx, )= --+ n
(l
''
L:tnx,
1- l

~ 11
a- II

L:lnx,
I I

@ Im ariuncc Property
Ml estimator l(lr h({}) linds h* such that:
.f ( ,, ..... x" I It*}= max l (x1......" , I h*)
Ml c~timator lor() finds(}* such that:
.I ( ,., ..... x I(}*)= ma:\ l(x, ..... x, I B*)

let On - h"1(h*) the imer;e image of the optimum h* wu.l suppose that 01 4
0*. the
optimal ~ II I li.)r 0. then

which contmdict-; the optimality ofO*.

@ a ) Binomial

ln/( X IpJ- ~ In k, +k lnp+(n k, }ln(l- J>)


II ( (/1 J J
_Q_In/( X I p)
tip
=Ilk,- 1 fJ
n-k,
1-p
J
:)2
~ ( - -k,, - n - k, , )
c ,- ln /( X p)= ~
tp I p (I- p)' I
Ch. 8. Statistics 109

I i12 I I X I )] ~- ] ~ n- 1!1 k, I
Ef k,-+
-!
[ -r O n ( p =+ ~ ~
rr , , (1- p)
'

2
11 n2 11 '
= - + - - = -- -
p 1-p p(l - p)

8.4 Confidence Intervals

@ The ith measurement is X, = m + N, where hi N, j - 0 and V1\ Rl NJ] = I0. The


sa mple mea n is Af10u = I00 and the variance is a = JIO.
Eq. (~.52) with =,.:!= 1.96 gives

( IOo- ~
1
,100+ 1.~ )= <98.9. 1 0 1. 1)
30 30

@ I he ample mean and variance of the hatch sample mennc; are \fw = 24.9 and
I ;~= 3.42. 'I he mean number of heads in a batch is /1 q \/u.] I \1 = SOp
I rum I able 8.2. "ith I - a= 95 o and 11 I 9 \\ c ha"c
=,, :! ,ll 2.262

'I he confidence interval for p is

( M 10 "'~')fovIll ,i\1 10 + "'-a.Jfuv J=(23.58. 26.22)


10

'I he conlidcnce interval for p = M10/50 is then


215
( 50 ~. 50
26 22
) = (0.4 7 I6. 0.5244)
11 0 Student Solutions Manual

8.5 Hypothesis Testing

@ a ) / / ,: a=30 n =8 meac;urements
~

II a> 30 .\~ -32 => L,x = 256


I

'I he e\~ rimcnt im ohe\ n measurements ofn Poisson random \.trtahlc. \\e tak.e
3
the sum nfthc total numhcr of order-. X= L,N, (eq ui-.. ulcnt tu t.tking thc Mtmplc mean).
I I

1\cccpt flu ifN 1 < T N Poisson \\ith mean 1m 8t.<


RcjcctlluifN, 1'

~ 240
1

~ --(!
WI -\. - I \
' - i"
k!

~1
,rx:.~-3o
r.;>
r-Jol
~ r.;j=Q(1.6-l>
vJO v8 v30t v8

=> ,.. = 30 + l.J!!


JO
= 30.8-l?
.1 32 "> 30.847 => Reject H 0

@ 1\ssumc thnt X11 is used in les t.

1111 : \ is Gaussian with m = 8,a.? =;


/1 1: \' i'\Gaussinn\\ithm - 9.a.2=;
H t' 9
\\ c appl) thc N~..~ man-Pearson Criterion:

II,
' I (T-q)~ I I ( SJ >
InA(x) =- .1l 1n .:.!:.----
,, l Y.
+-,-I In .:o..!..t-,--
'
r. < 1 {I -

H
II,

-(.\ -9r +(x-sr < I'


' ' >

fl
Ch. 8. Statistics 111

II
>
- x 2 1 18r 81-t Y
2
- 16x+64 t'
<
,,
>
X I
<
II

a = 0.0 I =PI X >,. I H0 l


=
f J21!II n (' IT-SfY l T l~ Q('"I -8)
= --
j;;I
._____,___...
2 1!(1

~ (t" - R).Jn =2.326

/~,;;;:: 0.99 = f>l y > t" j/11] = Q( t" -~)


ll vn
._____,___...
1 ''(

~ 17= 2 1.64

2.326
22 then t" = 8 + ,-;::;; = 8.4959.
v22

@ 1111 : X is (iaussian with m =O,a.l =~


~
11 1: .\ ' is Gaussim1 with m '# O,a 2 =;~ - I I fi- --+x
c 0 (.'
~ y------1
a) Proceeding as in Example 8.28: Acccrta r11.:c rc gio n

a = 0.10 = /'[,\', > c I Hu]= 2Q( cJ;;) ~ c:- =, ,I j;; = 1.64 44 1-J;;

h) PI I )pl.' II error)= P[l. .. 1 < c I m = p * 0J


=Q(-za 2-J;;p) - Q(=.,) J;;p)
= Q( - 1.6444 - J;;p) Q( 1.6444 .J,p)
=p(p)
Powcroftcst = I p(p)
112 Student Solutions Manual

c) I he lilllm' ing Oct:n e code plots the po\\l.!r cun c fi>r n:

mu (-10:0.10:10]
plot (mu, 1.- ( -normal_cdf ( -1.644 9. -Bmul + (nounal_cdf ( 1. 6449. -Bmul) )

\\ c ohtnin:

II

() ()

@ 1111 : .r iii (inuc;c; inn \\ith m~,u.a~knm\n 2 compnsih! h) puthcscs


/l1: .\ is Guuc;sian with m > p.a~ 1-..no\\ n

l sc the folltm ing decision regions

Reject

z (j
p+-'-
.r;;

, =a)
p - ,u + " I
= 1-Q
[ atf;;
J;;J \J~lh:: p' < I'

,
=I-{!( p-,u +-
(j /..{;;
~
-u )
0
Ch. 8. Statistics 113

/ /11 : X is Gaussian with m = 4, .Y,=3.1


11 100
1/1: X b uaussian with m < 4.

a) Assume .r,. is Gaussian since n i~ large. I his is a one-sided test:

Acccptlfu if :r" > y

Reject Ho if :r, < y

a I : .. .,, = 2.3263
y- 4 - ..{,; ::" =4 - 2
( I O) z" ,
.:11 M= 1.6449

3.8837 a=O.O l
r= { 3.917R a =0.05

Hoth tc~ls rcjectlfo for }(, = 3.3. 1-rosh rule!

[- ] (3 3-4)
b) p - 1' X ,,<3.3I H11 =Q (t }I IO = {!(.7(20))

@ //11 : X is Gaussian with m = 0, a 2 =4


II,: .\ is Gaussian with m = 0. a 1 < 4

a) Accept //o if a,; > y


Reject lfu if a,~ < y

1'1
' tr.n I :
'
x:I'IJI I
114 Student Solutions Manual

11 8 64
x.,.,.P , 1.2390 39.85 205.4 X~... I - ~
r=--<To
Il - l
}' 0.708 2.53 3.22

You can U'>l! the fol io\\ ing Octave code:


II (l rfJ
s 1g2 ro: o. 1 : 41 II
plot(sig2,chisquare_cdf(63 *2.5J./sig2,63):

8.6 Bayesian Decision Methods

@ 1111 : \' l~e\poncntial\\ilhm =-1-Pu=to


// 1: X i\ exponential '" ith m =5.1 - f'o = ;;,

( 'uu =0 C'10 - 3 =5
C'01 - C110
C'u, -5 <'11 - o c~~~ - ell =3

1\cccpt 1111 if
/,< xi /-1 1 ) )11 x5~Co'>l ol '> hOlt lite so ld as long
< - - =-
~ j-1 ,,x3~Cn ... t oflnng life snld as short

- t +2x< In ~
~x< In ~
~ ..
x <.} In ; =0.3423
Ch. 8. Statistics 115

@ 1111 : .\ is binomial with n,p = 10-J fl[ //11 ] =I - a = f


/ / 1: \' is binomial with n. l - p = 1-1 o--'. fl[//1 I =a =t
a) Ml Rule:

fl[ v - k , ,,, ,_ (k 1- p p
n)( )t .. '
- ( 1- p )1* /) ,
I'] II =k I II., I - (; ) p' ( _ Pf
1 - p (If,)
( _!!_Jil-l~
1-p
II,
;
<

"
(n - 2k) ln(_E_) > 0
1-p <
'-----v---' II''
"J
'--v---J
<.0
If
> ">
II
<
2k T< k Majurit} Rule
II, II

"
( n - 2k) In ( _!!_) >
1- p <
In(~)
a
II,

">
ln(l- a) / a _ 1.3861 =-.
ll - 2k 2006
< ln p /(1 - p) - 6.91
If,,
II,
J. > {0.1 ....,4} ~ 11..
- (8.2) k
< {5.6. 7.8} :...> // 1
"

i11l pc I error] = t (!)! 10' )' ( 1-10 )' ' "'( : Jl!r"

~( 8 )( 1-1 0
PII ) pc II error] = L- ,)1-1 ( I0 1
)A~ (R) I0 p

~ k 4
1
~x i5+(4 ) ,o-' x..!.~ ( ) 1o ~'x 51
8 2 8
8
/' ( ) 10
5 54
116 Student Solutions Manual

if lg(.~) -81 > ()


i flg< ~ >-01<6

h!C(g( :\ ).<~>1= f f/:V:t tt1 ,:fCO I " )/( " )dOd~


- f [ I - f':).~ f (BI " )d0 ] I ( " >dx
Ma,imit.: thi~. then
minimit.: thi'

Thi'> implies that g( '\) selects (} so that./(0 I '\) is m<l\. this i~ the murimum a
pm/C!riori estimate.

8.7 Testing the Fit of a Distribution to Data

@
Oh.... I \peeled (0 - r.)~ 'r.
0 0 10 5 10.5
I () 10.5 10.5 No. of dcgn.:c'> or li ~cdum - 9
.., 24 10 5 17.36 l 0 o signilicancc lc\d -=> ::!1.7
3 , 10.5 6.88 D2 ~ 21.7
4 25 10.5 10.02
5 3 10.5 5.36 ~ R~ject h) pothc.,ic-. that the
6 12 10.5 44.02 #'s arc unifhrm l) di.,lributcd
7 15 10.5 1.93 in{O. I .... 9l
R 2 10.5 6.88
9 2 I 0.5 6.88
lOS j)'J.-"' 130.33

Ohs. F\pcctcd (0 - e)'J./c


2 24 I 0)/8 9.01
3 2 I 05/R 9.43 No. of degrees of frc1..dum 9
4 25 I 0) 18 I 0 7-l I0 o sign i ticancc lc"~l -!>~1.7
5 J I 05/R 7.8 1 Ii , 21.7
6 n 105 8 77.41
7 15 8 0.27 ~ Reject h) pcllhesis that the
8
, J())
105 8 9.43 #"s arc uniform I) di..,ll ihutcd
9
., 105 '8 9.93 in (0. I. .... 9)
lOS 83.26
Chapter 9: Random Processes
9.1 & 9.2 Definition and Specification of a Stochastic Process

@ t
\\'e flucl the prohnhili ie" of the
he cquhaJ,nt e\'ents of;:
ew~nts {X 1 = l 1 X,= J} in tt'rms of the pzobabili~i,....
P[X1 = 1. X2- 1] - P [~ < ~ =~ < I]
P[X1 = 0, X2 = 1] = P [~4 < { < !]
?.
-!I
P IXl = 1,X1 =OJ = J> f2I .. '<
4:1] = :tI
f'[.t.=O.X2=0J = Pl0<{<7]=T
=> PIXt = i,X, = j] = P(X1 = ijP[X2 = J] all r,j E {0, I}
::? \., X 2 independent RV's

@ n) Since g(l) i::. ZClO outside the inlerval [0,1]:

P[...Ytf) =OJ= 1 fort (0, J)


!'or t E [0, lJ, we have
P[X(t) = 1] = P[X(l) = -lJ = ~

b) (t) _ { 1 P [X(t)
77l.Ji - 0
= lJ + (- 1)P(X(I) =- I)= 0 0$ t $ 1
h .
ot erw1se

c ) fortE (0,1). t + d ~ {0, 1}. X(ll1111l"'l beth "<UrH" ,;~.luc, thus:

P(X(t) = 1,X(I + tl)- I] -


2
PIX(t) = 1, .X(t + r/)- =t=lJ - 0
Fort E (0.1], t + d [0.1):

P[X(t)- 1 ..\'(t +d)= 0] = ~1

11 7
118 Student Solutions Manual

Fot t (0, lj, i-! d (0.1):


P(X(t) = 0. X(l +d)- OJ- I

d) Cx(t, t + cl) - fX(t)X(t +d)] - mx(l)mx(l i d)


::: [X(t)X(t +d))
= { l t E iO. l] and t +dE O.lj
0 ot herwisP.

@ n) We will use condHiomJ probability:


P(X(I) ~ .r] - P[g(t- T) ~ :r.]
= fo P (g(t- T) :5 xl'l' = .\).f-r(.\)d,\
1

= 1 P[g(t- ..\) < x]d~


1
since h ,\)- 1
- ~1 Prg(u) ~ x)du afler Jr. mg u =t - ,\

g(u) (and hence P[g(u) :S x]) is a periodic function of u with pcnod, so we can chatiAe the
limits of lh above integral to any iull period. 'I'hu"

P[X(t) :S x] = hl P[g(u) $ :z:]du

Note thn.t g(u} is dctctministic. so

P[g(u) :5 x] = { 01 u: g(u) ~x
11 :g(tt) > :r

g(u)

u
0

So finally
1
P[X(t) $ .rj = f
la:!l(,.)5r
1 du = /.1-X I du = x
Ch. 9. Random Processes 119

1 1
=
l1) m, tt) E(X(t)] =1 0
x dx = -.
2
Th~ correlation is again found using conditioning on 7':

E(X(t )X(t .... )] = t


~o
E(g(l- 1')g(t + T -1')17' = A]h(.\)d.\

= 1l g(t- .\)g(t j T- .\)J,\

- ~~ 1 g(u)g('' + r)du
g( 11 )g( 11 i r) is a periodic function in u so we can chang~ t.l!e limits t<> (0, 1):

b'[X(t)X(t + r)] = .( g(u)g(11 -t r)du

) ( ll + T) = 2 - (1U + T)

0 lT

here we ~t<~sume 0 < < 1 sinre E[X(t)X(t + 1P j., p dodic in r.

fo -~{l - u)(l- u
1

E[X(t)X(l 1 r)J = r)du + h~/1- u)(2 -u- r)du


L r r3 r2 r~
= 3-2t-G+2-6
1 1" 'T'l
= 3-21-2.
'l'hu~

Cx(t.t+r)
120 Student Solutions Manual

jll(t)] 1 . p Fl( t) = 1) -1 ( -1 )PI HI f) = -1 J = ()


CH(t. t + :r) = ftll(c)ll(t + ;- J)
- I P{ H(tJH(t ~ T) = 1 -'- ( -l)P(/ft )Hft + r) = -1)

H(t)!.: H(t T r) Hlt) & H(t + ;)


~arr.P sign oppo itc si~n

H(I)H(f + r) = 1..::} eo::;2t.f awl m:-.2,.!1 I r) lul\c' -;711111' 8i ru


lf(t)ll(t + r) - -1 .:-.:> cos2rrt aJJd t'us2il'(f t r) hil\'1' rlilii- H'ttl :-ia,n

. C t 1 + T) _ { 1 fm I, T such that <.:oi-127rl cos~":'(l- r) 1 =


II\' - -1 fort.sud1thntcos'21tlcc 27r(l-'-r)=-1

h ) l'j/l(t) = 1) = P[X(t) ~ 0) = P{t-o:>(wt + f:l) 2,: OJ=~= l'jJJ(t) = -1]

t:jll(t ] = 1 (~) + (-1)~ = 0


(H(t)H(t -1 r)) - 1 P(X(t)X(t 4- -;-)>OJ +1-l)P(.Y(t)X(t + r) <OJ
1-P( \'(:t.\ (1-- i<:OJ
= 1 - 2P{X(t)X(t + T) <OJ

P(X(l)XIt f 1) <OJ = P[cos(wt + 9)co:-.(...tl 1 r) 1 (:-))<OJ


- [~ coswr + ~ cos(?....:t + wr 1 2C->) < o]
= P[cos(2....t + wr + 28) < <:oswr]
:;h<Hlf"cl t~gion m hgun
= 1- ----=----.:::.....-
211"

CO!" 2(1

- C'()!\wT
Ch. 9. Random Processes 121

c) P[H(t) = ( = P(X(t) 2:. OJ= 1 - F:qt)(o-) = 1- Pfll(t) = - 1]

f[H(t)J = 1 P(H(t) = lJ + (-l )P(Il(t) = -lJ


= 1- ~-r ( 1 (o- l - r:Y 1nco-,
- 1 - 2F:.\(tlf0-)

d) i'(H(t)X t)j = fii.Y(f) :J


H t."'"( ) -.\It) .':11)~0
r ).\ t ={ -.' "(t)
\
,.
.'I. t
t) ' ,.. (J

@ }', Xn I ~(II)
a) /~P :, J = ElX, J+g(n)
V /\R j >;, J= V 1\RlX, + g( n)] = V 1\ Rl X" I

h) F (r) - Pj) ~ ~ x]=P[(X,+.g(n)) <x j = PI X,Sx ,l!(n)J = F, (x -g(n))


I ( T .X~)= PP: ~ x,.>: I~ x2 1 /'[.\', ~ -"- ~(II). r. S x~- g( n + I)]

= F, ' (x1 -g(n).x2 - ~(11 1- l))

c) R1 (n,.11.! ) =[r >:,_]=E[(X , +g(n1 ))(.\', +~(11!)) 1


= E[X, X ,.]+g(n,)E[Xn ] +g(n,)/~ 1 \', J + g(n,)~(n , )
I - I

d) Based {111 X,, Y, can eas ily be plotted:

>:=X.,+ n

1/
>.-=X + /n
ic;c;imil.u
122 Student Solutions Manual

@ b ) I or It 11,, 111_ 1(/I.X )\\e define t\\O nuxilia!) \ariablc-. II' and/:

~> ~~].dt:l(A) -- 1
1

I 0

.r' = oI o0 11
1
[
0 I 0

.1; 11 111 II JZII 1(ll, II'.;) - / \lf


1 1 1
Jl(1 ).1!1_
1
1(1l 1--:,:.ll') = t ;ll,l(:;)/\(1 1
) 111 1(1/ l:.ll')
1

./;, 1,, 1 I 11 ,(11, X) = {',,.1; 1,, I tr(l, 1.7!1,) (u, X, ::)c/z r.


= .f;111l ( : ) /1 l1, ), I 1/, 1(II I :, X)lfz

For ./, 11, 111 , 1(11,1') we need to define two auxiliary vuriublc!:l a-. \\1.!11.

l (1,) .\ {1,) ) u,) -I 0 0 () 0


I (I) - \(tl)-t }(f2) 0 0 I () (} ()
. 1 = .A I= dct(.J) =- 1
" u,>= ru,> 0 I 0 0 I () - I
7(1, ) = }'(/2 ) 0 0 0 0 () (I

fherl! Iuri!

{, Ct,ll IIJ) ( II. 1' ) = r. r f; r rrz(H. \'. \l'.:)lfwd;

r,J"' 1\ fl,)ltl,l \'ft!J.l (I ,(ll + 11 , 11', \' - :.:)c/11 t/;

= r. r yf l(l,l I(I_! (ZI+li',V - :)_/;111 1111 ,(w.:)c/ll'c/

9.3 Sum Process, Binomial Counting Process, and Random Walk

@ t) As tun n' > n. r > j

1'[ ~. ). ~ = t) =
=
P[Sn
PjS =;JP[Sn-n
----
= j. Sr;.'
iu~rt JUt>JIL

n - 1 -

= i-J)
J

b;; indep. iw;cment p: ope1 ty


In g 11<'1 nl
P[S- = 1} :/= P Sn'-n = i- J)
.'.I' S = j,:J,.,-: i) ::/= P!Sn = }IJ'[S'- 1).
Ch. 9. Random Processes 123

P rs~~-7. .:>1=t
.. .J
p) l - t]

=
r [s,, - s , = 1 - iJr s , = i]
PIS.. , =tl
= P(S., - Sn 1 _ j- 1 - ( n; - ~11 )
1,-'(1 _ p)"l-r.t-J + i

P:s.., =J.:,,., = 1,Snl) = lJ


P[S., - i. Sno - AJ
P[S, 0 = ~. 'l, 1 - S,..,
=
P[Sn 0 J..:, 8n 1 - Sn -I]
0
= P [S ,0 = J..:]P[S,, 1 - S,.,_ = i - ljP(.Sn - S111 =:} - i]
PjSn0 l]J'[c;',. 1 - Snt - tj
= P[S,,1 - s = J- il
I

@a) !'eutoolU Protru

I
I
I
I
',
I I

0 1 ~ 3 4 5 6 7 S :J tO

I I I I I I I I

J 2 3 4 5 0 7 8 9 lO
124 Student Solutions Manual

~f(X"J + 4[Xn-d = ~P + ~P = P
= '-'" [ 4.An
1 2+42 A- \"n-1 1
-.-
-l-

I \'2 -1 ]
4~

- ~p(X~)-2:.\
4 ..__,_......
~
)(X"-d-' ~E[X!
.... 1)
..
p p ,.
j
= -p(l- pl
2
E[lnl~,+J] = ~t:[X.,X,H +.\~-L.\,._, X"""'I +~ .. 1X'n)

~[p 1- Jpl]

E[l';;},.ll] = t:[l~\ +Xn-}Xn++Xr.)l-+ I ~;(2Jl 1)


2

2 I
C(Zn] =
3 {.~n} + ;-(.,\n-d
.~
=P
1 .CO(( l':: \" \" ,5 4
C(Z,) g" 4" 4, .,.\n-1 + 'n
,-'l
l
)]
= gP + !jP 2

i[ZnZn+d = ~(4X"X"-r' + 2...Y! + 2X,.H Xn-t XnXn-a] = ~p2 i ~P


f. ZnZn+ ] = f(Zr. t'(Z +1r] = p1 for k > 1

@ .\'
11
1
l ( ) 11 I } 11 1}. ) 11 i id

C.OVI \'n.X,,.,)=E[(X, - m)(X_, - m)] - FI \',X . ]- ml

j+
t ,~rn ~+ r,, ) 1 ] - m 1 =! [l' 2 J -.L m = 1 V\RP ' I l(lrA = O
= tf(}:+ r,_,)(r ,+r,)]=tf> 2 l+~m-ml= 1 \ \R]) I fiJrkl
q o, t r, I )]E[O', ' + >~ . 4" >I =() othcm i..c
Ch 9. Random Processes 125

" fl

M, =~ I.x E[M, J=;L EI \'1 J- m


I I J I

Fork > I:

<.OV[ \/,,. \1, ] = [(1\f, -m)(H.,, - m)l


I n I '''
= E[ - I.(X,- m)- I.(.\ ,
n,, n+J. ,,
I II IHit

= n(n+ k ) I. L...____
_ ,
Ef(_
1 1
111 }( \ ', Ill) I
X I_-.,.._ ____.
1
COV I I 1 \ ,I

=
n(n+k)
1
{n~a~+(2n
2
- l)a;}
4
= a ,2(4n-l) / 4 fork ~ l
n(n+k)

1he figure bclo" shows the terms im olved in the a[,o,e dnuhlc summation. Fork > I.
onl} the tcrmc; in the shaded region arc nonzero. I or k 0. the upper diagonal has n - I
tcrmo,. notn. so

11 t k

I
I
I k I diagonal has '' - I entries
lkl:> I
I
I
k 0 diagonal has n entries
k 1I diagonal has n entries
irk 1

IAJ I

(11 - l ) nlt.'f'llh
126 Student Solutions Manual

9.4 Poisson and Associated Random Processes

@ let V,- the numher of items dispensed. Note that \\C must have A \\here I is I~
the numhcr or coins ucpositcd in the machine. 1 his affects the IO\\Cr limit in the second
equation tx:km.

1'1 '-',<'> k I \'(1) uJ = =( ~ )p' (1- p ( '


FIN,(!) kl i:(r)l
I kk
(l -py-k (...tt)'(! e At

fli NU)- kl - (! ),f f i (Al)A I((l -p)...t/)' ~


I k! /_{ (f-k)!
~(11 -plA.t) ~~~riAl
~ ,,,
-
= (J.tp )' C! ;.,,,
k!

'I his that il \\-C create a llC\\ process b) selecting C\Cnts from a Pni,son process
\llll\\S
accoruing to Lkrnoulli trials. the resulting process is aJ,u Pobson.

@ l'li\(1 t/)- .,
.I
j\ (/) = kl = f>[ N(I-c/) = j. i\'(1)- k I
PfN(t) = kj
P[N(I - tl) = .ilPI J\ (I) - I\ U d) k .i I
=
PINu> - k l
1
). (1 -c/)' -)( / II ) ), 1 ' " ' I ).,/
-1-,-e (A /1 1 C!
= ,~, ' )./
A' ~

=(J k.)('-, I )I( ((/ )~ I hi nom i<tl

The ntlmher or C\ cnts looking into the future has a Poisson ubtrihutiun. hut the abO\ e
equation shO\\ S that the number of e\ents looking inw the past h.t._ a nmomial
di"itrihution.
Ch. 9. Random Processes 127

@ a ) P{X1 (1) = i.N,(I)=kl N(t) =k+ i l-= fli heads ink+ j toss~s]
=( I j +kJ p' (1- p)'

h) 11 J\i,(l)=j.A 1 {1)=k J=Pf\<t> =.i. \ ,(l)=k.N{Il=A t-j)


=PlN1(1)= j.N~(t)-k \(I) -A~ .i iPI .\'(I)=k+j]

=( j+kJ A/ 411

. p '(l - {J)A _ . C! It
J (A +.J)!

.(pAl)'
.:. . :. . _____:_ e fMI (( l - fi )AI)A
e fl J)J.t

j! k!

This shows that nmuom splitti ng of a Poisson process results in incJcpcnuent Poisson
rn ndom processes.

@a) P(Z(t) = OIZIO) =OJ=


1
co l ( ot ) J
J'(c:eu # transitions in (O,t)] =
?;,1+ot\l+M
1 1 l..L.of
= 1 +at 1 _ (....lll..)
I lot
1
= 1 + 2at

P[7.{t) = OIZ(O) = 1] =
P(outl # t1ansitionsin [O.t]} :L-1 -tl -1 ( -1 --tC\t-nt)JJ+ = 1 +at2o:t
= ;::oo <"<:

11

P[Z{f) = U] =- PfZ(7 ) = OjZ(t) = O]P[Z(O) =OJ 1 P[Z(t) = OIZ{O) = l]P[Z(O) = lj


1 + a:t 1 at 1 1
=-
1 + 2ot 2 I+ 2at 2 2
where we assumt> P(Z{Ol = 0) = ~
P[Z(t) = 1] = 1- P(Z(t) = 0] = ~

1
b) mz(t) = 1 P{ZV) = 1] =2
128 Student Solutions Manual

9.5 Gaussian Random Processes, Wiener Process and Brownian


Motion

@ < (t,.t2) = h-1Jt,_, I

X{l) and X(l ') an.: juinll) Gau ~ ian random variahh:" "ith

C'OVf.\{1). \'(1 H)j-C (l./+\)=4e 'I

then 1, 1, 1 1111 _,( Y1.x, ) can be obtained using Eq. (9.47) a-; folhm s:

in '' hich
Ch. 9. Random Processes 129

@ n) [X(t)] ={ l cos...:t- B s:nN"i)= f(, \jroJ;wf+[RJsin....,t=0

C~(t 1 , t 2 ) = &(X(tl)X(t,))- m \"(t.)mx(t,)


= E{(Acoowt 1 + Bsinwt.)(A coswl 2 i IJ.;iu....:t2 })
= (,\ 1 co,v.l 1 CO'>wf2 + (Jl]f!B) COS..!la~::incdl
+[AJ[ll) cost..:l2 sin w/ 1 + ( 8 2 ) .!lin u.t, ~ill ~!2
2
u (co.:;wti ccswt2 t siowla sinwl,)
2
- u wsw(tt- t,)

b) Because , ( and Bare jointly Gaussian random variables. X(l) - A cos w f t B sin
M l and .\'(1 1 s)A cos w(l + s) + B sin w (l I s) arc also jointly Gaussian. with zero
means and covariance matrix

A
Irll/' -- ,. . '1 1
1\ .... I l1 I
cos ro.\ =a s1n ros

A'

exp { - !I .:rtnz- I.!}


2/Ta jsin tu\1

FntJ(!I) = P[l'"(t ) ~ y] = P[X{t) I 1tt ~ yJ- P[ ~(t) 5 y- JdJ


= Fxct)(Y- pt)
::} fn,,(y) = Fs(Y- ;d)= q;;::;c-l"-pt)'/2"t
\ lfQ,

b) = P(X(t) + ,,, ::; y 11 X(t + s) + Jt(l + .s) ~ y,J


= 1-:y(t) \ {t+>(!l a - /'/1Y2 - I'{ I t s))
= .fx(tJ,.\'(c-,)(Ya -Jlf.y~ -11(t + s))
hvJ(Yt - Jli)fx,.>(Y'l- Y W1)
3-(!f1-piJ1 /2tiC ,-(n -111-11'),/:lna
= ./2r.ot ./2r.os
130 Student Solutions Manual

9.6 Stationary Random Processes

@a) XU) . I co..; 2m


m, o) I ( l} cos 2;ct 0
( \ (ft . /_) - V1\ Rl.Jl co~ 2;ct 1 cos 21r12 from E:-..:amph: 9.9
I l cos 27Ci t cos 2lfL2

Aulocovariancc docs no t ucpcnd onl} on I t - 11

=-> X (I) not station<H). not wide sense stu I iomll)

h) .\'(/) cos( cut t 0)

=> X{t) is wide Eense staLiona.ry

In ord r to determine whether X { t) is stationary, consider I he U it d-ordcr joint. pdf:

fx(c 1 )X(r 2 )X(t.t)(:ch :tz, :r3)dztd:t2dx3


= P(:rt < cos(wtl + e) ~ Xt +dxt, .72 <co (;;ut, + 9) s X2 .i..dz:~,
%3 < co, (wt3 - e) ~ xa- dx3]
= P[A t n A2 n A3]
_
J\ , -
{ .
t.OS
-1
X , -lki, < e S COS - 1
X, - wt, + =:; dr., }
l - X~
see Ex tmplc 4.16 and Figu rP 4.14

fx(JJ+r)X(~+r)X(t~+.-J( Xt , :r :~, 1',1)


P[xt < cos(wt1 + w -r + 0 ) ~ :r: 1 + d:ct,
.r., < cos(....:tz + wr -1 E->) ~ :r2 I cf:r2,
:r3 < cos(..... t3 + wT r 0) ~ .ta + d.r.3j
= PIA~ n A;n .4~]
where

A:= {cos- 1
x , - wl, - :.:r < e ~ c.os-1 z, - wt, - WT + R}
-x?
l
Siucc a i unifor m !~ rlistributed. P[Ai} = P{AH.
In addit ion
P(A, n 2 n A3j = PI A~ n ...t; n A;J
since the intersection depends only on the rclat i;c values of t 1 , t 2 and t3 The ~a.rue
prorcrlurc C'lltl h~ used for nth order pdfs.
:. X(t) is a stat.ion~n random proce~<>.
Ch. 9. Random Processes 131

@ As~urne X" i<~ rlisrrclc-valued. for -.i rnplir.ity, so thaL \\f' c n work wt t h profs. Cou~idPr
tltP tl ud-ordcr joiut prnf of} ~: for n 1 < n2 < n;t we ueed tu lihvw that for a ll T >0

Express the aho\'P. prCJbabilitics in term of the Xn's:

PlY,,, - Jh . l~, = y, , Y...l = YJ)


1 .
= P [ 2(Xn - t' ) - Yt 2'''
t )(., 1 v "' + v\. a)-1 ) ,. ) -- !/3J
= !/2, 21 ( ,.''"J + ,,.,,_,
1 1

= 1' [~(X, + Xt) = 1111 ~(X,. 2 _,,,_., + Ynz-n,+d = y,,


~(X,.~-nd~ I .\,1-n!'l l ) = Ya]
Sinccthe joint prlf of(Xn,-hXn,. X nz-1 Xn;. \',, I . x. ...~) is idcnticitl 1-o that of (Xh Xz, Xn, ns Th
Xn~ 111 12 ... , Xr&J-'" 12) if Xn is a :,lu liomny proce <;g,
Similarly we lJ11,~ lhcll

f'l}~,t+~- Yt , } fl1+ r = 1/'J> }~,+r = YJ]


= f'[~(.\'n 1 t'" + Xr. t r-1)- Yl! ... ~(Xn, XnJ+r-d- l/3]
1 I T+

= P [~(...\', + x.) = Ya.~Ct',,-n 1 +~ I X,,_,.,+d = !12 ~(Xn3 -ns-t-2 +Xn,-ns+l) = 1/3]

:. (*)hold~ if Xn is a slationuy rr.ndom JII'Ou:ss nmlm pcu licul& if X, is a.n ild process.

c) In order for .\:, and l'n to be jointl} stational). their joint distributions should be
in variant to shills in the origin. In parts a) and b) \ .,.C cx prcs..., the joint pmfof }', 's in terms
of the X,'s. 'I herel<)rc \\e can a lso express joint pm fC\ of \ , 'sand ) ~, s in terms of joint
pm fs of .\ ,'s only. rhe stationarity of .A~, then imp lies shin invariancc lo r the joint pmfs
0 r .\', and r,.

l'hercforc \', and r, are jointly stationary if X, is iid und if X, i<; stationary.

@ a) I rom Problem 9.55


/:"( Z(l)] -= 0
C (11.1J ~ C \ (1 , - 11)COS tV{/, - / 1 }

~ /.( n is w ~s

h) L(l) is a Gaus<;ian random variable \\ ith 1.cro mean and covariance ( \ {0).
132 Student Solutions Manual

c) /(I) i.., a \\ ~~ Gaus.,ian random variable" ith 7Cro mc,m and em artanc~
C\ (I~ -11 )cosm(t, -11 )
lhcrcl('lrc (/(11)./(1 )) has ajointl~ Gaussian pJf\\ilh

d) Since the processes are 7ero mean, \\C have


COV[l(l1 )X(I2 )] = [2(11)X(I, )]
= E[ ( X (1, ) cos ttJI1 + } (/ sin mt (1 1 ) J
1) 1) \'

= [.\'(/1)X(I2 )Icos(l){1 1 /I} (/ 1 )1/"l .\ (1 , )lsinrot1


=R,( /'1- 11) Cl)<;(t)f,
......_,___.
J~tkuccunl

/(/)and \"(1) arc not jointl~ stational') .

c) B) using au\iliar) variables "e can c;how that sarnp l~: p()ints ul L(l) and .\"(1)
arc ohtain~:d ac; linear tran'>formations ofX(t) and }"(I). lur c\ampk.

/. j lcus0 ~][/.]
()

II =
(1)/
1
0 sin {tJ/
I 0
1
J[.\',', ] I () II'
l,. o o rI
0 () I I'

I hcrclllrc il' s:.unplco, of' X(l) anti HI) arc join11y Un ussiu n. then snmplcs nf /.(f) and XU)
arc also jointly (,au<;sian. rherefore the joinl pdf of X( I} and /{1) has pararnltcrs

m1 {1) - 0, C , (/ 1 - 12 )
Ill (I) 0. ( z (/ 1 ,/_)=C' r {/~-/ )COSftJ(/, /1 )

and

R, (ll - 11 )COS(I)/1 ]

( 1 ( 12 - / 1 ) ens (tJ(f , /1 )
Ch. 9. Random Processes 133

T h us the mean and autocorr~>lation of X.t t) c\lf! determined by time averages of s( t).
Tf .~ ( t) is <\.'! belo\\

\( II

+I. .\(l)c// = 0.

t J'.\(I)~( I
I
- r )d r ;;;; [
I
( I )( - I )dt + 1,1. (I )( I )dl t
r
f/:., (
;!z
I )( - I )dH ('
J/:+r
( 1)( - l)d/

= r +(f- r} - r +(f-r )
= T - 4r

1
134 Student Solutions Manual

@Recall the application ofthe clmal7 lnequalil) (Fq. 9.67) during the di scussion
of the mean squ~trc periodic process. We had:

lf.\'(1) i~ mean-square periodic. then

/I< \'(l+r+ci> - X(I + r>> ~ ] = O.

'Jhu!>
II< \(I 1- r +d)- X(t + r)X(t))f =0
~ (1~1 \'(f t r + c/)X(f)]- E[X(I + r)X(I )I) ~ - 0
~ Fl X (I 1- r 1 c/)X(I)l = E[X(I + r)X(I)l
:...::> RI (1, I c/,12) R.\ (1, ,12)

Rcpci.IICd appl ic::tl ions 0 r lh is argument lo I I and 11 irnpl ics

I he spcc 1.11 case m = 11 implies Eq (9.70h) and hcnLc that X( f) is "ide-sense


cyclostJtlonar).

9.7 Continuity, Derivatives, and Integrals of Random Processes

0 s
a) Pl ..\'(1) dbcontinuous at lul = P[s - to I= 0

h)
X(l)-X (t )=0

t0 t S
X (z)- X (to) = 1

S t0 t
Ch. 9. Random Processes 135

~ 0 ~ X(l) i~ m " continuouc;

\\'c cnn al'>o tlctcrmine continuit) from the autocorrelation function:

Next we ucterminc if R,, (1 1,t1 ) is continuous nt (ln, lu)

R, Uu 1- s,' I 0 + c2)- R_, (I0 .fu) =e A111[1\fl, II I ,1, I cl) -("-..II.,


=t! .<u tou.o\(1 1.::)) t! )1.,

=e-'"l' l e <runlr.r':'- IJ
~ 0 as c, anu t:, ~ 0.
~ .\ (I) i'\ m.s. continuous

c) \\ c C'\fX!Ct that the mean sq uare dcn\-alhc i., tcro (if it e'\ists). We thus
con"tiucr the limit:

;., I
=e - ~ 'Y:>,
1:

'1hus the m.s. deri,ativc does not exist.

d) X(l) isms. integrable if the lollo\\ ing int~gral c\bts:

Two ngion.: r,f intey;tation


136 Student Solutions Manual

f. f.(! AtnNI, l:ldf,clf~: c//1 f. r df2e AI + 1 f. elf,(!


t//2
1

={ clt 111e _;, + f ell 1_e lt

1 I lJ I
=e (-J./1 -1) +e : (- A/ 2 - 1)
A.."! .;t 2
0 0

e .t'(-J.I- 1) - (- 1)
=e-.t. (-JtA2- 1) - ( - 1)
t--~--~~---
J~

~ X(l) is 111.s. inlcgmhlc.

I ct
) (I) - f. .\'(A)c/..1.
1hen f'mm l q. (9.9 I ):

Ill I (/ ) = f Ill \ (II )dll

m 1 (/) /f \"(l)[ = l x P[S < l]=l -e .(,

Ill (f) = r (1 - e "' )du =I-( e~: I


I+..!_[ e . _, - I 1
A.

From [q. (9.92) we have:

@ 1he indcpcnJcnl increments propert) implies that

lim/[( \'(1) \(I, )) 1 [ = 0


I "

and \'(/) is mcan--.quarc continuous.


Ch. 9. Random Processes 137

9.8 Time Averages of Random Processes and Ergodic Theorems

@ II (r)- A I - j:-1).

Hx(r)

1
= -
'2T
('lT ( 1 - !')"1r ) H yltt)dn
1
1 'U
< '2~' [.'/ R\(lt)du

= 21
l 27 .4( 1 - lu ),fu
-n

=
1
?.T \ 2
/.4.) for 7 >1
0 ;1..<; , . _

~ .\(t) 1 m..:an-~rgodic.

~
~ VARI < X >]=-2TI+-I: 2T ( lkl- ) c (k) < I ,,
1- - I: (').
- AI <- 2
-
11 I J A- -21 2T + I \ 27' + l it ., 2 27' + I
-t 0 as T -t oo
=> X, is mean crgod ic

~ln order for< X(t) X (t+r) >1 to be a vall estimlltl" for R (r), Y(t) = .\(t} \.(t+.,)
iuust I e mea-n-ergodic.
Nole t haL
1
f.{< X(t) X (t ..1.. .,.) >~1- 'l.T IT &[
-T :\"(t)X(t + T)}dt = Rx( ~)
docs not dtpend ou l. T hus X{t}X(H r) is mean ergodic iff Cx(r)X(HT)(t., lz) is l:;uch that.
138 Student Solutions Manual

~a) I kr~ \\ C ... uppnse that ''e observe.\:, onl) l{\r n S I

l - ll(u - X )
,
~ L/ -=- I u(a- X ,)
I I .'
'----v-----'
\:1\llllling rrti(\.'S'> felr
C\1!01 ,,\,~)

h) I r /., j.., m~an ~rgodi c . then

II

},L /., ~ l~"ll" I= E[u(a - X, )] = !'[.\', < o 1- /


A I
1 (")

@ cl -~ar all;
close all;
T = 1:5:100;
\P.9.l06
H2 2 *0.5;Cxl = O.S*((T+l) .H2-2 * T.~H2+(T-l).~H2);
H2 2 *0.6;Cx2 = O.S*((T+l)."H2-2 T.AH2-t(T-l)."H2);
H2 ~ 2 *0.7S;Cx3 O.S * ((T+l). AH2-2 *T."H2+(T-li.AH2l:
H2 =
2 * 0.99;Cx4 = O.S* ((T+l) . "H2-2 *T."II2-t(T-ll."'f12\;
plot(T, Cxl , ' - ' , T, Cx2, '- * ', T,Cx3, - " , T,Cx4, '-x'l;
legend('HO.S', 'H=0.6', 'H=0.75', 'fl=0.99');
\if you have problem with legend in octc~ve usc follow~ng:
\- plot(T, Cxl, ' -;H=O.S;', T, Cx2, ' - * ;H0.6; ' , T,Cx3, '-+;
\H0.75;', T,Cx4, '-x;H=0 . 99;');

title('Problem 9.106 ' ) ;


\It can be seen that l ong range dependence incr-eases wi t h H

tl n "
II fll, o
(1 11 Jl h -
11 , !i'i' '
Q8

07

0~ \

0--' \
'
02

---- ---.......
30 JJ TO 1110
Ch. 9. Random Processes 139

*9.9 Fourier Series and Karhunen-Loeve Expansion

~a) X(t) = Xe'"~


R (l,.t2 >= f\'(t1 )X'(t1 )] ==E1Xe .\ 'e '
= El.L\'. ]e'"111'_,ll = E[l X, l]e

b) Ff \ (I} J 1.r]e '~

N\ ( r) - Fll .\') i]e'm


Ir /.'fXI - 0, then .Y(I) is a WSS random prm:css.

~ n ) Thf corrt>ln tion herween Fourier coe1ficients is:


= E [2_ LT X(t' )e-' 1"l;r'JT dt']_ fr X (t'')eJ'lmt''/'f dt"]
T .o T lo
= _I {T
P lo lo
rr Rx(t' - t")r.-J'll.:t'/T , :J'J- mt"/Tdt'(lt"

T ltis is Gq 9 118.

If X( I) i!'l rn.c; . po>riodic then Ux ( li) is periodic nnd the inner integral is 111. thus

*9.10 Generating Random Processes

@a)
\P9 .11 8
\part a
clear all;
close all;
140 Student Solutions Manual

sazeros(200,10,3);
ls dimensions are: (n, realization , p)
p[0.25 0.5 0.75];
for sample c 1:1:10
fot i 1:1:3
i f (rand < p(il)

end
s(1,sample,i) 1 .
for n c: 2:1:200
s(n,sample,i) = s(n-l,aamplc,i);
.1 (rand< p(i))
s(n,sample,i) = s(n-l,snmple,i)+l;
end
end
end

Ugu re (sample) ;
, 1: 2 0 0, s ( : , fHI.mpl e, 2) , ' - * '
p loL ( 1 : 2 00, s ( : , sample, 1 ) , ,
1 1
--

1:200, s(:,sample,3) , -o 1 ) ; 1

legend( 1 p = 0.25 ' , 'p = 0 . 5 ' , 1 p .. 0.75 ' );


xlclbel ( 'n')
ylabel('Sn, random process')
tttle('Problem 9.118a');

end
--...., ..,.

b) \P9.ll8
\patt b
clear all;
close all;
a(1:200,1:50) = 0;
p 0.5;
for san.ple 1:1:50
if (rand < p)
s(l,sample) 1;
end
fot n 2:1:200
s(n,sample) = s(n-l,sample);
1f (rand < p)
s(n,sample) = s(n-l,sample) t1;

end
end
Ch. 9. Random Processes 141

m mean(s');
v var(s');
plot(l:200, m(l:200), ' 1:200 1 v(l:200), '-o');
1 egend ( 'mean' . 'var .t.ance ' ) ;
xlabel ( 'n')
ylabel('mean variance')1

title('Problem 9.118b');

c) and d)
\P9 . 118
\parts c & d
clear all;
close all;
s(1:200,1:50) 0;
inc ( 1 : 4 1 : 50)
I 0;
p a 0.5;
fot sample = 1:1:50
i f (rand < p)
s(1 sample)
1 1;
end
for n = 2:1:200
\{
\for the distortion case at th~ end of part d uncomment
\ this part
\if (0<50)
\ p 0.9;
\else
\ p 0.5;
\end
\)
s(n sample) = s(n-1,sample);
1

i f (rand < p)
s(n,sample) = s(n-l Sample)+l;
1

end
end
inc(l,sample) s(50 sample)-s(l,sample);
1

inc(2,sample) s(lOO,sample)-s(Sl,sample);
inc(3,sample) s (150, sample) -s () 01, oample);
inc(4,sample) s(200,sample) -s(l51,sample);
end

figute(l);
subploL(2,2,l);
histCinc(l, :),5);
xlabelC'increments [1-50] ');
ylabel('number of samples');
suhp1ot(2,2,2);
hist(inc(2, :) ,5);
xlabel('increments [51-100) ');
ylabel('number of samples');
subplot(2,2,3);
hist (inc (3,:) 5); I

xlabel ( increments [101-150] ');


ylabel('number of samples');
subplot(2,2,4);
hist(inc(4, :) ,5);
142 Student Solut10ns Manual

xlabel ( inc1ements [151-200] l;


ylabel('number of samples');
\hist Cine, Sl;

flgure (2);
plot (inc ( 1, : l , Inc ( 2, : l , * l ;
xlabel('inc in [1,50] ');
ylabel ( '1nc In [51, 1001 ');
axis ( [ 1 50 1 50)) ;
title('Problem 9.118d');

\for test we can distort inc in one range and see if it affects
tincrements in the other range, for example we can modify the
'l.p<nametet p for range (1,50) and chang( i t bi1ck to the o.tiginal
\value fot the range (51,100)

"'...... '!lljd

~

..
:ILl

RX
., l.J
;; r.
~ ' i i ...l. :
ll

Ci

II

II " l'l
IU !ilj

~tl}
clear Clll;
closP a 11;
y zpros(S,200,3,2);
%dimensions in y ate: (realization, n, alpha, p)
alpha [0.25 0.5 0.9];
step = 0;
p = [0.5 0.25);
for sample 1:1:5
fori 1:1:3
fot j 1:1:2
rn rand;
step= -l (rn <= p(j))+l* (rn > p(j)l;
y(sample,1,i,j) =seep;
for n = 2:1:200
rn rand;
step= -1 *(rn < = p(j))+1* (rn > p(j));
y(sample,n,i,J) = alpha(il*y(sample,n -1, 1,jl+step;
end
end
Ch. 9. Random Processes 143

figure(sample*4+il;
plot(l:200,y(sample,1:200,i,l), --',1:200,y(sample,l:200,i,2));
legend ( 'p = 0. 5', 'p = 0. 25') ;
xlabel ( 'n')
ylabel('Yn, random process')
str sprintf('Problem 9.123a, alpha \l.lf',alpha(i));
title Cstr);
end
end

m "' mean (y);


v vat(y);
\plotting mean and variance
fori 1:1:3
figut.e(200+i);
subploL(2,1,1);
ploL(l:l:200, m(1, 1: 200,i,l), ' --' J:1:200, m(l, l :200,i,2));
legend( ' p = 0.5 ' , ' p = 0.25');
x 1 a be 1 C' n
I )

ylabel( 1 mean of Yn')


str sprintf( ' Problem 9.123a, alpha "' \l.lf',alpha(i));
t.:itle(str);
subplot(2,1,2);
plot(l:200, v(l,1:200,i,l), 1:200, vC1,1:200,i,2));
1

legend('p = 0.5', 'p = 0.25 1


);

xlabel ( 'n l 1

ylabel( variance of Yn
1 1
)

title (str);
end

\histogtam
for sample = 1:1:5
fori 1:1:3
figure(300+sample *4+i);
for j .. 1:1 : 2
subplot(2,l,j);
hist (y (sample, : , i, j));
xlabel('Yn , output ' )
ylabel ('Histogram cow1t')
st.:r = sprintf( ' Problem 9.123a, histog1am for alpha U.lf,
p = \l.lf,sample#%d' ,alpha(]) ,p(j),sample);
title(str);
end l:l
I'"(\~
o-.. 2$
end w

. ~Atlil{/lV,w/1 (\ftt1
end

1
k~ fV~
2
~
I
,
' U, V' /\ r
v~\l \. ~~ fVI'
o
~

~~~VV\ \\
-2
I
...

~
0 2? ..., 60 ro 100 lXI
ft "" 160
'"' ;om
144 Stucl ent Solutions Manual

h) clear all;
close a 11;
y zeros(50,200,2);
\dimensions are: (realization, n, p)
alpha .. 0.5;
step 0;
p ( 0.5 0.25);
for somple 1:1:50
for j .. 1:1:2
1n = rand;
step = -1 * (rn < = p ( j)) tl * (rn > plj) l;
y(sample, l ,j) step;
for n "' 2:1:200
1:n = rand;
step .. -1 * ( r n < = p ( j ) ) + 1 ~ ( t. n > tJ ( i ) ) ;
y(sample , n,j) = a l p ha"' y(sample, n - l,j) t sLcp;

end
end

m mean(y);
v vat (y);
\ploLting mean and variance:
figute (100);
oubplot(2,1,l);
plot(l:l:200, m(l,l:200,1), -- 1 :1:200, m(l,l:200,2));
1 egend ( p = 0 . 5 , p = o . 2 5 ) ;
xlabel ( 'n')
yl<'lbel ( mean of Yn')
stt~sprintf('Problem 9.123b, alpha \f',alpha):
tille(str);
subplot!2,1,2l;
plot(l:l:200, v(l,l:200,1), --~ 1:1:200, v(l,l:200,2));
1 egen d ( 1 p .. 0 . 5 I I I p : 0 . 2 5 I ) j

xlabP 1 ( u 1 )
ylabel('variance of Yn ' )
title (st;l):
flgu.Le ;
%hio Log1am
f i glll e ( 2 0 0) ;
for j 1:l :2
aubplot(2,3, (j-1) *3+1) ;
hj Sl (y (; 1 51 j) ) i
xlabel('outcome')
str sprintf('p = %f',p(j));
ylabel(str)
str sprintf('P.9.123b, n = 5');
ti tlP (str);
subplot(2,3, (j-1) *3+2);
hist(y(:,50,j));
Stl" m Sptintf('P.9.123b, 11 50');
title (str);
subplot(2,3, (J-1) *3+3);
hist(y(:,200,j));
str sprintf('P.9.123b, n 200');
title (str);
end
Ch. 9. Random Processes 145

I 4
1l

..
c:
'8
oe
06

f

-&r.
0 o &) eo no ~ leG
20
"''
n
U:l 200

PrOI- '' 111 ""'' II W!OOO


2
poQ~
I~

i /fl\~~~"~\'~~~~~~~ 1 ~~~ ~.
~ I'>
t; t J
17

'lf/')~~Vfdr
Dll
I

I "
f rlf
iI
' ' J
l4
OIJ
04
0 ]() In r.o till 100 tJ(J ItO I(,(I to :>00

c)
cl~ar all;
close all;
y zeros(50,200,2);
\y dimensions: (realization, n, p)
incl(l:4,1:50) 0;
inc2(1:4,1:50) = 0;
alpha 0.5;
step = 0;
p - (0.5 0.25];
for sample = 1:1:50
for j = 1:1:2
rn == rand;
step== -l * (rn < p(j))+l*(rn > p(j));
y(sample,l,j)==sLep;
for n = 2:1:200
rn = rand;
step= -l * (rn <= p(j))+l*(m > p(j));
y(sample,n,j) = alpha*y(sample,n-l,j)+step;
end
end
inc1(1,sample) y(sample,50,1)-y(sample,l,l);
incl(2,sample) y(sample,100,1)-y(sample,5l,l);
inc1(3,sample) y(sample,l50,1)-y(samp1e,101,1);
incl (4,sample) y(sample,200,1)-y(sam~le,151,1);
~nc2(1,sample) y(sample,50,2)-y(sample,l,2);
l.nc2(2,sample) y(sample,l00,2)-y(sample,51,2);
inc2(3,sample) y(sample,l50,2)-y(sample,101,2);
inc2(4,sample) y(sample,200,2)-y(samplP,l51,2);
end

\hist (incl 1 , 5);


figure(l);
subplot(2,2,1);
hist (incl (1,:), 5);
xlabel { 1 increments [1-50) 1 ) ;
ylabel( 1 number of samples');
Lille( 1 Problem 9.123c, p = 0.5 1 );

subplot(2,2,2);
146 Student Solutions Manual

hiat (inc l (2,:) ,5);


xlabel ( 'inctements [51-100] ');
ylabel('number of samples');
title('Ptoblem 9.123c, p = 0.5');
subplot (2,2,3l;
hist (incl (3,: l ,5 ) ;
xlabel('increments (101-150) ');
ylabel('number of samples');
title('Problem 9.123c, p = 0.5');
subplot(2,2,4l;
hist (incl (4,: l, 5);
xl.!bel ( 1 inc.tements [151-200) ');
ylabel( 1 number of samples');
title('Problem 9.123c, p = 0.5 1 ) ;
replot;

Cigure (2);
( j nc2 ' , 5) ;
\ h ls t;
sulJploL(2,2,1);
hist (inc2 (1,:), 5);
title('P~oblem 9.123c, p = 0.25');
xlabel('increments [1-50] ');
ylabel('number of samples');
subplot(2,2,2l;
hi st.(inc 2(2, :l ,5 ) ;
title('Problem 9.123c, p = 0.25');
xlabel('increments [51-100] ');
ylabel ( 'numher of samples') ;
GUbplot(2,2,3 ) ;
hJ.Gt (inc2 (3,:) ,5);
tltle( 1 Problem 9.123c, p = 0.25');
xlabel ('increments [101-150] 'l;
ylabel ('number of samples') ;
subplot(2,2,4);
hi s l (inc2 (4,: l ,5);
xlabel ( 'inc1.ements (151-200) 1 ) ;
ylabel('number of samples');
tit l e( 1 Problem 9.123c, p = 0.25');
1 Pp l ot.:

14 .---.---.--.-~""T-"-....---,
lr>e I
''
f :
'I;
.!
~

"
.'
6

O~M-~---~~~~
2 I 0 I ,) 3 ) 0 1
11C~ I1501 ~ f' II QJI

~ 912.k. p>025
Ch. 9. Random Processes 147

~ clear
lambda*lOO=n*p,
all;
if lambda=l then n*p should be 100

close all;
\as n gro.,.:s N would be a better app~;oximation of a Poisson
\process. Probably n=lO*lOO would be a good pick
\you can draw N for n large than lO *t and you can see that the
\~;esult would not change significantly

n 1000;
p 100/n;
N(l:n) = 0;
N (1) 0;
fol. i - 2:l:n
i f (.Land < p)
N( i) N(i - 1)+1;
elae
N(i) N(i-1);
end
end

plot(N);

Problems Requiring Cumulative Knowledge

C220 I he incr~ment ofX(I) in the intcr'val (1,. , ,) hus pur:

a) We assume thatX(O) = 0, then

.I, 1 111 11J 1(x, .1') =/r 11)x)/1 11 1_.r11).1'- x) b) indep. increment propetty
1

AI AI I
=--x' e .lr ( 1'-x)': I 'e ,.,, rt
r(t,) f(l, -I,) .
AI!
= XI'()'-X)' 11- I(.'.AI
r(/1 )f(/! - r1 )

b) R, (11.1,)= [.\'(/1 )X(I2 ) ] assume t, > 11


= [.\'(11)( X(/ 2 ) - X(! 1 ) + .\ (11))I
= E[X(I1)' ] +E[.X(I1)]/.:. [ \'(1, ) -.\ (11 )1
increment
148 Student Solutions Manual

/I \'(1,)1- a =i
A A
E[.\' 2
(1 1 >I - VAR[.X(t1 >l + E[X(I1 )] 2
2
I, /.
--t-
..t' ;.'

Note the similarities to the\\ icner Process.

c) R, (1 1.1 ) i~ continuous at the poinlf t = I'!= I \O \"(1) is \1 ~ <.ontinuous.

d)

/
1
5, / 2 ~ X(l) is N<H M.S. dilkrent iablc

1 his sug.l!csls that \"(1) ha'> thic; autocorrelation function if \\C J,.!cnerali zc the nution of
dcrh .llh c nl a mndom process.
Ch. 9. Random Processes 149

Gx(t3, t 1 } = E(X3Xt)-m3m1
= E[E(X3XdX2]] - m3m1
= E[E[XjiX'2jE(.XdX2 ' - m3m1
= F[{m3+P-z,3::(Xl-?lta)}{mt r!'t.2::(.X2-m2)}]-m3m'
== E [Pa,3 o-
3
O'l
{ ..\2- m1)p ,:~ CTz
OJ.l..\'2 - rnl)J
P2,30'aO"zP1 ,2a1 ua
=
f72U2
C, (ta. tJ)Cx(fz, I d
=
Cxft2.t-1)

b) Wieut-r Proce-:~

Cx(ta.t2) - at1. C {t2.tt) = ot1,


Cx(t3, t2)Gx( tl, t1)
Cx(t3, t2) =
Cx(l2,t1)
!::io Wiener proce~ i~ Causs-~Iarkov.
For Orustcin-UhJenbeck process

Cx ((,, t:.r)Cx(tl, t,) = (J'! (e-n-(13-t:)- (.'-n(t~+t2))(c;-a(Ca-CI) _ C-e(C,.f II})

C.dt,, t 2) 2a e-a(IJ-IJ) _ c-Cl(t 2i c2)

0 2 t'-a(IJ-1;} _ f-o(t3-212-l1) _ ,.-r,(l~-1-f: I+ e-a(l~+'l'2+C1)


= 2a I - c-la-t,
2
= ~(e-CI'(t~-11) _ ,-u(t3+td)
2a
S(l Orn~teiu-Uhleubeck pro\ess is also Cau~s Ma1kov.
Chapter 10: Analysis and Processing of Random Signals

10.1 Power Spectral Density

@ We nhtain the pm,cr ~ rectral densit) h} calcul.lling the I nuricr tran ~ro nn or the
nutocorrclulion function or b) using Fourier t ran~rorm lahks (Appcndi\ B). We obtain
the autocorrclatinn by cnlculating the inverse Fourier tmn<;I(Hm .

(j;)J =AT (si:;~{)


2

a) Sx(J)- :F [g
Table 111 1\ppr.ndix U.

b) S'x(/) = !1 ( 1{ , )
. W'
m - ~
llx(r) = .4W ( 1 ~,Z )

@a) R~y(r) = f[X(t- T)}'(t'}


- !F(t)X!t+r)]
= Ryx(-r)

150
Ch. 10. Analysis and Processing of Random Signals 151

@ We find the po"'er spectral density b) eva luating the fo lio" ing summation:

~ I
La~ 1!-Jllllt. = 1+L ate 12~:tt + L { .~ f I! Jlzft
l I J
ae-11xr ae 2111
= I+ , + 'r
1-ae- = 1 1-af! .z
1-a'
= ----=------
2
1+a -2acos2ff/
S 1 C/) = ,\T [ 4(a) + 16(fJ) 1
' J
=4 1- (a)l
2
I + (a) -2(a)cos2ff/
+ 16 l - (j]) 2
2
I + (fJ) - 2(/J) cos 2ff/

R" (n.n +k) = El(X, -X, ., )(X,.1 - X,,~ ,)I


= R1 (k)-R r (d+k) - R1 (k d) 1 1? 1 (k)
=2R I" ( k) - Rx (d + k ) - R1 ( k -d)
.~'0 (/)=28 1 (.() - S_, (f)e 12 ~rf</ - ,\\ (/k ''~'"
= 2s I cnc' -cos 2ff.fit)
'---v----'

'Jhe Pll\\Cratlhc high rrcqucnck:..


dccrca<.cs as d increac;cs.

d = ?.

--i
);~" I I/
-~ 0 Y2
h) Fl D,: J= R, (0) = 2R_, (0)- 2R 1 (d)
152 Student Solutions Manual

~
~ \P.J0.21
cleat all;
close all;
samples z: 50:
lenl28;
xrandn(len,samplPs);
xffft Cx);
pfcsqrt(xf'.*conj(xf'))/len;
sfmean(pf);
sflmean (p( (1: 10, :) ) ;
sf2=mean (pf (1:20,:));
sf3mean (pf (1: 30, : l);
sftmean (pf (1 :40,:));
onbplot(2,3,1);
p l ot (1: l en, sf);
ax i A ( ll 1 en 0 . 0 6 0 . 11 J ) ;
lille('All (50) realizations ' );
subplol:(2,3,2);
plot: (l: len, s(l);
axia([l len 0.06 0.11));
t:itl~( ' IO realizations');
subplot(2,3,3);
plot (1: len, sf2);
axis((l len 0.06 0.11]);
title('20 realizations');
subplot(2,3,4);
plot(l:len,sf3);
axis( (1 len 0.06 0.11]);
title('30 realizations');
subplot(2,3,5);
plot (1: len, sf4);
axis([l leu 0.06 0.11]);
title('40 realizations');

1o reat!lall(ll)!
0 I 1 r--1r--t~--r-....-,-,
t!llP t Qnc 1
01

~I JO 00 Oil 100120

line 1
UI 0 I

009

(103

007

:10 10 tO ilO 100 120 20 40 ~0 80 100 120


Ch. 10. Analysis and Processing of Random Signals 153

10.2 Response of Linear Systems to Random Signals

@ t> ) Sl'(f) = IH(!)IlSx(f) = 41r1 flSx(f )

b ) lldr) = :r--jSy(f)) = - ~~' Rx(r)


Part a) "ihO\\ S that differentiation accentuates the JXH\Cr at higher frequencies.

@ n) S yy(f) ~ fl (f)Sx(f) = 1
:%:/
fly Y = :F 1 [SYJY (f) ) = Te-
So 1. r >0
N0 /2
b) sl'(f) = IH(!WSx(f) = 1 + 41r, r
f/l'(;)- ,r- t[Sy(J)] = !~O e-lrl

No
c) Rl'(O) = -
4

//(/) is a IO\\-pass filter and part b) shm\ c; that the trandcr function attenuates higher
frequcnc icc;.

N(t)

Hz(7) = t:[Z(t
X(t)
i ll(t)

+ r) Z(t)] = [(X (t-+


I lt{t-) -
ll'(tL
~)-;:--

Y (f. I r) )( X(I)- l'(t))]


r)
Zll)

Rx(r) + R y(r)- Rxy(r)- RY.\ (r )


Rn(r) = (.\{t + r)Y(t)] = & [x(t + r) J:, h(.\)t'{l- ,\)d\J

= j_: h(.\)Rx,( r + .\)d.\

= J: h(.\)Rx(r +,\)d.\ -.wee


R\'\'(r ) = LX(t
= Rx(1')
+ r)(X(t) + S(t))]
= h( -r) * Rx(r)
Sz(J) = Sx(f} + Sy(f) - S.u(/)- Sr x(J)
= Sx(f) + IHU)I 2 fSy(/) T S.v(/))- H(J )Sx(J)- H. (f)Sx(/)
s~(f) = ll- H(JWSx(J) + lll(/)f2Sv( f) (*)

Comment"': Ir we view }'(I) as our estimate lo r X(l). then Sl(/) is the pO\\ er spectral
dcn"iity orthc error s ignal Z(l} = 1'(1) - X(l). Equal ion (*) sugg~.:st'\ the li.lllowing:
154 Student Solutions Manual

if ,\' 1 ({).~' , (.(} let H(_{)=:;l


i' ,,., c.n s, < n let H < n =:; o
that is. select//({) tn "pass" the :;ignal and reject the noise .

@0 40
. a) II (/) L(2
u
-I )" e t"!.x"' I
- - -----=--
- l- 1 e-t1:rt

:Vo/ 2
t- l.e
I
'1"'

I \ '
' II

From Pnlh lcm I0. 13 "c 1-.mm that


Ch. 10. Analysis and Processing of Random Signals 155

@a) [}~~] = f [} ~ (~ o ;Yn-1 + ll n)]


~

= ErY,Rr(t) + R,, w\0 )


=1

Rrw(O) = e [(~ai}~- + Wn) w"]


9

= La,fl~_, tr,.J -rHw(Ol - llw(O)


.=1 ----
0 ---

... /ly(OJ =
"
.La,R,(i) + Rw(OJ
=I

R,(k) = [r~- (t. o, }~- + II


'
= Ea;Rl'(k - i) I [ )~,
i =l -- ~
.[}~-#; J&ll ""1
....._____...
0
q

= L<t;R) (k- i)
i= l

b) Yn = rYn-t ..._ tl "n


R1(0) = rR}'(l) + Rw(O)
Rl'(k) = rRy(l. -1} ~ R)'( I )= rRt(O)
, Rw{O)
=> ftl"(O) = r R>'(O) + Hw(O) ~ Rl(O) = - -
1- ,.'l

~ r
=> R1(k) -
{
-
=

Rd-k)
-----
( R., (O) )
1 -rl
.. '1

=u~rlkf
I
k>O

k <O
156 Student Solutions Manual

10.3 Bandlimited Random Processes

~a)
~
//(/ ) = j2Jr I
T
. ltl<-t-
.

h(n) J ll< f k' /t'"c(( = ~ ~ f2~r.fe'b1"c(f'


2

=- i2~r[ -I- 1..e ,~ ...,, - -I- x -I -e 12ttt"]~ . ,, ..~. . ()


T j2Trn j2m7 j2m1

i~." [-._1- ( e''"' + e_,,ru )+ I 1


{ e'Jr" - e- 1 11 ) ]

l t4rm (2m1)

_ ..!_[CO~lfll sin 1rn]


=
~rn cos rm - sin ;m ( I)"
- . l l :t
()
j' II J[n
2
T m1 1 11'1'

and h(ll) = 0. 11 0.

@ Y t) = .4(t)cos(21r/cl ~ f>)--.N(l)
.\ ft)
Assuming Xtt) nnd JY(t) are independent random processes:

fwm Example lOA md thP. fad that E[.\(t)j = 0.


Sy(f) = Sx(f ) + SN(.f)
- ~S'A(f- JJ + ~S'A(f +/c)+ S,vtf')
Ch. 10. Analysis and Processing of Random Signals 157

where we .1ssumPd lhat ~A(/) 15 bandlimited to lfl < H .

@ \(t ) = tlltlcos(2n'f.:/ +f))+ B(t)sin(2r.fcf + 0)

!X(t)X(t + r)) = ,q,4(t) A(l + r) cos(2?r/cf + 0hoq(21f /cl I 21rfcr + 0 ))


+E [A(l)B(l ~ )cos('2~f, t t0)sin(2~fc 1+27r/c r 1-9)J
-! t"{.:t(l + T) B (ti co-(2r. f.t + 21l' fc'T + e)
in(27r Jet- e ))
+E[B(t)B(t .... r) in(2!i fet + 0)sin(2:rj;t + 211/cr + e )
1 l
= 2R.~(r)r0<: '2r.fer + 2RIJ('T)cos'l1rfcr
1
- ::;(R ,;( :-) + RB (r))ml~2n-/. r

S)i (!) = ~fB..tU +/c)+ Ss(J + /,) + r.;A(f - fc) + ::,:.{! + !c)J

Sx(J)

_j_ __.. f
-Jc 0 J~
158 Student Solutions Manual

10.4 Optimum Linear Systems

[
1 +r
,. 1-
r
r ) [ lzo
11 ,
~J = [ ,.1 J
u2
where r = f1~.
~

[ II,hu] =l l + f I)l-r [ 1-+r r 2

l I
f. j(Zt - 1~?1 = Rz(O)- L h!JRzx (B) = U7.(0) - L h 1w~rlfil
;3:0 (J (

1- r-r 2
l'r ]
= T1 [ l - (11 r p- r7 - (I 1 rp- r 2 ,.

=
[
rr.,.2 1 -
(1 + 1')(1 - r.!)J :!'I
;;:
.. (l + f )l- r2 (>.1

\ InCl.: J' = ~ . I' = :Yt.

h) p 2:

l ,] [*]
[tI *Jfh I t h2
") h, =t h, =0

@ g(/) = lf Ill < W S,-.(1) = ~


0::: (f) iS l'ot
H(f) - ... z - 2_ - -'' -' - I ~ tl'
- Sz{/) t SN(/) - ~ + ~ \'1 -t A

j("O Sz(f)SN{/) N.t',


2
f.le (t)J =
-oo
. (f ) + .......
::>z c; u/f = N 1 + No:.m =
Ch. 10. Analysis and Processing of Random Signals 159

s, < n =s <n + s, <I>= _ 4


. l,' cos 21r.f
+ 1=_:.:. . ____.;._
f-cos2~r! cos2T(
} { 1- Z,e- 12 z 1 )( 1- L,e 1 ~ 11 )

(I -1 e-J2trt )( 1- !eJl.Tt)

after fac toring the numerator and denom inator '"here

Nc~ t consider:

R 1 (k} = F[L11 .,(Zn + N }] = Rz(k)


=> S"'' (/) = Sz (f)
I hus

tiller p<trtiul
] rraclttln c'pansi(ln

ami linally

II . -IV . If - I - 2I t, -J 2.Tt ( fT )(
4 V' I J
(./)- (/) 2(()- 1-L,e ,v,, 1-f L, 1-fe ,~tel
160 Student Solutions Manual

{I 'i',l

=1 / e
1
121:'

-(/ t),_z:
lr. - ( / ----:}:, I ;, 0

is the impube n:sponse of the optimum lih~:r.

*10.5 The Kalman Filter

@ l, (1.,1/111 1 11', 1

PI/ 1/~ 1/ ~ -I- PfH~.-~1 z,_,.z, ,.... ]


=J>fW ,]
= J>[Z I Z, 1]

X, - / ~ N,
Gl, ,L I +II', I+,\ ,
=a, 1( \ , 1 - fir 1) + IT:, 1 + Y,
= (f, I \', I a Nil I + rr :. + N,
I

Similarly,.\', is Mm~n via n .

*10.6 Estimating the Power Spectral Density

@ .t) I h~: fl,llo,ving Octa\C code plots h\O 128-p<'int pl.!nodograms:


x fft(un iform_rn(O,l, l,128 ));
y fft(unifotm_rn(O,l,l,128});
plot((x. conj(x))/128}
hold on
plot((y . ~ conj(y)~/128)

!1)
x fft(uniform_rn(0,1,50,128)); \ 'lO pcritdugrams
plot(mean( ({x. *conj(x)))/128 ) ) ); \ \' ~:r.11.!.~d IX' I iodngram"
Ch. 10. Analysis and Processing of Random Signals 161

n 19 ..,., _
r---.----.-----.----r--.---.----,
0!1

0~ ~-~-~-~-~--~-~-~
0 lO 40 6IJ ell liM I I .'0 110

@ We tu!..e the expected value of the Fourier trun~form or 11 (m):


~~[ i (k-I m kt,....n~-l .\' .\' ._ ]e-'!./1ff]
I

l
A,,

= L
A I I L
[_. - I
R (m) e 'I
,,, k-I m~
l.t-\li(JR , ,.,,

A I
= L R, (m)e '2"""
11 !A II

l'hc estimate i-, hiascd because the limits o f the <;ummation ore finite.

10.7 Numerical Techniques for Processing Random Signals


~a)
~ \Pl0.82
\Pa1:t a
c l ear all;
ClOSP all;
N 256;
M c N/2;
k = - M: l:M - 1;
alpha = 0.'15;
Rx 4*alpha.Aabs(k);
Sx .. fft(Rx);
figure (1);
plot((k+M)/N,sqrt(Sx. *conj (Sx)));
title('Pl0.82a');
162 Student Solutions Manual

P1CIIZII

p 10.87
close al l ;
clear all;
n 0:0.0 1 : 1 0.23;
r exp(-2 .* n);
%r (-0.5). "' n;
K a toeplitz(r);
(U,O,V) svd(K);
X norma l rndl0,1,1,1024 l;
y. v cu"'o~SI * X ' ;
plot{y);
z autocov(y,200) ;
plot {1 : 2 00, r ( 1 : 200) , 1:200 , z ( 1: 200) ) ;
tltle( ' Prob lem 1 0.87 ' ) ;

Probiern 10 R7

ue

06

0~

.01
0 6 rn ,. 2" ~ Ill M <10 w
Chapter 11: Markov Chains

11 .1 Markov Processes

@ t~) The number X, of black balls in the urn tomplclcly spec:ifi~s rhe probabilit) Jf
>111<' H 11~ of a tri<ll; t.here{ore X,. is indcpcndet1l of its past. \'alue and Xn is a Markov
pro< 1":-~~. f)
PIXn = 4IXn-1 = 5] =
10
= 1 - PIXn = 5IXn-l = 5]
4
P[Xn = 3lXr.-t = -!J =
9
= 1 - P[Xn = li.Xn -1 = 1]
a
P[Xn = 2IXn-t = 3] = 8 = J - f'[Xn = 3IXn-t = 3}
:?
P[X,. = l jX,_1 = 2) = -7 = 1- PIXn = 1jXn-l = 2}
1
P[X,. =0 Xn - 1 = 1] = 6- = 1- Prx.. = IIXn-1 =I]
PIX,. = O)Xn-1 = 0} = 1

b) /\II tmnsitinn probabilities arc independent nftime 11.

C) I el rn the number of black balls in the urn.


t'or k = 1. .... K :

PI X = k - 11X = k ] = , _ _k_
II " K +k

1'1\ 11
= k I X = k ] = -k-
II K+k

I'
12
K e I e () 0 0
1:~
K I

- ."--. .
K
(

ol I
0 0
., ~~-1 K+l i\ + I
K K 2
0
I
i\ .. , i\ +2 \::)
~-
()
---
.~.
/,;-.1
A
~ -;
2
.L
1
I

163
164 Student Solutions Manual

= (r., .r t)
P[~+t = (xn+t.Z,.llb = (:rn,:rn-l),Z... 1 = (.r:n Jt.Tn 2) ... ]
all past vector
= P[Zn+l = {:r:.+t 1 7n) X .. = .r
\: -11
all p.1st Bet noulli I rials
11'..XL trial
= P(\n+l ~ .r .....t)
= P[~+l = (:rnHr.n) b = (rn,:rn_t)J
:. Z.,. ill ,, 1\ larkov proct>.Ss.

whr>re p = P[r =I]

11 .2 Discrete-Time Markov Chains

@ 1 0 0 0
I ! 0 0
0 0
0 0
~
(I
5
0 0 0 0
a) r = ~ !
0 0 8 0 0
0 0 0 9~ :;
0
0 () 0 0 t
..&.
JO
.!.
10
Ch. 11 . Markov Chains 165

0 0 0 0 0
11 25
0 0 0 0
itt 25
0 0 0
b) p:.a = :Zl
0
lj4 [is 25
0 0
2~ 4f!l 64
9S 15
0 0 6 19'2 8t 0
2 1!1 !
0 0 0 9 ~ 4

19
]1.;4{:?) - from P 2
36
1- cltilnge(l) no r.hnoge(l)
P.s~(2) = Ps5no change(l)11s4change(!) Pt.t P4t
1 1 15 19
= 22 + 29 = 36 ..;

c) ,\~ n -too ev<>ntually all black balls arc rewove<L Thus

1 0 0 0 0 0
1 0 0 0 0 0
pn--+
I 0 0 0 0 0
1 0 0 0 0 0
1 0 0 0 0
()
1 0 0 0 0 0

@a)
0 0 0 0
,,
..L h
iii
'I
iii 0 0
1) -= 0 ..!.
lfo
.!.
Ill
i.
16 0
4 ll I
0 0 it. 16 16
0 0 0 0

h) and c)

fJ c

0 1.0000 0 0 0
0.0625 o. 3750 0. 5625 0 0
0 0.2500 0. 5000 0.7500 0
0 0 0.5625 0.3750 0.0625
I) 0 0 1.0000 0
p
' -
0.0625 0. 3750 0. 5625 0 0
O.Ol3o1 0. 3438 0.4922 0.1<106 0
0.0156 0. 2188 0. 5313 0.2186 0.0156
0 0.1406 0. 1922 0. 3<138 0. 0234
0 0 0.5625 o. 3750 O.Ou25
166 Student Solutions Manual

p
It ::

0.0215 0. 2754 0. 51St> 0.175S 0.0088


0.0172 0.25 tl 0. 5131 0.2043 0.0110
0.0144 0.2280 o. 5i51 0.228(1 0. 014'
0.0110 0.2043 0.5Bl 0.2514 O.Ol7l
0 . 0088 O.l/58 0. 51S6 0.2751 0.0215
;I ..
0.0117 0 . 2317 0. 51-13 0.2254 O.Oll9
0.0145 0.230 1 0. 5143 0.2270 0.0141
0.0143 0.2}36 0.5143 0.228(\ 0.01 13
0.0141 0.2270 0.51~3 0.2301 0.0115
O.OJ39 O.V54 o. 5143 0.2311 I). (ll.U
0(}
p
0. 0 1 13 0. 2286 o. 5143 0.2286 0.0113
0.0 1 B 0.?7.86 0.5143 0. 2286 o. 0113
(). () 113 0. 2286 o. 5143 0. 2786 0.01 H
0. 0 1 13 u. )28() 0.5143 0.2286 O.OH3
0.0 143 (). 2286 0.5143 0.2286 ILOliJl

~
~ .'~uc{O.l} where 0 = workirag. 1 = not wnrking

a) p = [ 1-a
b
a ]
1- b

1-a l- b

b) l'o lind the cigcnY<llu<.s, consider

IP-MI (1-b-A)(l -a-,\) ab=O


~ ,\1 = l ..\2 -= 1 -a - b

'jJ hl'n tht> cigcn" clor!l rue ft = (1. ~J. r2 = [L -1]. so

E = [ '-t
~2 ] = [ 11 ~~
! ]

and
E-t _ _
1 [a b ]
" -a, b a -a
Ch. 11 Markov Chains 167

and I hu~

P" = E-1 [ ~ (I - ao- b)" ] E


= _1_[a+l1{l-a - b)" b-h(l-a b)"]
a+b a-a(l-a-b)" b+c( l -a-b}"

c) U < a + b < 2 since 0 < a < 1 ~tud U < b < 1


- 1 <1-n- b<l=>(l-a-b)n -+0
:=:}

,. P" --+ [ oih ol b ]


;j:i ;;n

11 .3 Classes of States, Recurrence Properties, and limiting


Probabilities

@ a)an<.lh)

i)
1 t:'U rnnt

i i}

{0} 1et'Ullt'JI.

11.21 recurrent
168 Student Solutions Manual

C)

,, =[~ ~] :~]
0 .L .4
.!
[A
(i) .L
2
A' =[l .L
.L
..
l
!] lm = .4 .4
.4 .4

"' =[~ ~]
0
(ii) I
1
A = .1 . 1'~- I ...,s =" ... ( I & I alternate)
() ()

@ a) 1 his is fl po.;it.iw renurenl :\IarkcN chaiu.


l'or t>ta.te tl the mean firt-l r<'lnrn time i!'l (f;f'C' qolution of T'mlJlctll 11.25)
.s :l
{1;1] = 2 ~ I =- => 11"0--
-..r- 2 5
t\-l-0

Fo1 state I
c[1'l 1-
"
1
'J. -
3 -l - 5- => ""t
+ .. = -2r;
- 2
,____.. ..__.,
2 2
1--<U-1 l-J-o-1

lor sLate 2

h) 1f AyRtcm start~ in state 0 then {11] = 1 => 7ro = I


=
If systttn tart.:; ia stnLe J 01 2 then ('11J {'121 2 =
_..._--_I2
--rJ-112

iJ I hi' i.., an irrcuucibk positive recurrent ~larktn chain.


Ch. 11 . Markov Chains 169

,
p, = flo Po =5 = 1'1
1'! =1 p, I }2 -- 1~

ii) I hi-. i-. n multiclass MarJ...ov chain. Clac;s I consists of n c;ingle recurrent state.
Class 2 has 2 recurrent states and has period 2. ()uppusc \\C calculah: the stational) pmf:

Po = Po p, =Po J111 1- 2p, = I


p, = pl p, = p,
Pl = p,

l- a
Lei /)U a.. then p, = p2 = - - .
2

@a)
0 I 0 0 0
0 0 I 0 0
i) P = 0.5 0 0 0.5 0
0 0 0 0 I
() 0 0 0

h) I he Markov chain in i) is recurrent and periodic.

c) !'he left eigenvector related to eigenvalue I f(lr i) ic;

ff = [0. 1667 0.1667 0.3333 0.1667 o 1667r

d) '\s \\e take po\\ers ofn \\e obtain a periodic sequence of matrices:

p1. I' l . I'~. p ! . p-' . p~ ....


170 Student Solutions Manual

q ~I'
q

'[his is an aperiotHc Markov chain==> Pi,(n) -t :ri as n -t 0<:

p
r.l = --o
q
,
1 1 Jl
lf2=-(x-,-pxu)=- --p-ro=
q t7 q ( ) () p
q
'iro

tro = 1- (~)9A1+1

; 1-\~): . . w'
@ a) an= ./,(n) l h~ probability that the first n:tum occurs after 11 ~!cps.
h, = p (11 ) 1 he prubabilil)' that the return is inn sll.:ps.

h11 = I first return in I ~ tcp same a-. an) n:turn in I ..,tep


h, = a1h1 + a-"c,
nr-.t rctu1 n in I ..,tep after an) return in I -.tcr
" lirsl return in two ~tcp s..
h, =a/1 1 -t a~h" -t + o,h0
"lir-.t rc.!turn in I step after an) return in 11 I -.tcps..
tirst return in 2 stepo; after an} return in 11 2 <;teps

.. lir-.t return in 11 'ltcps


Ch. 11 . Markov Chains 171

1hcrcforc for 11 ~ I
,, 7_

h,.- L: athnk = L: athn-L '' here \\C t.lclinc 0 h 1= h 2 .


I l-1

h) ~1 ultip l} ing both sides of the abm.c c4u.llion h} ::!' and summing O\er n ''e
obtain

= 1-l A(z)B(z)=> ( I-A(z))/3(:) = 1


I
/J(:) = - -
1- A(=)

c) 1; = 11ever returning to state i ]


- L P[ fif'<\t return to state i at time 11 1
, I
,
- L: a, = lim ..1(:-)
n I ~ >I

d) ~tate i io; recurrent i tT

L fJ11 (11) =oo~ L"" bn = oo


.0
II I II

Bul i>,
"u
- lim B(z) = lim
1
1
= 1- A( z)
1

'I hcrcl'orc, stntc i is recurrent iff lim/J(z) =o:>and ifT lim A{:)- .1; = I .
:-)1 .,

11 .4 Continuous-Time Markov Chains

@ I tom Ex. ll.lfl we have

Po(t) = _P_ + (pu(O) _


a+~
_L)
n +fi
c-<o+.Ol'

Pt (t) ~
OTJ
+ (Pt (O)- - 0 - ) 1!-( +.O)t
ai{J
172 Student Solutions Manual

n) Now suppo ' c know the initial ~ale i!l 0, theu .ro(O) = 1 ~

Poo(i)

If the initial6tnte Js I, tl PO p 1 (0) = l =>

:. Ptl)

h) P[ '(1.5) = I' X'(3) = II X(O) = 0)

= P[X(:l) = l/X(l.5) = 1. .\'(0) = 0 P[X(l."i)- I .:qo)- 0


P[X(:i)- 1/.\'(1.5) = l)P{X(1.5) = 1/A. (0)- OJ
= Pu ( 1.5)An ( 1.5)

P(.\'{1.5) = l.X(J) = 1] = P{X(3) = 1/X(I.5) = ljP(X(1.5) I]

= PIJil.-1) [a:~+ (p (0) ~1 t; ,) ,-(a+ l~]


1

@ l,et .V(t) =#of sparest t timP. t


N(l) dtcnasca by one <.'acb ti me a part break~ clown, allli Ll e lime betWL'en break-
downs is iudcpeudent exponential R\''s with rat~ o.

a)
l_]< II

= P[t- j breakdowns in tinu~ tJ


(at)-J -:>t

= l - j)!'
p;0 (1) - P[t or more "'breakdm,us" in time t
-l (C\t)"
= 1- ~ - -e-'
<=n k'.
...._.
Ch. 11 . Markov Chains 173

0 0 0 0
1- e-ot e--<)' 0 0
1- t (at)k e-oc ate-oc e-"r 0
b) J> = A-=0 k!

,._J ( at)k (at)"- 1 e-oc


1- }:--e-oc
A=O k! (n- 1)!

c) 1J1t(O) = l

~ p1 (t) = Pr.J(f) I $ j $ ''


n-1
Po(t) = 1 - E PJ(t)
J-=0

1 h t1 ltllSiLicm rate diagram is:

Jl ,,
Eqn.ll.42 applie" here. "0 we have.

P1 ~1 (.\) P, = (P')J+I P
= -;; 0

'l'o hnd Po consider


174 Student Solutions Manual

*11 .5 Time-Reversed Markov Chains

@ a) I he \lUll! transition diagram i~:

'I hi s is a birth-death process. so b} Example I I .44 it is rcvc rsibk. Ira process is time
re vc r~ ihl ~.: thcn

,., P,, -= ,.,,, (I

=> rr, Pu =lr,., " HI.I


+I

IT, ( I- +) - rr, 1 ~.'


Jr, = 7;;-- lr,

@ 1rtPJi (~)i Pii


q,) - --=
1ri
(~)'
(~)'+l p
=> q,,i+J -
(~)'
. Pi+l i = - q = Jl
q
= p.+1
(~y-1 p
q,,,_l - (:r . - 'ip
t-1,, - p _ - q _- p
-1

qoo - q = Poo

=> Yes, process is time reversi ble.


Ch 11 . Markov Chains 175

11.6 Numerical Techniques for Markov Chains

~ \P. l l.65
N 1 00;
b .. 0.5 ;
a 0.5;
iter 0;
X .. 0;

For i = 1: 1 000
p l = rand;
I f p l < a && X < N
x = x~ l ;
e nd

p 2 .. rand;
I [ p 2 < b && X > 0
X X -1 ;
e nd

res(i) X;
e nd

hist (res);

IRII r-

lhll 1- -
Jill .... ,...-- -
120 -
~
-
-
I()()
~

RO r--- -
60 - -
-
40 -
r--
:w -
(I
IJ 5 10 15 2(}
.,.
-~ J(l
176 Student Solutions Manual

t1Ui'
~ %P.ll.71
Nmax 50;
P = ZCtOD{Nmax+1,3);
mu = 1;
lambda .9;
delta . 1;
a delta lambda; \lambda/(lambda+mu);
b = delta mu; tmu/(lambda+mu);
P(l,:) [0,1 -a,a ];
r [ ( 1-a ) *'l.J, a *b~ ( 1-a) * ( 1-b), (1-b) *a];
f o r n 2:Nmax;
P(n, :) .. >r;
f'nd;
P ( Nma x 1 ) , : ) [ ( 1 -a) * b, 1.- ( 1.- a) * b, 0] ;
TC zeros(Nmax+l,l);
I C (1 ,1) 1;
!J 2000;

stseq zetos(l,L);
s [ 1 : Nmax 1 1] ;
step ( - 1 o, 1 J ;
Tnitst 1;
s seq(l) a Initst;
for n 2:L+l
stseq(n) = (stseq(n-l)+dscRnd(l,P(stseq(n-1), :),step);
end

.:!Cl
IX [

Ill

11

12

~~~~ \~
Q)

10
(/)

!!

/'
b

2
~~
II
II :\0(1 ((){)() 1500 :won 25110
~ll:p
Chapter 12: Introduction to Queueing Theory

12.1 & 12.2 The Elements of a Queueing Network and Little's Formula

@ \S.} = {1,3, 4,7,8,15}


{r,)- {:1.5.-t.2.1. l.5,4}

a) lo'CWS

:i, -rI D, lV; T;


I 3.5 4.5 0 3.5
2 3 4 3..j 1.5 5.5
3 4 2 10.5 4.5 6.5
4 7 1 11.5 3.5 4.5
,1) 8 1.5 13.0 3.5 5.0
6 15 4
where w. = v,_, - s. = n - T, and T. = D, - s. = U', + T,

Nil)
5
-l
J .

... I

< .v >t3

< .\ >13 = =
13
1 Au .,.
.< T >n = -I:Ii = ~
An ,= 1 ,;

25 ~ "5 1
< N >u - = < ' > ta< 'I ' >13 = a ,c.,
"
13 13 5

177
178 Student Solutions Manual

h) LCF'~
.
~I T, D, W,=T.-T: r, = o, -s.
1 1 3.5 4.5 0 3.5
2 3 4 10.5 3.5 7.5
3 4 2 0.5 Oo -
-) -0
4 j I 13.0 5.0 G.O
5 8 1.5 12.0 2.5 4.0

~. . ~ ~
2 -
I .
I
I
J 5 7 t) II I .\ 1.5

2.1.5 5 1')15
< :~, >u = < .\ >t3 = <T't3 =
13 1'3 5
< N >t3 < ,\ >tJ<T>u

c) Sh<Jt1cst. Joh rir~t:


I si Tt [), W,=Ti-Tl T1 =D,-S,
1 J 3.5 4.5 0 3.5
~ 3 10 5 3.5 7.n
3 2 6.5 0.5 ) -
_,()

l 7 11.5 3.5 4.5


5 8 1.5 J.l.O :!.5 5.0

Nft)
~ .
1
-' .
~

I
3 5 7 () II 1.~ l!i

23 r, 2.1
< J'l >13 = 13 < ,\ >Jll = 13 < T >t3 = 5
< N >13 - <.X >ta< T >t3
Ch. 12. Introduction to Queueing Theory 179

Lit de's formula. -:::}


m, t . .
f(N;J = .\ 1n1 = - - - -- =
tn
70

tunc cus omcr m queue'
m 1 +m2 +m3
3 m
\ t[X,J _ 2: '= 1 ::::> one <n~t.o ner in sys1e111
=I m1 + m~ -r ma

b) (..cL C(TJ = mean cycle time per cu ~rlomtr, lhco

total #
=X= \[f] by Lillie's formula
in system

b) .\m = 2

,, 5 ~
c ) 1 = :\ = o
(m)
2 = 52m

12.3 The M/M/1 Queue

@ A) P[N~rl]=(l p) 2:
rn
<:<:

,r = o- p)--
l-('
= ""
(lfl

b) P[N 2: 10] = Pln = w-3:::} P- 10-o.3 ~ ~


l
:::})..~ - p
2

A) From Example 12.5


l l
:z: = --ln--
p-A 1-p
= _!_ln_I_
X 1 -p
1 1
JA - - to--
X 1- p
= 2- -:JI I n[ --1 ,!)- = 1.232,
180 Student Solutions Manual

b) I rom Problem 12.12


111 p I ..\
x = - --ln--
-ln-- =
1 -p 1 -p JJ - ..\ !l(J - p)
1
2 - - -1n5.\ => A= 2- 1n5A
2-,\ 2
~ A= 1.13

@ u) M/M/ 1/5 ~ (>slate~:

-A A 0 0 0 ()

)I (pt A) 2 0 () ()

0 p -(p +A) _.t () 0


<i> r= () 0 Jl - (p+--i) A ()

() 0 0 Jl - (p +A ) A
() 0 0 0 Jl -p

- 0.5 0.5 0 0 0 0
I - 1.5 0.5 0 0 0
0 I - 1.5 0.5 0 0
=
0 0 I - 1.5 0.5 ()

0 0 0 I - 1.5 0.5
0 0 0 0 I - I

fJ(/) = <' ' EjeA' IE I

0.2644 0.4487 0.6172 0.8661 0.74R7 0.83 19


0.58H2 0.7661 -0.6 172 0.4.111 0.21 C)J 0. 1870
- 0.5882 - 0.3 173 -0.3086 0.2165 0.5294 0. 1870
I
0.4 26 i 0.1587 0.3086 o. 1mn () 26~7 0.3225
- 0 2280 0.2708 0.1543 0 054 I - 0.0775 <UOI4
0.0661 - 0. 1122 -0.1543 0.0271 - 0. 1872 0.2080
Ch. 12. Introduction to Queueing Theory 181

e ',:!1
0 0 0 0 0
e-:UII
0 0 0 0 ()

0 0 e-so1 0 0 0
k l J=
0 0 0 I 0 ()
liN t
0 0 0 0 I! ()

0 0 0 0 0 I!

-0.0578 0.2573 - 0.5147 0.7460 0.7980 0.4627


0.1 262 0.4309 - 0.3570 0.3570 1.2 188 - 1.0097
0. 1800 - 0.3600 - 0.3600 - 0.7201 0.72 0 I - 1.4402
F~
J
-
-

0.5864 0.5864 0.5864 0.5864 0.5864 0.5864


- 0.2106 0.1233 0.5956 0.5 <)56 - 0.1489 - 1.6846
- 0. 1820 - 0.08 18 0.5643 0. 5643 1.055 1 1.4558

Fle.l.' IE- 1 =X=> P(t) = P(O)X


\'(0) = 0 ~ P(O) =(I. 0.0. 0, 0) ~ J>(l) = first row of X=>

.OISJe -~, +.0566e-221' +. llll e- 1 ~ 1 +.50<>1-i . 1577e r- +.15 14e~ 1 r 1


11

1211 1 271
.J040e ' 711 -.0967e -. I I I I e \' + .2 340 .0462e 0 ;v, + .0340e -4
.J040e PZI +.0-Je-2211 -.0555e "' 1. 1270 . lll 5e o-'-.OJOe 0171

I'( I) -
-. 0246e 272
' +.02e-22 1' +.0555c 1 ~' 1.0635 .0557e 11
"'' t-.0587e ~' 27 '
.0 132e 2 721
- .0342e- 211 ' + .0278e 1 ~, + .03 17 1- .0 16Je 07
"' - .0549e-02 ''
272
- .0382e ' +.0142e-22 1' - .0278e 1
\t 1 .O l59-.0394e n?')' - .0379e-027'

l'or other initial conditions we can obtain XU) in the same way:

\ (0) -: 2 => P(O) = (0, 0.1. 0. 0. 0). P(t) - fl(O)f[e,~' j 1


~ third row ofX
f(l) - !'{0)/:je.~ 11
1
'(0)- 5 ~ 1'(0) = (0.0.0,0.0.1). 1
::> last ro'' of X
182 Student Solutions Manual

\ J?toblem 12. 17
% (1)
lambda 0.5;
mu 1;

v = -(lambdamu);
a "" lambda;
b "" mu;
L = (-a a 0 0 0 0
bv a o o o
ob v a o o
oob v a 0
oo0 b v a
0 0 0 0 b -b) ;

[ E D) eig(L) ;
t sym ( ' l ' ) ;
NO "" l;
pO = zeros( l ,6);
pO( NO) = 1;
p pO *E*expm(t *D)*inv(E);
f = inlinei'E*expm(t *D)*inv(E) ' );
f f = pO *f(D,E,t);
\Example: pO *f(D,E,2) will compute the amount of p!2)
\Plot symbolic function
ezplot (mcan(ff));

NO a 3;
pO zet OS ( 1, 6) ;
pO (NO) a 1;
p = pO~E*expm(t * D) * inv(E);
f = inline( ' E*expm(t *D) *inv( E) ' ) ;
ff .. pO*f (0, E, t) ;
%Plot: symboliC' fu nct: ion
ezploL (mean( [ f)) :

NO .. 6;
pO Zel'OS(l,6);
pO(NO) = 1;
p = pO*F.*exp(t*Dl *inv(E);
f = inline ( ' E*expm(t *D) *inv(E) ' );
ff .. pO *f(D,E,t):
\Plot symbolic function
ezplot(mean( f f));

\ for part (ii) we repeat the same process with 1amlxla=mu=l


Ch. 12. Introduction to Queueing Theory 183

L
-0.5000 0.5000 0 0 0 0
1.0000 -1.5000 0.5000 0 0 0
0 1.0000 -1.5000 0.5000 0 0
0 0 1.0000 -1.5000 0.5000 0
0 0 0 1.0000 -1.5000 0.5000
0 0 0 0 1.0000 -1.0000

>> E

E
0.0438 0.0733 -0.0976 -0.1091 -0.4082 -0.0957
-0.1950 -0.2504 0.1952 0.0639 -0.4082 -0.0430
0.3900 0.2074 0.1952 0.3084 -0.4082 0.0860
-0.5652 0.2074 -0.3904 0.3084 0.4082 0.2967
0.6046 -0.7082 -0.3904 - 0.1807 -0.4082 0.5547
0.3506 0.5867 0.7807 -0.8724 -0.4082 0.7654

D
-2.7247 0 0 0 0 0
0 -2.2071 0 0 0 0
0 0 -1.5000 0 0 0
0 0 0 -0.7929 0 0
0 0 0 0 -0.0000 0
0 0 0 0 0 -0.2753

>> inv CEl

ans
0.3490 -0.7764 0.7764 -0.5627 0.3009 - 0.0872
0.7722 -1.3183 0.5460 0.2730 -0.4661 0.1931
-1.1386 1.1386 0.5693 -0.5693 -0.2846 0.2846
-1.4456 0.4234 1. 0222 0. 5111 -0.1497 -0.3614
- 1.2442 -0.6221 -0.3110 -0.1555 -0.0778 -0.0389
- 1.5822 -0.3556 0.3556 0.6133 0.5733 0.3955

II 1(,/, I

(I ~~~ .7

( I (h67
-:::
~
t: 0 16!:17

0 1667

0 ' '"7

.1.
~ 2 0
I
2
t.
l
..
<
Ttn!<.'
184 Student Solutions Manual

NO = 3;
..
pO zeros (1,
pO(NO) 1;
- 'r
6);

0 ltll'7

(/ 1(1(,7

lllflh7

-,-..
ey tl lhll7

II l(oh7

II lfh7

0 l (t<t7
~------~------h-----~-------L---- I
(t 2 (J 2 4
lun.:

NO "" 6;
pO zetos(1,6 );
pO(NO) 1;

0 lft(7

n 16fi7

II lh17

::
;; lj 1{1117
r:a
111667

0.11>()7

ftl(ll'\7
L l.
c. 4 1 II (
Ttmc
Ch. 12. Introduction to Queueing Theory 185

Part (ii)

l.ambda .. 1;
NO 1;
pO = zeros(l,6);
pO(NO) c 1;

---r------.------.------~----~------,

f- ,. 1

..
~
(1 lllft7

[ij IJ lhlt7

() IM7

l) 1{17

Olf11>7

--.1.
- :! 0 l
lime
"'

Lambda
NO "" 1 ;
- 1i

pO
"' zeros(l,6);
pO (NO) 3;

lllhh7 I

() l f!M
j - , I.MIIt J
0 IM\l

II I I.Ct I
2
.-::
tr
0 1(,(,,

(I 1(1(>7

II 1(,(,7

1 IJ .! (I
rime
186 Student Solutions Manual

Lambda .. 1;
NO .. l;
pO = zetos(l,6l;
pO(NO) = 6;

'i J

lllhb7

ll 11><7
~
~
II It( l

0 lllh7

II 11..(>7

II H67
b 4 .! 0 ::! h

lime

12.4 Multi-Server Systems: M/M/c, M/M/c/c, and M/M/oo

@ -.=12
;; = ()0
5
r.=2
.\ a 1
::>(1=
p
= l P =-=-
~ 2

ll)

1
I I }- I
~ +21 -~
1
=3

b) [N} - [A.q +a=l~pC(c,a) -a= 1 i~3+I=~


f[T) - .!.t:(N)
A
=!9
Ch. 12. Introduction to Queueing Theory 187

@A 10
I
- =-
)1
1
2
-1
-=5=a
)1

8(0.5) = I

fl(I.S) = 5xl =5
I +5xl 6
8( 2.S) = S(i) = 25
2+5(i ) 37
S( 25 ) I 15
11(3.5) = Yi =-'--
3+500 236

/J( 4. 5 ) = 5(lli-) = 625


4+5(~. J25(>) 1569

/J(8.5) = 0.070 need 3 more scl'\crs

12.5 Finite-Source Queueing Systems

kt j = J(- k

= I - 8 I K, !.!.)
\ (I

Erlang 11
1 1 11
/{ = 15 - = 2 - = lO - 15
fJ () 0

B{l5, 15) = 0.18

P = I-n(J\.~)=11-0J =0~2
I
,\ = liP = 20.H2 = 0. 11
I\. 1 1j
f!TJ - -\ - D
= -
0. 11
- :in ti.ti
188 Student Solutions Manual

1. "'T" l 3''
h) g = L,-!!-
.L
=~
2
= 16
p.

c) If we ndrl 5 u~ers we exceed K so

~
C' Tf ~ -A" - -1 = 20(2) 30 = JO
J1 Q
.\ :::: p=2

1 A-1
f/TJ - -
11 l-c
L (k + l)P{i\ 0 = AJ

l h -1 (o(p)~
~ ('
- L.. ,. ... J)K~t;-1-l)! U!t j = K - l - k I 1' - ]( - I - k'
II 1.-=0 ~ (o/IJ)It'
L- (h -l-Ie')!
lc'=O

1 K -1 fdcl:
- j; {;,(I<- j)--K=--1---'(~!.:.-.'!/_a....,.)'',...---
-~
~
J'!
probs of M/M/K-1 / K-1

= /( - o:J1 ( 1 - B(I( - 1, ;: I')


mean# iu M/M/K-1/K-1

= ~~ - ~ (1- 8(K- 1, ~))


Ch. 12. Introduction to Queueing Theory 189

From Prohkm I::!.26

[T]

(T)

13ul for Prohk:rn 12.34 so lution

p = ~fl = l - B (t\ 1' ) )'


I\ ]
"4 (T] - - - O!l desir<'d J
' 0

12.6 M/G/1 Queueing Systems

@ k Brlnng RV Y' witll paranwlcr k and ,\ lJ<ls


k
fXJ A

Sine{' f[X] = ,,..!. we have lhat ..\ = k1t i\nd


A ft 2 = 1.-,,'J
11 tRI \j 1
= EIXP - k
= p(1 +
2( I - p)
co
f( J =
r
jl
2( I
(I 4 t) i{T
- p) I
r..r ~t /M/1 \\ 1' l<>t k - I and obtain

Im 1/D/l (~ 0 S<)

fW LH/D/l = 211 p p) t'(T)

.. E[IV]M/Dil < (W]\f/F.~o/t S t"[WL\t/M/1


Sin c !'1'1- 1WJ + t'!rJ Lhe :>ante ordering ;tppllcs for total !.lela,>.
190 Student Solutions Manual

@ ;'\) Let r = tnlal job time. X - serv:ic~ t ime, N( ...Y)


. = Tl" breakdown dudnr.c X , R,
- r 11air times
N(X)
... =X+ L R.
r=:l

whc:e S(X) i the total number of t!mes the machme breaks do\ n lo find C(r) w.. use
couditional expeclntiou

C(rJ = t:[t.."[riXlJ

[r1X = fj = t + [~l n,] = t + at11~ lrmn Fq. 17.Dl


1
= f.(X + a:X(R]J = fXl +ct(X]f.(RJ - I'
[1 I " ]
{:1
t(XJ( 1 ~or(R])

We nl~o n~e couclitioual <'Xprd at ion to find E[ r 2]:

E[r 2] = C[[r 2 jXJI

['IX =I) = [ (1 +'f. II,)']


= L' + 2t [}; n.j + c [ {~ 1~)']
= 1
2
+ 2t(al +f[RIJ + [ (~ 11;)'1

[ (?; ~rJ -+[('f. 1/}N(I)ll


[ (?; J~)' =kl )N(t) = [t,t, R;R;l
... t: [ (1\'E~
a=J
(t) ) l] =

= f.[N{t)}(R1]..:. ((:\1 1 (t ) - ( i\ lt)]lE R] 1


=
atC(R2 } + (crt+ (ot)~- at)(R'2
= atE[Rl] + o 2 t1 (R)2
:. E[r2 ( X= t} = t 2 + 2at2 (R] + nt{R2 ] +a 2 t 2 f R}l

finally
E[r~) - E[X 2 + 2aX:2E[R), aXE(H 2] + o2 X 2 C[R )
2

= E(X 2 ] [1 + 2o[R] .1. a 2(Rj 1 ] t-E[X)crC[Il2 ]


{l+o[111)1
Ch. 12. Introduction to Queueing Theory 191

l~ lR[ r) = !'[r:IJ - (:-]'


= {.X 2 }(1 ~n(J?])'2+C(XIuC(ll2 )-[X]2(1-t oflf))2
= V,lR[X](l + n-[Rl)2 + C( ' joC(/l2 )

;:: ..!..1 (1 + ~)l + ~~


Jl f3 Jl p2

b) The c-oetlidPnt of vari:~tion of r i'l:

c,_ t'AR(rl = ~(l+af +J:;r = 1 1 2o


,. f.[r)'l J (1 1 ~) (n I {1) 2

' l'hutl tht rnNIIl dt~lay iu the system j.,.

C[TJ = C(T]-1 E'rl ~( ~ p) {1 + G~)


1

tl] [t + {1 ~ p) ( + (u ~' fll')]


whr.re
p = .\{ rJ = ~I' [1 ; ~]
p

@ a) The provortion of time that t he ~rver works on low priority jobo; is


,
P2 = 1 - Pt = .\;[r,J
l l't I ,\l t:r rd
=>>.'2 :::::
[r:z] = [r:z]

b) From Fq. ( 12. 105)


.\1 t'[r?J + >.;[ r?J
(W1J = 2(1- Pt)
.\"~[ rlJ .\2C[ril
= 2( 1 - pt) J 2t l - Pt)
l.J. f.[T2] C(T-21
= ~ 1 +-2-
1 - >..c(rd 2Cir,J
192 Student Solutions Manual

12.7 M/G/1 Analysis Using Embedded Markov Chains

@ P = J1~ = (!!.)
2
I 11 =.!_
2

n) For an M/G/1 yslem we have:


r; ()-(1-p){z-l)f(.\(1-z))
JN - - ;; - f(,\(1- z))
where
4pl 4p2
= (~ f- 2ll )'l I.e:A( l-z) = ( ,\ - ).;; + 21' )'l
(t-~)(z-1}4f.l 2 _ 8
= z( \ - ..\z + 2JL)- 4f.l 2 - z~- 9z + 16
.\ 1
where we used the fact that - ,, = -2
9 + v'i7 9-Vi7
Zz-
2 2
"I z,.::, ,
l

= (t - . :. .) (t - .!..) = (1- .!.z) (t - ..l.z)


ifJ :: c, ~~

A B A = =.!J.iJ.
---=-- ~ zt-., partial fraction expansion
l - .l.z
8J
-r 1- .l.z
:2
B = ..!li.1.
ZJ-)

:. P[N = j)

P[ v = J I

b) I he J,aplncc Ttansform of bf" wailing lime is:


~s 1 [ ~ + 8..\s + 16.>. ]
2 2
(J - p)s
~l'(s) - -,\ + ,\i(s) =8 _ .>. + t:&
(+2~>)
= 2 s 1 + 7,\s + 8.\2

-::
l [
1+
(-Lli+~)
l7t'1 ). + ( 2 1717 ) ,\ 1
2 s+ c-0) ,\ , + (7 , 17) ,\
Ch. 12. Introduction to Queueing Theory 193

The total deJay llan~fow1 is:

i'(s) =
=

12.8 Burke's Theorem: Departures from M/M/c Systems

@ ~) lf a dcpa.rture leaves the systtm uoncmpty, then another customer c-ommences


"'P 1ce immediately. Thus the time until the nexl departme i~ an exponential random
variable with mean 1/JI.

b) If df'partmt: leave!> the system l'rnpty, then the lime unLit the next departure
is equal to t he sum of an exponential interarrhal time (of mean 1/>.) followed by an
exponential ser\'ice time (of mea.n 1/JJ).

c) I he Lapi;Jcc transform of the interdepart \Ire time is

_JL_
when a departure leaves system nonempty
s+ Jt
).. J.'
when a departure leaves system empty

).. /J
..!,., +s+>.s+p U,
prob. svslcm prob. tiysteru
left nonempty left. emptv
\ ..\(t'- .-\) ,\(s + ).) + ,\1'- )..2
= s + J.' + (.~ + >.)(., + 11) = (s + .\)(.'l +I')
= ~\
s-
::::? T,; exponential with mean 1/>.
194 Student Solutions Manual

12.9 Networks of Queues: Jackson's Theorem

1=3
1ro = pro+ 1rt + 1r2 } wo = ...L
Jra = Hl- p)n-o 2
-P ...!..::~'...
~r, - HI- p)?ro '~~' a - ,., = '2(2-p)

n) Then

$('3) == (1- Po)( I- Pt)(l- P2JIP~ + P~ +,.,;+PoP~+ PoP~


-'-PtP~ + P1f1~ + Plt'~ + P2P~ + PoPtP2]
= (1- Po)(1- Pt)(l- p,)[(p~ + P~ + p~)(Po I PI t P2) + PoPtf!2]

b) The program completion rate i~

3+'1 +2 L lt 'l _J
I P[1V _OJ)_ flo Poflt floP2 r PoP'l r PoP1 PofltP2
PI' I - 0
- - P/1 (pa + p~ + p~)(p., + (11 t- P2) + P1P2Pa
Ch. 12. Introduction to Queueing Theory 195

12.10 Simulation and Data Analysis of Queueing Systems


~ \P.l2.67
Nmax SO;
P zetos(Nmax+1,3);
mu l;
lambda .9;
delta ... 1;
a = deltalambda;
b delta*mu;
P ( 1, : ) = [0, 1- a, a] ;
t' ( ( 1 a ) * b , a* b+ ( 1- a ) * (1-b) , ( 1 -b) *a I ;
for n '"' 2:Nmax;
P(n,:) = r ;
end;
P (Nmax+l), :) = [ (1-a) *b, 1 - ( 1-a) *l>, OJ;
IC zeros(Nmax+l,l);
IC(l,l) 1;
L 2000;
avg_seq = zeros(L,1);
~vg _cor = zeros(L,l);
for j = 1:25
seq queueState(Nmax,P,IC,L);
cor_seq = autocorr(seq,L);
for 1 = l:L
avg_seq{ l ) Cavg_seq(l)*(j - ll+seq(l))/j;
avg_cor Cl) (avg_cor(l)*(j - l)~cot_seq(l))/j;
end
tond

plot (avg_seq);

funcLon stseq = queue_state(Nmax,P,lC,L)


otseq zeros(l,L);
a f 1 : Nmax ~ 1] ;
step [ -1,0, 1 ] ;
\!nirst = floor(lOOO*rand);
lnit.:st .. ceil(lO*rand);
st.:seq(l) = Initst;
for n 2:L+l
k = rand;
if(k<P(stseq(n-1),1))
nxt = step (1);
elseif (k<(P(stseqCn-l}+l,l)+P(stseqCn-1)+1,2)))
nxt = step(2J;
else
nxt = step(3);
end
nextst stseq(n-l)+nxt;
stseq(n) = nextst;
end
196 Student Solutions Manual

'- ' ' ' ' ' ' l


~~~~
Ill

s 8

r:r ~~n
(

~
c~

....
0
7

h
JA
r ,.
r-on
01

j
e
t1, I
t
.(

J I I i. I
:2rHI l()tl ()IKI l\IHI ICJOol I :!W 11!~1 I WO I KilO 'r~ ~~
St,l'

11 ~--r---r---~

- ,\(1)1 (j

,\ ''"'
1\tll t ~Ill
2
,l__ .__ _ _.___ _.__ _. - l --l---1
II :!till (,()(J IWO I)!Kt I ~00 fill )II I 1\11(1
Step

~
~ \ P.l2.73
' Pt epare Txansition Probability Matrix
ro ... 7;
El 1000;
cnt zeros(s+l,l);
P zeros(s,s);
for j l:s;
P(l,j) exp(-ro) *roAj/factorial(J);
P(2,j) = exp( - ro) *roAj/factorial(j);
end
Ch. 12. Introduction to Queueing Theory 197

fori .. 3:s
fot j = i-l:s;
P(i,j) = exp(-ro)toA(j-i+2)/factodal(j - i+2);
end
end

L c S;
stseq R zeros(l,L+l);
step = l:s;
Initst = ceil(lO *rand);
\Initst a 1;
stseq(l) Initst; =
for n 2:L~1
srseq(n) = dscRnd(1,P(stseq(n)+1, :) ,step);;
end

1 l engL h(stseq);
for i 1:1
idx = stseq(i);
cnt(idx+l) = cnt(idx+l)+l;
end

[Ol. i l:S+l
pmf(i) cnt(i)/s;
end

plot(stseq);

function [sample] dscRnd(np,pdf,v )

\if(sum(pdf) -= 1)
\ etror ('Probabilities do not sum up to 1' ) ;
\end

n length(pdf);

if(nargin == 2)
v [l:n];
end

Ctlmprob = [0 cumsum (pdf)];

runi rand(l,np); %random uniform sampl~

sample zeros(l,np);
for j = l:n
ind = find((runi>cumprob(j)) & (runi<cumprou(j+l)));
sample(ind) = v(j);
end
198 Student Solutions Manual

0.5

0-15

()_.j

0.'\'i

ru
~

=
0. O::!'i

0.2

I),J'i

0.1 -
O!Ji

(I .J.___
0 2 4 (, 8 I() I~ J.t f(, 18 :!ll
<;tate

Number of customers in each step:

l II
i'

0.5

0
li 21~) .j.f){) 600 11100 1.!011
S1ep

% P.12 . 74
T = 1000;
lambda= 0.5;
arrtime = -log(rand)/lambda; %Poisson arrivals
i = 1;
while (min(arrtime(i, : ))<=T)
arrtime = [arrtime;arrtime(i, :) -log(rand)/lambda];
i = i+1;
end
n = length(arrtime); %arrival times t_1, ... ,t_n
Ch. 12. Introduction to Queueing Theory 199

w = ones(l,n+l);
for j:a2:n-l
w(j+l) = max(O,w(j)+l-(arrtime(j+l) arrtime(j)));
TT(j) = w(j)+arrtime(j)-arrtime(j - 1);
end

plot(TT);

')
1- ,;-:y}]

IJ T- '1

l /I a~ ~
11

Ill

:II
K
UJ

3 6
~

J
fl
II 111 lfl() JIKI 4011 5tlll (,(l{l 71111 )i(ll

~lo:p
200 Student Solutions Manual

0.1)

08

..."8
I) 1

O.l

02

0.1

II L L
II ::! J 4
!),:1.1)

09

IJ.S

117

tl"
...~ 0'1

II I

03

112

0 I

C) L
Cl :! .I
llt:h)
Ch. 12. Introduction to Queueing Theory 201

Problems Requiring Cumulative Knowledge

@ ") Suj>po~e a cu~tomer arri\ed at Lime t 1 < 11 then the customer ha:. completed it.<:
, r time hv rime i with probability

Therefo1e customers that arrived ~n the iuten.,) (0, t) have probability or completing ser-
vice:

Thus

NoLc thn.i
1
>.tp = >.fo }\(t -fl)dt,

>.t(l- p) = >.t ulot (I - P,dt- t.))dt 1]

= ). fo' (1 - F.:rc(t - tl )dtl

------;---------- ----------
()

b) As t _. oo
>.t(l- p) -t >. fo' {l F'x(t))dt =>.E[XJ
.. P[N2 (t) = j] = (>.G~~\'])i e-.\F(X) PoiHson RV!
J

c) LiUle's formula
E[NJ = >.E(XJ

You might also like