Solution Manual for Probability and Statistics for Computer Scientists, 10th Edition

Solution Manual for Probability and Statistics for Computer Scientists, 10th Edition is the ultimate guide to solving textbook questions, offering easy-to-follow solutions.

James Carter
Contributor
4.7
33
5 months ago
Preview (16 of 144 Pages)
100%
Purchase to unlock

Page 1

Solution Manual for Probability and Statistics for Computer Scientists, 10th Edition - Page 1 preview image

Loading page image...

PROBABILITY AND STATISTICSFOR COMPUTER SCIENTISTSSecond EditionSolution ManualMichael BaronDepartment of Mathematical SciencesUniversity of Texas at Dallas, Richardson, Texas 75083-0688

Page 2

Solution Manual for Probability and Statistics for Computer Scientists, 10th Edition - Page 2 preview image

Loading page image...

Page 3

Solution Manual for Probability and Statistics for Computer Scientists, 10th Edition - Page 3 preview image

Loading page image...

Table of ContentsChapter 2 solutions3Chapter 3 solutions14Chapter 4 solutions27Chapter 5 solutions40Chapter 6 solutions46Chapter 7 solutions54Chapter 8 solutions66Chapter 9 solutions71Chapter 10 solutions84Chapter 11 solutions110Appendix: Matlab codes for exercises-projects131

Page 4

Solution Manual for Probability and Statistics for Computer Scientists, 10th Edition - Page 4 preview image

Loading page image...

Chapter 23Chapter 22.1An outcome is the chosen pair of chips. The sample space in this problem consists of15 pairs: AB, AC, AD, AE, AF, BC, BD, BE, BF, CD, CE, CF, DE, DF, EF (or 30pairs if the order of chips in each pair matters, i.e., AB and BA are different pairs).All the outcomes are equally likely because two chips are chosen at random.One outcome is ‘favorable’, when both chips in a pair are defective (two such pairs ifthe order matters).Thus,P(both chips are defective) = number of favorable outcomestotal number of outcomes=1/152.2Denote the events:M={problems with a motherboard}H={problems with a hard drive}We have:P{M}= 0.4,P{H}= 0.3,andP{MH}= 0.15.Hence,P{MH}=P{M}+P{H} −P{MH}= 0.4 + 0.30.15 = 0.55,andP{fully functioning MB and HD}= 1P{MH}=0.452.3Denote the events,I={the virus enters through the internet}E={the virus enters through the e-mail}ThenP{¯E¯I}=1P{EI}= 1(P{E}+P{I} −P{EI})=1(.3 +.4.15) =0.45It may help to draw a Venn diagram.2.4Denote the events,C={knows C/C++},F={knows Fortran}.Then(a)P{¯F}= 1P{F}= 10.6 =0.4(b)P{¯F¯C}=1P{FC}= 1(P{F}+P{C} −P{FC})=1(0.7 + 0.60.5) = 10.8 =0.2(c)P{C\F}=P{C} −P{FC}= 0.70.5 =0.2

Page 5

Solution Manual for Probability and Statistics for Computer Scientists, 10th Edition - Page 5 preview image

Loading page image...

4solution manual(d)P{F\C}=P{F} −P{FC}= 0.60.5 =0.1(e)P{C|F}=P{CF}P{F}= 0.50.6 =0.8333(f)P{F|C}=P{CF}P{C}= 0.50.7 =0.71432.5Denote the events:D1={first test discovers the error}D2={second test discovers the error}D3={third test discovers the error}ThenP{at least one discovers}=P{D1D2D3}=1P{¯D1¯D2¯D3}=1(10.2)(10.3)(10.5) = 10.28 =0.72We used the complement rule and independence.2.6LetA={arrive on time},W={good weather}. We haveP{A|W}= 0.8,P{A|¯W}= 0.3,P{W}= 0.6By the Law of Total Probability,P{A}=P{A|W}P{W}+P{A|¯W}P{¯W}=(0.8)(0.6) + (0.3)(0.4) =0.602.7Organize the data. LetD={detected},I={via internet},E={via e-mail}=I.Notice that the question about detection already assumes that the spywarehas enteredthe system. This is the sample space, and this is whyP{I}+P{E}= 1. We haveP{I}= 0.7,P{E}= 0.3,P{D|I}= 0.6,P{D|E}= 0.8.By the Law of Total Probability,P{D}= (0.6)(0.7) + (0.8)(0.3) =0.662.8LetA1={1st device fails},A2={2nd device fails},A3={3rd device fails}.P{on time}=P{all function}=P{A1A2A3}=P{A1}P{A2}P{A3}(independence)=(10.01)(10.02)(10.02)(complement rule)=0.9508

