Use R to complete the following questions. You should include your R code, output and plots...

70.2K

Verified Solution

Question

Basic Math

Use R to complete the following questions. You should includeyour R code, output and plots in your answer.

Two methods of generating a standard normal random variableare:

a. Take the sum of 5 uniform (0,1) random numbers and scale tohave mean 0 and standard deviation 1. (Use the properties of theuniform distribution to determine the requiredtransformation).

b. Generate a standard uniform and then apply inverse cdffunction to obtain a normal random variate (Hint: use qnorm).


QUESTION 1.

For each method generate 10,000 random numbers and check thedistribution using

a. Normal probability plot

b. Mean and standard deviation

c. The proportion of the data lying within the theoretical 2.5and 97.5 percentiles and the 0.5 and 99.5 percentiles. (Hint: Theifelse function will be useful)

Answer & Explanation Solved by verified expert
3.7 Ratings (583 Votes)
AlgorithmStep 1 Generate uniform random number of size n sayStep 2 Use the inversion formula for particular distribution togenerate the random from that distribution generate Unifrom random number sample size 5 u1runifn501 u11 03807355 06838301 05793533 07001886 01476591 sumu1 sum of 5 uniform 01 random numbers1 2491767 Generate a standard uniform number use qnorm u2runif5u11 03807355 06838301 05793533 07001886 01476591 uqnormu2u1 19863522 04100890 03649655 12394764 02776269 Q1 u3runif1000u31 0178273742 0338654670 0502983252 05741924635 0938588518 0164298457 0568822881 02772613039 0587949903 0822968805 0486584451 030814177613 0057207227 0523044843 0481863485 035759048717 0278691400 0547701614 0912094467 025596378021 0017637369 0827254662 0049479483 059524996725 0981266572 0569439175 0727461077 015183597029 0318237809 0699689800 0854843975 037827948033 0275432114 0988443919 0134025161 097795288737 0642202243 0600516791 0162106824 014382904441 0762430230 0781958816 0217104930 071469718845 0293083606 0271073145 0903164100 093455141049 0452999341 0329169206 0398795732 016944746353 0209013989 0827561936 0347139587 059918732657 0452403407 0093152807 0896113889 026290253361 0711164872 0249534035 0896619297 017441681465 0468116865 0795492926 0341465854 047854040969 0260783592 0985835146 0438381592 073066656173 0680872272 0907649460 0760866767 085365169177 0254686764 0453843033 0784928615 059171317481 0988043745 0927597355 0885562700 056929413285 0919895268 0290173398 0256231378 072095414689 0162788707 0482136352 0980341022 071478602893 0603208002 0756598214 0042582439 089257704897 0766692444 0472288112 0897595979 0407147537101 0767170512 0941631244 0765189774 0650673144105 0923338404 0270001958 0960051585 0441324859109 0262421818 0362591780 0902642826 0294795499113 0214329107 0052150619 0936144301 0840517639117 0612928761 0048513069 0269719144 0760647244121 0917457117 0042594744 0623126212 0025791519125 0996860833 0177718724 0654859019 0661239052129 0820549976 0876687104 0082439308 0830690825133 0417017611 0066647755 0104336319 0731123660137 0594064977 0534583113 0048505401 0615337142141 0738851126 0117799712 0366601524 0135035213145 0297117565 0908073284 0112918757 0564549285149 0008583148 0787502195 0807160685 0509219521153 0478424136 0403077338 0543652771 0007867210157 0173895296 0896861917 0519487014 0973213919161 0805484351 0949031616 0285357425 0619058772165 0795161493 0935566761 0526652905 0831893430169 0800116418    See Answer
Get Answers to Unlimited Questions

Join us to gain access to millions of questions and expert answers. Enjoy exclusive benefits tailored just for you!

Membership Benefits:
  • Unlimited Question Access with detailed Answers
  • Zin AI - 3 Million Words
  • 10 Dall-E 3 Images
  • 20 Plot Generations
  • Conversation with Dialogue Memory
  • No Ads, Ever!
  • Access to Our Best AI Platform: Flex AI - Your personal assistant for all your inquiries!
Become a Member

Other questions asked by students