联系方式

  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-23:00
  • 微信:codinghelp

您当前位置:首页 >> Algorithm 算法作业Algorithm 算法作业

日期:2018-04-02 03:48

Assignment 4 Due on Tuesday,

3rd April at 11:59 PM Instructions: 1.Assignments must be submitted to UM Learn Dropbox before 11.59 PM on due date.2. You must submit one pdf file which includes answers to the questions and Rcode written by you. 3. Make sure that your plots and graphs are properlylabeled. 4. You must comment on any results obtained from R whenever ask to doso. 5. Prepare your answers in a word document. Include properly commented Rcode at the bottom of the document as an appendix. Finally, save the documentas a pdf file in order to submit to UM Learn Dropbox. 6. How to Submit on UMLearn Dropbox: 1. Click on the “Assignments” button on the “Assessments” tab inUM Learn. 2. Click on Assignment 1 under Folder. 3. Click on “Add a File” underSubmit Files. 4. Select the pdf file (that you want to submit) from yourcomputer and click Open. 5. After uploading the pdf file, you must click Submitto complete the submission. 6. You should see the submission confirmation pagewith notice that you have been sent a confirmation of submission email. You canalso ensure your submission was successful by going to Assignments in theAssessments tab and by clicking on “View History”. If you do not see theconfirmation page, a confirmation email in your UM Learn linked email account,You haven’t submitted the assignment correctly. 7. An advice: Start to work onthe assignment questions early and give yourself enough time to complete itproperly as you will require more time to do R coding. 1 1. Let X1, . . . , Xnbe a random sample from N(µ, σ2 ) where σ 2 is known. We want to test H0 : µ ≥µ0 vs. H1 : µ < µ0. The decision rule is to reject H0 if X¯ ≤ c. Let σ 2 =25, µ0 = 5, n = 30 and α = 0.05. (a) What is the critical region of the test?(b) When µ = 4, what is the power of the test? (c) Find a test (n and c) suchthat α = 0.05 and β = 0.01. 2. Certain airplane component failures may beclassified as mechanical, electrical or otherwise. Two airplane desings areunder consideration and it is desired to test the hypothesis that the type offailure is independent of the airplane design. Test this hypothesis at α = 0.05based on the following data. mechanical electrical other Design 1 50 30 60Design 2 40 30 40 3. A fleet of 50 airplanes was observed for 1000 flying hoursand the number of planes that suffered X component failures in that time isgiven below. X 0 1 2 3 4 ≥ 5 oj 7 10 9 7 6 11 (a) Test H0 : X P oisson(λ) at α = 0.05. (b) Test H0 : X f(x) = x+2 x  ( 1 2 ) 3+x ; x= 0, 1, 2, . . . at α = 0.05. 4. Let X1, . . . , Xn be a random sample fromf(x; θ) = θxθ−1 , 0 < x < 1 , θ > 0. (a) Assume that θ =2. Using the Inversion Method of Sampling, write a R function to generate datafrom f(x; θ). (b) Use your function in (a) to draw a sample of size 100 fromf(x; θ = 2). (c) Find the method of moments estimate of θ using the data in(b). (d) Find the maximum likelihood estimate of θ using the data in (b). 2 5.Generate a sample of size n = 30 from N(µ = 5, σ2 = 1). We are interested inestimating µ. (a) Obtain a 95% confidence interval for µ using 100 bootstrapsamples. (b) Repeat (a) using 500 and 1000 bootstrap samples and comment on theresults. (c) Obtain exact 95% confidence interval for µ i. when σ is known. ii.when σ is unknown. Compare the results with the intervals in (a) and (b). (d)Repeat (a) - (c) by removing smallest and largest values in the original sample( n = 28 in this case) and comment on the results. Extra Practice Problems 1. Asystem contains four components that operate independently. Let pi denote theprobability of successful operation of the i th component. If in a 50 trialsfor each component, they operated successfully as follows. component 1 2 3 4successful 40 48 45 40 Test H0 : p1 = 0.90, p2 = 0.90, p3 = 0.8, p4 = 0.8 usingthe data. 2. Suppose that 300 persons are selected at random from a largepopulation and that each person in the sample is classified according towhether his blood type is O, A, B, AB and also according to whether blood typeis Rh positive or Rh negative. The observed numbers are given below. Testwhether blood type and Rh status are independent. O A B AB Rh + 82 89 54 19 Rh- 13 27 7 9 3 3. Let X1, X2 and X3 are three independent random variables fromN(0, 1). (a) Generate a sample of size 100 from X1 and make a histogram of X2 1. Does it resemble any distribution you are familiar with? Superimpose χ 2 1distribution on the histogram. What can you say about the distribution of X2 1? (b) Generate three samples of size 100 from X1, X2 and X3 and make ahistogram of X2 1 + X2 2 + X2 3 . Does it resemble any distribution you arefamiliar with? Superimpose χ 2 3 distribution on the histogram. What can yousay about the distribution of X2 1 +X2 2 +X2 3 ? 4. Let X1, . . . , Xn be arandom sample from f(x; θ) = 1 θ e − x θ for x > 0. (a) Assume that θ = 0.2.Using the Inversion Method of Sampling, write a R function to generate datafrom f(x; θ). (b) Use your function in (a) to draw a sample of size 100 fromf(x; θ = 0.2). (c) Find the method of moments estimate of θ using the data in(b). (d) Find the maximum likelihood estimate of θ using the data in (b). (e)What is the bias of the estimate in (c) and (d)? 5. Let X be a discrete randomvariable with pmf p(x) = x 8 ; x = 1, 2, 5. (a) Using the Inversion Method ofSampling, write a R function to generate data from p(x). (b) Draw a sample ofsize 100 from p(x) using your function in (a). Obtain the frequencydistribution of the sample. Is it a good representative of the population? 6.Assume that X is following a normal distribution with mean µ and variance σ 2 .We want to test H0 : µ = 10 vs. H1 : µ = 15 based on a sample of size n.Consider the following decision rule: If X >¯ 13 claim that µ = 15, if X¯ ≤13 claim that µ = 10. Consider n = 30 and σ 2 = 5. (a) What is the criticalregion of the test? (b) What is α, type I error of the test? (c) What is thepower of the test? Interpret the answer. 4


相关文章

版权所有:留学生编程辅导网 2020 All Rights Reserved 联系方式:QQ:99515681 微信:codinghelp 电子信箱:99515681@qq.com
免责声明:本站部分内容从网络整理而来,只供参考!如有版权问题可联系本站删除。 站长地图

python代写
微信客服:codinghelp