Page 6

Solution Manual for Probability and Statistics for Computer Scientists, 10th Edition - Page 6 preview image

Loading page image...

Chapter 252.9P{at least one fails}= 1P{all work}= 1(.96)(.95)(.90) =0.1792 .2.10P{ABC}=1P{¯A¯B¯C}= 1P{¯A}P{¯B}P{¯C}=1(10.4)(10.5)(10.2) =0.762.11(a)P{at least one test finds the error}= 1P{all tests fail to find the error}= 1(10.1)(10.2)(10.3)(10.4)(10.5)= 1(0.9)(0.8)(0.7)(0.6)(0.5) =0.8488(b) The difference between events in (a) and (b) is the probability thatexactly onetest finds an error. This probability equalsP{exactly one test finds the error}=P{test 1 find the error, the others don’t find}+P{test 2 find the error, the others don’t find}+. . .=(0.1)(10.2)(10.3)(10.4)(10.5)+(10.1)(0.2)(10.3)(10.4)(10.5) +. . .=(0.1)(0.8)(0.7)(0.6)(0.5) + (0.9)(0.2)(0.7)(0.6)(0.5)+(0.9)(0.8)(0.3)(0.6)(0.5) + (0.9)(0.8)(0.7)(0.4)(0.5)+(0.9)(0.8)(0.7)(0.6)(0.5) = 0.3714.ThenP{at least two tests find the error}=P{at least one test finds the error}P{exactly one test finds the error}=0.84880.3714 =0.4774(c)P{all tests find the error}= (0.1)(0.2)(0.3)(0.4)(0.5) =0.00122.12LetAj={dogjdetects the explosives}.P{at least one dog detects}= 1P{all four dogs don’t detect}= 1P{¯A1}P{¯A2}P{¯A3}P{¯A4}= 1(10.6)4=0.97442.13LetAjbe the event{Teamjdetects a problem}. ThenP{at least one team detects}= 1P{no team detects}= 1P{¯A1¯A2¯A3}= 1P{¯A1}P{¯A2}P{¯A3}= 1(10.8)(10.8)(10.8) =0.992.2.14(a) The total number of possible passwords isP(26,6) = (26)(25)(24)(23)(22)(21) = 165,765,600because there are 26 letters in the alphabet, they should be all different in the

Page 7

Solution Manual for Probability and Statistics for Computer Scientists, 10th Edition - Page 7 preview image

Loading page image...

6solution manualpassword, and the order of characters is important. The password is guessed(favorable outcome) if it is among the 1,000,000 attempted passwords. ThenP{guess the password}=number of favorable passwordstotal number of passwords=1,000,000165,765,600 =0.0060(b) Now we can use 52 characters, and the order is still important. Then the totalnumber of passwords isP(52,6) = (52)(51)(50)(49)(48)(47) = 14,658,134,400,andP{guess the password}=1,000,00014,658,134,400 =0.000068(c) Letters can be repeated in passwords, therefore, the total number of passwordsisPr(52,6) = 526,andP{guess the password}= 106526=0.000051(d) Adding the digits brings the number of possible characters to 62. Then the totalnumber of passwords isPr(62,6) = 626,andP{guess the password}= 106626=0.000018The more characters we use the lower is the probability for a spyware to breakinto the system.2.15LetA={Error in the 1st block}andB={Error in the 2nd block}. ThenP{A}=0.2,P{B}= 0.3, andP{AB}= 0.06 by independence;P{error in program}=P{AB}= 0.2 + 0.30.06 = 0.44.Then, by the definition of conditional probability,P{AB|AB}=P{AB}P{AB}= 0.060.44 =0.1364Or, by the Bayes Rule,P{AB|AB}=P{AB|AB}P{AB}P{AB}=(1)(0.06)0.44=0.13642.16Organize the data. LetD={defective part}. We are given:P{S1}= 0.5P{D|S1}= 0.05P{S2}= 0.2P{D|S2}= 0.03P{S3}= 0.3P{D|S3}= 0.06We need to findP{S1|D}.

