anusata7055stat7055_t03_sol_h_第1页
anusata7055stat7055_t03_sol_h_第2页
anusata7055stat7055_t03_sol_h_第3页
anusata7055stat7055_t03_sol_h_第4页
anusata7055stat7055_t03_sol_h_第5页
已阅读5页,还剩4页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、STAT7055 Semester 1 2018 Week 4 Tutorial Solutions1.Suppose the random variable X has the following probability distribution:x012p(x)0.60.30.1Calculate the following (do it manually first, then try doing it in R using the sum func- tion):E(X)Solution:(a)XE(X) =(x p(x) = 0 0.6 + 1 0.3 + 2 0.1 = 0.5al

2、l xTo do this in R, we would first create vectors for the x values and their corresponding probabilities: x px E.X E.X 1 0.5V (X)Solution:2V (X) = E(X2) (E(X)(b)!Xx2 p(x)2 0.5=all x= 0 2 0.6 + 1 2 0.3 + 2 2 0.1 0.5= 0.452In R, we can first calculate E(X2) and use the value of E(X) calculate previous

3、ly to then use this to calculate V (X):E.X.sq - sum(x2*px)V.X E.sqrt.X E.sqrt.X1 0.4414214XV(d)Solution:22VX = EX EX= E(X)0.44142 = 0.50.44142 = 0.3051In R, using the values of E(X) and E(X) calculated previously, we get: V.sqrt.X V.sqrt.X 1 0.3051472The joint probability distribution of X and Y is

4、shown in the following table:2.x21310.420.120.0620.280.080.04y(a) Calculate P (X 1|Y 1 Y 1|Y 2) = 0.3P (Y 2)0.42 + 0.12 + 0.06(b) Calculate the correlation coefficient between X and Y .Solution: The marginal distribution of X and Y is given by the column and row sums of the table of the joint probab

5、ility distribution:x2pY (y)13120.420.120.280.080.060.040.60.4ypX(x)0.70.20.11Page 2 of 9STAT7055 Semester 1 2018Week 4 TutorialWe will now use the shortcut formula to calculate the covariance of X and Y . From the marginal distributions, we know thatE(X) = 1 0.7 + 2 0.2 + 3 0.1 = 1.4andE(Y ) = 1 0.6

6、 + 2 0.4 = 1.4Therefore,Cov(X, Y ) = E(XY ) E(X)E(Y )!X X(xy p(x, y) E(X)E(Y )=all x all y= (1 1 0.42 + 1 2 0.28 + 2 1 0.12 + 2 2 0.08+ 3 1 0.06 + 3 2 0.04) 1.4 1.4= 0Since the covariance is equal to 0, we know that the correlation coefficient is also equal to 0:Cov(X,Y ) = 0XY = 0XYXYAre X and Y in

7、dependent?Solution: Looking at both the joint probability distribution and the two marginal distributions, X and Y are indeed independent, since for every possible pair of x and y values, we have:p(x, y) = pX(x) pY (y)X(c)Y .(d)Determine the probability distribution of+YXXSolution: Let Z =+The possi

8、ble values Z can take are 2,52 , 130and163 .YXY .We can see this from the following table of zvalues:x2131 + 12 + 13 + 15210z =z =z =z =z =z =12= 2=1112133y1 + 252 + 23 + 213= 2=21222236Page 3 of 9STAT7055 Semester 1 2018Week 4 TutorialHence we get our probability distribution:P (Z = 2) = p(1, 1) +

9、p(2, 2) = 0.42 + 0.08 = 0.55PZ = p(2, 1) + p(1, 2) = 0.28 + 0.12 = 0.42103136P Z = p(3, 1) = 0.06P Z = p(3, 2) = 0.04We should double check to make sure the probabilities add up to 1 and indeed they do.3.A new surgical procedure is said to be successful 80% of the time. Suppose that the operation is

10、 performed five times, with the results being independent of each other. We are interested in the successfulness of this operation.(a) Define an appropriate random variable X for this problem.Solution: An appropriate random variable would be to let X be the number of successful operations in five tr

11、ials.(b) What particular type of distribution does the random variable X have? State the values of the parameters.Solution: X has a Binomial distribution, with n = 5 trials and success probabilityp = 0.8. That is, X Bin(n = 5, p = 0.8).Find the following probabilities:(c) Exactly three operations ar

12、e successful.Solution: P (X = 3) = P (X 3) P (X 2) = 0.2627 0.0579 = 0.2048(d)Fewer than two operations are successful.Solution: P (X 3) = 1 P (X 3) = 1 0.2627 = 0.7373(e)4.A home security system is designed to have a 98% reliability rate. That is, in the event of a true burglary attempt, there is a

13、 98% chance that the alarm will be triggered. Suppose that nine homes equipped with the system experience attempted burglaries. Find the probability that:(a) At least one alarm is triggered.Page 4 of 9STAT7055 Semester 1 2018Week 4 TutorialSolution: Let X be the number of alarms that are triggered.

14、Then X Bin(n = 9, p = 0.98). We want to find P (X 1):P (X 1) = 1 P (X = 0) 9!09= 1 0!(9 0)! 0.98 (1 0.98)= 1 0.02 1(b) More than seven of the alarms are triggered.Solution: We want to find P (X 7):P (X 7) = P (X = 8) + P (X = 9) 9! 9!8190= 8!(9 8)! 0.98 (1 0.98) + 9!(9 9)! 0.98 (1 0.98)89= 9 0.98 0.

15、02 + 0.98= 0.98695.It is recommended that women over 40 have a mammogram annually. A recent report indicated that if a woman has annual mammograms over a 10-year period, there is a 60% probability that there will be at least one false-positive result. If the annual test results are independent, what

16、 is the probability that in any one year a mammogram will produce a false-positive result?Solution: Let X be the number of false-positive results produced over a 10-year period. Since tests are taken once a year and the test results are independent, X has a Binomial distribution with parameters n =

17、10 trials and p equal to the probability that a mam- mogram will produce a false-positive result in any one year. Rather than asking us to find the probability of some event, this question is asking us to find out what p actually is. What other information is given to us? We also know that there is

18、a 60% proba- bility that there will be at least one false-positive result over a 10-year period. That is, P (X 1) = 0.6. But we also know that:P (X = 0) = 1 P (X 1) = 1 0.6 = 0.4and 10!P (X = 0) = 0!(10 0)! p0(1 p)10 = (1 p)10Page 5 of 9STAT7055 Semester 1 2018Week 4 TutorialCombining the above two

19、equations, we get:(1 1 p) p= 0.40.4 10p = 1 0.410 p = 0.0876So the probability that a mammogram will produce a false-positive result in any one year is 0.0876.6.A student takes an examination consisting of two multiple choice questions. Each mul- tiple choice question has four possible answers with

20、only one correct. For the first question, suppose the probability that he knows the answer is 0.8 and the probability that he guesses is 0.2. If he guesses, he randomly chooses one of the four possible an-swers. For the second question, suppose the student gaconfidence if he knew theanswer to the fi

21、rst question. Specifically, if he knew the answer to the first question, then for the second question the probability that he knows the answer becomes 0.9 and the probability that he guesses becomes 0.1. If he does not know the answer to thefirst question, then for the second question the probabilit

22、y that he knows the answer and the probability that he guesses remain 0.8 and 0.2, respectively. Letting X denote the number of questions he gets correct, calculate the probability distribution of X and calculate the expected value of X.Solution: Lets define some events:K1 = the student knows the an

23、swer to Q1;KC= the student doesnt know the answer toQ1;1R1 = the student answers Q1 correctly;RC= the student answers Q1 incorrectly;1K2 = the student knows the answer to Q2;KC= the student doesnt know the answer toQ2;2R2 = the student answers Q2 correctly;RC= the student answers Q2 incorrectly;2Con

24、sider the following event (or outcome):K1 R1 K2 R2This is the event that the student knows the answer to Q1 and answers it correctly, and knows the answer to Q2 and answers it correctly. Since this event involves R1 andPage 6 of 9STAT7055 Semester 1 2018Week 4 TutorialR2, the student answered both q

25、uestions correctly and so X = 2. We can calculate the probability of this event by repeated applications of the Multiplication Rule:P (K1 R1 K2 R2) = P (R2|K1 R1 K2) P (K1 R1 K2)= P (R2|K1 R1 K2) P (K2|K1 R1) P (K1 R1)= P (R2|K1 R1 K2) P (K2|K1 R1) P (R1|K1)P (K1)Now if the student knew the answer t

26、o Q2, then they must answer Q2 correctly. HenceP (R2|K1 R1 K2) = 1. Given that the student knew the answer to Q1, the probability that they knew the answer to Q2 is 0.9. Hence P (K2|K1 R1) = 0.9. Again if the student knew the answer to Q1, then they must answer Q1 correctly, so P (R1|K1) = 1. Finall

27、y we know that P (K1) = 0.8. Putting all this together we get:P (K1 R1 K2 R2) = 1 0.9 1 0.8 = 0.72Now consider the event (or outcome):CCCCK R K R1122This is the event that the student doesnt know the answer to Q1 and answers it incor-rectly, and doesnt know the answer to Q2 and answers it incorrectl

28、y. Since this eventRCand RC, the student got both questions wrong and so X = 0. We caninvolves12calculate the probability as:CCCCP (K R K R )1122CCCCCCCCCC= P (R |K R K ) P (K |K R )P (R |K ) P (K )2112211111Now if the student doesnt know the answer to Q2, then they guess and the probability, so P (

29、R |CK C R K ) = 0.75CCthat they answer Q2 incorrectly is 0.75. Given2112that the student didnt know the answer to Q1, the probability that they dont know theanswer to Q2 is 0.2. Hence P (K |CK CC R ) = 0.2. Again P (R |K ) = 0.75 andCC21111P (KC) = 0.2. Putting all this together we get:1CCCCP (K R K

30、 R ) = 0.75 0.2 0.75 0.2 = 0.02251122Proceeding in a similar manner for all possible outcomes of the exam, we get the followingresults:xp(x)OutcomeCCCCK R K R0.2 0.75 0.2 0.75 = 0.02250.2 0.75 0.2 0.25 = 0.00750.2 0.75 0.8 1 = 0.120.2 0.25 0.2 0.75 = 0.00750.2 0.25 0.2 0.25 = 0.00250.2 0.25 0.8 1 = 0.040.8 1 0.1 0.75 = 0.060.8 1 0.1 0.25 = 0.020.8 1 0.9 1 = 0.720111221221122K R K RCCC211

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

最新文档

评论

0/150

提交评论