Transcription of Probability and Stochastic Processes - WINLAB
1 Probability and Stochastic ProcessesA Friendly Introduction for Electrical and Computer EngineersThird EditionInternational Students VersionQUIZ SOLUTIONSRoy D. Yates, David J. Goodman, David FamolariApril 30, 20141 Comments on the Quiz Solutions Matlabfunctions used in the text or in these quiz solutions can be found inthe This archive is available for download from theJohn Wiley companion website. Two other documents of interest are alsoavailable for download: The Student Solutions A This manual uses a page size matched to the screen of an iPad tablet. If youdo print on paper and you have good eyesight, you may wish to print twopages per sheet in landscape mode.
2 On the other hand, a Fit to Paper printing option will create Large Print output. Send error reports, suggestions, or comments SolutionA1={vvv,vvd,dvv,dvd}B1={vdv,vdd, ddv,ddd}A2={vvv,ddd}B2={vdv,dvd}A3={vvv, vvd,vdv,dvv,vdd,dvd,ddv}B3={ddd,ddv,dvd, vdd}Recall thatAiandBiare collectively exhaustive ifAi Bi=S. Also,AiandBiare mutually exclusive ifAi Bi= . Since we have written down eachpairAiandBiabove, we can simply check for these pairA1andB1are mutually exclusive and collectively exhaustive. ThepairA2andB2are mutually exclusive butnotcollectively exhaustive. ThepairA3andB3are not mutually exclusive sincedvdbelongs ,A3andB3are collectively SolutionThere are exactly 50 equally likely outcomes:s51throughs100.
3 Each of theseoutcomes has Probability 1/50. It follows that(a) P[{s100}] = 1/50 = (b) P[A] = P[{s90,s91,..,s100}] = 11/50 = (c) P[F] = P[{s51,..,s59}] = 9/50 = (d) P[T <90] = P[{s51,..,s89}] = 39 (e) P[Cor better] = P[{s70,..,s100}] = 31 = (f) P[student passes] = P[{s60,..,s100}] = 41 = Solution(a) The Probability of exactly two voice packets isP [NV= 2] = P [{vvd,vdv,dvv}] = (1)(b) The Probability of at least one voice packet isP [NV 1] = 1 P [NV= 0]= 1 P [ddd] = (2)(c) The conditional Probability of two voice packets followed by a datapacket given that there were two voice packets isP [{vvd}|NV= 2] =P [{vvd},NV= 2]P [NV= 2]=P [{vvd}]P [NV= 2]= (3)(d)
4 The conditional Probability of two data packets followed by a voicepacket given there were two voice packets isP [{ddv}|NV= 2] =P [{ddv},NV= 2]P [NV= 2]= joint event of the outcomeddvand exactly two voice packets hasprobability zero since there is only one voice packet in the outcomeddv.(e) The conditional Probability of exactly two voice packets given at leastone voice packet isP [NV= 2|Nv 1] =P [NV= 2,NV 1]P [NV 1]=P [NV= 2]P [NV 1]= (4)4(f) The conditional Probability of at least one voice packet given there wereexactly two voice packets isP [NV 1|NV= 2] =P [NV 1,NV= 2]P [NV= 2]=P [NV= 2]P [NV= 2]= 1.
5 (5)Given two voice packets, there must have been at least one voice SolutionWe can describe this experiment by the event space consisting of the fourpossible eventsNL,NR,BL, andBR. We represent these events in thetable:N ?R??Once we fill in the table, finding the various probabilities will be a roundabout way, the problem statement tells us how to fill in the particular,P[N] = = P[NL] + P[NR],P[L] = = P[NL] + P[BL].Since P[NL] = , we can conclude that P[NR] = = andthat P[BL] = = This allows us to fill in two more tableentries:N ?
6 The remaining table entry is filled in by observing that the probabilities mustsum to 1. This implies P[BR] = and the complete table isN various probabilities are now simple:5(a) P [B L] = P [NL] + P [BL] + P [BR]= + + = (b) P [N L] = P [N] + P [L] P [NL]= + = (c) P [N B] = P [S] = 1.(d) P [LR] = P [LLc] = SolutionIn this experiment, there are four outcomes with probabilitiesP[{vv}] = ( )2= ,P[{vd}] = ( )( ) = ,P[{dv}] = ( )( ) = ,P[{dd}] = ( )2= checking the independence of any two eventsAandB, it s wise toavoid intuition and simply check whether P[AB] = P[A] P[B].
7 Using theprobabilities of the outcomes, we now can test for the independence of events.(a) First, we calculate the Probability of the joint event:P [NV= 2,NV 1] = P [NV= 2] = P [{vv}] = (1)Next, we observe that P[NV 1] = P[{vd,dv,vv}] = Finally, wemake the comparisonP [NV= 2] P [NV 1] = ( )( )6= P [NV= 2,NV 1],(2)which shows the two events are dependent.(b) The Probability of the joint event isP [NV 1,C1=v] = P [{vd,vv}] = (3)6 From part (a), P[NV 1] = Further, P[C1=v] = so thatP [NV 1] P [C1=v] = ( )( ) = P [NV 1,C1=v].(4)Hence, the events are dependent.(c) The problem statement that the packets were independent implies thatthe events{C2=v}and{C1=d}are independent events.
8 Just to besure, we can do the calculations to check:P [C1=d,C2=v] = P [{dv}] = (5)Since P[C1=d] P[C2=v] = ( )( ) = , we confirm that theevents are independent. Note that this shouldn t be surprising since weused the information that the packets were independent in the problemstatement to determine the probabilities of the outcomes.(d) The Probability of the joint event isP [C2=v,NVis even] = P [{vv}] = (6)Also, each event has probabilityP [C2=v] = P [{dv,vv}] = ,(7)P [NVis even] = P [{dd,vv}] = (8)Thus,P [C2=v] P [NVis even] = ( )( )= P [C2=v,NVis even].(9)Thus the events are SolutionThese two matlab instructions>> T=randi(140,1000,5);>> sum(T>120)ans =126 147 134 133 163simulate 5 runs of an experiment each with 1000 tweets.
9 In particular, we notethatT=randi(140,1000,5)generates a 1000 5 arrayTof pseudorandomintegers between 1 and 140. Each column ofThas 1000 entries representingan experimental run corresponding to the lengths of 1000 tweets. The com-parisonT>120produces a 5 1000 binary matrix in which each 1 marks a longtweet with length over 120 characters. Summing this binary array along thecolumns with the commandsum(T>120)counts the number of long tweets ineach experimental experiment in which we examine the length of one tweet has samplespaceS={s1,s2,..,s140}withsidenoti ng the outcome that a tweet haslengthi.
10 Note that P[si] = 1/140 and thusP [tweet length>120] = P [{s121,s122,..,s140}] =20140=17.(1)Thus in each run of 1000 tweets, we would expect to see about 1/7 of thetweets, or about 143 tweets, to be be long tweets with length of over 120characters. However, because the lengths are random, we see that we observein the neighborhood of 143 long tweets in each SolutionLetFidenote the event that that the user is found on pagei. The tree forthe experiment is user is found unless all three paging attempts fail. Thus the probabilitythe user is found isP [F] = 1 P [Fc1Fc2Fc3] = 1 ( )3= (1)Quiz Solution(a) We can view choosing each bit in the code word as a subexperiment has two possible outcomes: 0 and 1.