Page 8

Solution Manual for Probability and Statistics for Computer Scientists, 10th Edition - Page 8 preview image

Loading page image...

Chapter 27(a) By the Law of Total Probability:P{D}=P{D|S1}P{S1}+P{D|S2}P{S2}+P{D|S3}P{S3}=(0.5)(0.05) + (0.2)(0.03) + (0.3)(0.06) =0.049(b) Bayes Rule:P{S1|D}=P{D|S1}P{S1}P{D}= (0.5)(0.05)0.49=25/49 or 0.51022.17LetD={defective part}. We are given:P{X}= 0.24P{D|X}= 0.05P{Y}= 0.36P{D|Y}= 0.10P{Z}= 0.40P{D|Z}= 0.06Combine the Bayes Rule and the Law of Total Probability.P{Z|D}=P{D|Z}P{Z}P{D|X}P{X}+P{D|Y}P{Y}+P{D|Z}P{Z}=(0.06)(0.40)(0.05)(0.24) + (0.10)(0.36) + (0.06)(0.40)=1/3 or 0.33332.18LetC={correct},G={guessing}. It is given that:P{¯G}= 0.75,P{C|¯G}= 0.9,P{C|G}= 1/4 = 0.25.Also,P{G}= 10.75 = 0.25.Then, by the Bayes Rule,P{G|C}=P{C|G}P{G}P{C|G}P{G}+P{C|¯G}P{¯G}=(0.25)(0.25)(0.25)(0.25) + (0.9)(0.75) =0.08472.19LetD={defective part}andI={inspected electronically}. By the Bayes Rule,P{I|D}=P{D|I}P{I}P{D|I}P{I}+P{D|¯I}P{¯I}=(10.95)(0.20)(10.95)(0.20) + (10.7)(10.20) =0.04002.20LetS={steroid user}andN={test is negative}.It is given thatP{S}= 0.05,P{¯N|S}= 0.9, andP{¯N|¯S}= 0.02.By the complement rule,P{¯S}= 0.95,P{N|S}= 0.1, andP{N|¯S}= 0.98.

Page 9

Solution Manual for Probability and Statistics for Computer Scientists, 10th Edition - Page 9 preview image

Loading page image...

8solution manualBy the Bayes Rule,P{S|N}=P{N|S}P{S}P{N|S}P{S}+P{N|¯S}P{¯S}=(0.1)(0.05)(0.1)(0.05) + (0.98)(0.95) =5/936 or 0.005342.21At least one of the first three components works with probability1P{all three fail}= 1(0.3)3= 0.973.At least one of the last two components works with probability1P{both fail}= 1(0.3)2= 0.91.Hence, the system operates with probability (0.973)(0.91) =0.88542.22(a) The scheme of cities A, B, and C and all five highways is similar to Exercise 2.21.Similarly to this exercise, there exists an open route from city A to city C withprobability{1(0.2)3} {1(0.2)2}=0.9523(b-α) If the new highway is built between cities A and B, it will be the 4-th highwayconnecting A and B. Then the probability of an open route from city A to cityC becomes{1(0.2)4} {1(0.2)2}=0.9585(b-β) If the new highway is built between B and C, it will be the 3rd highway connectingthese cities. Then the probability of an open route from city A to city C is{1(0.2)3} {1(0.2)3}=0.9841(b-γ) Finally, if the new highway is built between A and C, thenP{at least one open route from A to C}={a new direct routefrom A to C is opena route from A to B to Cis open, see question (a)}=1(10.2)(10.9523) =0.96182.23(a) (0.9)(0.8) =0.72(b) 1− {1(0.9)(0.8)} {1(0.7)(0.6)}=0.8376(c) 1(10.9)(10.8)(10.7) =0.994(d){1(10.9)(10.7)} {1(10.8)(10.6)}=0.8924(e){1(10.9)(10.6)} {1(10.8)(10.7)(10.5)}=0.93122.24A customer is unaware of defects, so he buys 6 random laptops. The outcomes areequally likely, so each probability can be computed asnumber of favorable outcomestotal number of outcomes

Page 10

Solution Manual for Probability and Statistics for Computer Scientists, 10th Edition - Page 10 preview image

Loading page image...

Chapter 29(a)P{exactly 2}=(52) (54)(106)=5·42·510·9·8·74·3·2·1=521 or 0.238(b) This is a conditional probability because{X2}is given. We needP{X= 2|X2}=P{X= 2X2}P{X2}=P{X= 2}P{X2}whereP{X= 2}= 5/21 is already computed in (a), andP{x2}= 1P(X= 1) = 1(51) (55)(106)= 15·110·9·8·74·3·2·1= 4142Notice thatP{X= 0}= 0 because there are only 5 good computers, so amongthe purchased 6 computers there has to be at least 1 defective. So,P{X= 2|X2}=P{X= 2}P{X2}=5/2141/42 =10/41 or 0.244.2.25Our sample space consists of birthdays of allN= 30 students. The total number ofoutcomes in it isNT=Pr(365, N) = 365N.It is easier to count the outcomes where all students are born ondifferentdays. Thenumber of such outcomes isNF=P(365, N) =365!(365N)! = (365)(364). . .(366N).ThenP(N)=P{at least two share birthdays}=1P{all born on different days}=1NFNT= 1(365365) (364365). . .(366N365).ForN= 30, we getP(30) = 10.2937 =0.7063(b) EvaluatingP(N) for differentN, we see thatP(22) = 0.4757 andP(23) = 0.5073.Hence, we need at least23students in order to find birthday matches with aprobability above 0.5.2.26The sample space consists of all (unordered) sets of three computers selected fromsix computers in the lab. Favorable outcomes are sets of three computers with non-defective hard drives. We haveNT=C(6,3) = (6)(5)(4)(3)(2)(1) = 20andNF=C(4,3) = 4;therefore,P{no hard drive problems}=NFNT=420 =0.2

Page 11

Solution Manual for Probability and Statistics for Computer Scientists, 10th Edition - Page 11 preview image

Loading page image...

10solution manual2.27The sample space consists of all unordered sets of five computers selected from 18computers in the store. Favorable outcomes are sets of five non-defective computers(that come from a subset of 186 = 12. ThenNT=C(18,5) = (18)(17)(16)(15)(14)(5)(4)(3)(2)(1)andNF=C(12,5) = (12)(11)(10)(9)(8)(5)(4)(3)(2)(1);therefore,P{five computerswithout defects}=NFNT=(12)(11)(10)(9)(8)(18)(17)(16)(15)(14) =11119or0.09242.28The sample space consists of sequences of 6 answers where each answer is one of 4possible answers, say, A, B, C, or D. Then a sequence of 6 answers is a 6-letter wordwritten with letters A, B, C, and D with replacement. The student guesses, therefore,all outcomes are equally likely.The total number of outcomes isNT=Pr(4,6) = 46= 4096.Favorable outcomes occur when the student guesses at least 3 answers correctly. Thisincludes 3, 4, 5, and 6 correct answers. The correctly answered questions are chosenat random from 6 questions. Then, a correct answer is given to each of the chosenquestions. Also, an incorrect answer to each remaining question is chosen out of 3possible incorrect answers. Altogether, the number of favorable outcomes isNF=C(6,3)(33) +C(6,4)(32) +C(6,5)(31) +C(6,6)(30)=(6)(5)(4)(3)(2)(1) (27) + (6)(5)(2)(1) (9) + (6)(3) + 1 = 694.P{he will pass}=NFNT=6944096 =0.1694One can also use the complement rule for a little shorter solution.2.29Outcomes are sets of four databases selected from nine. Favorable outcomes are suchsets where at least 2 databases have a keyword, out of 5 such databases (and theremaining ones don’t have a keyword, so they come from the remaining 4 databases).ThenNT=C(9,4) = (9)(8)(7)(6)(4)(3)(2)(1) = 126,NF=C(5,2)C(4,2) +C(5,3)C(4,1) +C(5,4)C(4,0)=(10)(6) + (10)(4) + (5)(1) = 105,andP{at least two have the keyword}=NFNT= 105126 =56 or 0.8333

Page 12

Solution Manual for Probability and Statistics for Computer Scientists, 10th Edition - Page 12 preview image

Loading page image...

Chapter 2112.30(a) All outcomes are listed in the table below. According to the problem, they areequally likely.OutcomeThe older childThe younger childWho is met1girlgirlthe older girl2girlgirlthe younger girl3girlboythe girl4girlboythe boy5boygirlthe girl6boygirlthe boy7boyboythe older boy8boyboythe younger boy(b)P{BB}=P{outcomes 7, 8}= 1/4,P{BG}=P{outcomes 5, 6}= 1/4,P{GB}=P{outcomes 3, 4}= 1/4.(c) Meeting Jimmy automatically eliminates outcomes 1, 2, 3, and 5. The remainingoutcomes areOutcomeThe older childThe younger childWho is met4girlboythe boy6boygirlthe boy7boyboythe older boy8boyboythe younger boyTwo remaining outcomes form the eventBBwhereasBGandGBhave only oneoutcome each. Therefore, given that you met a boy,P{BB|met Jimmy}=P{outcomes 7, 8|met Jimmy}= 1/2,P{BG|met Jimmy}=P{outcome 6|met Jimmy}= 1/4,P{GB|met Jimmy}=P{outcome 4|met Jimmy}= 1/4.(d)P{Jimmy has a sister|met Jimmy}=P{outcomes 4, 6|met Jimmy}= 1/2.2.31According to (2.2),ABC. . .=ABC. . . .Then, eventsA, B, C, . . .are disjoint (i.e.,ABC. . .=) if and only ifABC. . .=ABC. . .== Ω.We see that the union ofA, B, C, . . .equals the entire sample space in this case. ByDefinition 2.8A, B, C, . . .are exhaustive.2.32Intuitive solutions:(a) Independent eventsAandBoccur independently of each other. Hence, theydon’toccurindependently of each other. Every time whenA(orB) does not occur, itscomplement occurs. Hence, the complements ofAandBare also independent ofeach other.

Page 13

Solution Manual for Probability and Statistics for Computer Scientists, 10th Edition - Page 13 preview image

Loading page image...

12solution manual(b) Being disjoint is a very strong dependence because disjoint events completelyeliminate each other. The only way for such events to be independent is whenone of these events isalwayseliminated. Such an event must have probability 0.(c) Being exhaustive is also a strong type of dependence because one event absolutelyhas to cover all the parts of Ω that are not covered by the other event. The onlyway for such events to be independent is when one of the events covers all theparts of Ω regardless of the other event. Such event should be the entire samplespace, Ω.Mathematical solutions:(a) Using (2.2),P{AB}=P{AB}= 1P{AB}=1(P{A}+P{B} −P{AB})=1P{A} −P{B}+P{A}P{B}(becauseAandBare independent)=(1P{A}) (1P{B})=P{A}P{B}.Hence,AandBare independent.(b) IfAandBare independent and disjoint, then0 =P{AB}=P{A}P{B},which can only happen whenP{A}= 0 orP{B}= 0.(c) IfAandBare independent and exhaustive, then1=P{AB}=P{A}+P{B} −P{AB}=P{A}+P{B} −P{A}P{B}.Then0 = 1(P{A}+P{B} −P{A}P{B}) = (1P{A}) (1P{B}),which can only happen whenP{A}= 1 orP{B}= 1.2.33Generalizing (2.4), we prove that for any eventsE1, . . . , En,P{E1. . .En}=inP{Ei} −1i<jnP{EiEj}+1i<j<knP{EiEjEk} −. . .(1)nP{E1. . .En}.This can be proved by induction.Forn= 2 events, this formula is given by (2.4).Suppose the formula is true fornevents. LetAdenote their overall union,A=E1. . .En. Then for any eventEn+1,P{E1. . .En+1}=P{AEn+1}

Page 14

Solution Manual for Probability and Statistics for Computer Scientists, 10th Edition - Page 14 preview image

Loading page image...

Chapter 213=P{A}+P{En+1} −P{AEn+1}=in+1P{Ei} −1i<jnP{EiEj}+1i<j<knP{EiEjEk}. . .(1)nP{E1. . .En} −P{AEn+1}.Also, since the formula is assumed true fornevents,P{AEn+1}=P{(E1En+1). . .(EnEn+1)}=inP{EiEn+1} −1i<jnP{EiEjEn+1}+. . .(1)nP{E1. . .En+1}.Altogether,P{E1. . .En+1}=in+1P{Ei} −1i<jn+1P{EiEj}+1i<j<kn+1P{EiEjEk}. . .(1)n+1P{E1. . .En+1}.This proves the formula for (n+ 1) events. By induction, the formula is proved foranyn2.2.34LetAi= ¯Eifori= 1, . . . , n. According to (2.2),A1. . .An=A1. . .AnTherefore,E1. . .En=A1. . .An=A1. . .An=E1. . .En2.35EventsA\BandBare mutually exclusive, and their union isA. Therefore,P{A\B}+P{B}=P{A}, andP{A\B}=P{A} −P{B}.2.36Consider the following events,A1=E1, A2=E2\E1, A3=E3\(E1E2), A4=E4\(E1E2E3), . . . .They are mutually exclusive,AiEifor alli, andA1A2. . .=E1E2. . ..Then,P{E1E2. . .}=P{A1A2. . .}=iP{Ai} ≤iP{Ei}.

Page 15

Solution Manual for Probability and Statistics for Computer Scientists, 10th Edition - Page 15 preview image

Loading page image...

14solution manual012F(x)x0.420.881.00FIGURE 1:The cdf ofXfor Exercise 3.1Chapter 33.1Possible values ofXare: 0, 1, and 2.(a) The pmf is:P(0)=P{both files are not corrupted}=(10.4)(10.3) = 0.42,P(1)=P{1st is corrupted,2nd is not}+P{2nd is corrupted,1st is not}=(0.4)(10.3) + (0.3)(10.4) = 0.46,P(2)=P{both are corrupted}= (0.4)(0.3) = 0.12.(check:P(0) +P(1) +P(2) = 1.)(b) The cdf is given in Figure 1.3.2LetXbe the number of network blackouts, andYbe the loss. ThenY= 500X.ComputeE(X)=xxP(x) = (0)(0.7) + (1)(0.2) + (2)(0.1) = 0.4;Var(X)=x(x0.4)2P(x)=(00.4)2(0.7) + (10.4)2(0.2) + (20.4)2(0.1) = 0.44.Hence,E(Y) = 500E(X) = (500)(0.4) =200 dollarsandVar(Y) = 5002Var(X) = (250,000)(0.44) =110,000 squared dollars

Page 16

Solution Manual for Probability and Statistics for Computer Scientists, 10th Edition - Page 16 preview image

Loading page image...

Chapter 3153.3Find the distribution ofX, then computeE(X) and Var(X). Since there is only 1error in the entire program, the number of errors in 3 selected blocks may be either 0or 1, whereP(1)=P{error in 3 selected blocks}= 3/5,P(0)=P{error in 2 other blocks}= 2/5.ThenE(X)=xxP(x) = (0)(2/5) + (1)(3/5) =3/5E(X2)=xx2P(x) = (0)2(2/5) + (1)2(3/5) = 3/5;Var(X)=E(X2)E2(X) = 3/5(3/5)2=6/25 or 0.24Shortcut: Actually,X2=XforX= 0 or 1, therefore,E(X2) =E(X) = 3/5.3.4We can complete a table,xP(x)xP(x)x2x2P(x)11/61/611/621/62/644/631/63/699/641/64/61616/651/65/62525/661/66/63636/621/6 or 3.591/6E(X) =xxP(x) =3.5Var(X) =E(X2)E2(X) = 91/6(7/2)2=35/12 or 2.9167We can also compute Var(X) asVar(X) =x(x3.5)2P(x)= (1/6)(.52+ 1.52+ 2.52+ 2.52+ 1.52+.52) =2.91673.5LetXbe the number of randomly chosen programs that need to be updated. There are5 programs overall that need an update and 7 that don’t need an update. Outcomes aresets of 4 chosen programs, and they are equally likely. The total number of outcomesisNT=(124)= 12·11·10·94·3·2·1= 495.Thus,Xhas a pmfP(0)=(50) (74)= (1)(7·6·5·4)/(4·3·2·1)495=35495 =799,P(1)=(51) (73)495= (5)(7·6·5)/(3·2·1)495= 175495 = 3599,etc.. . . . . . . . .
Preview Mode

This document has 144 pages. Sign in to access the full document!

Study Now!

XY-Copilot AI
Unlimited Access
Secure Payment
Instant Access
24/7 Support
Document Chat

Document Details

Subject
Statistics

Related Documents

View all