Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Answer the following question by showing the R code. Use R to simulate k standard normal random variables of your choices of sample size n.

Answer the following question by showing the R code.

image text in transcribed

image text in transcribed

Use R to simulate k standard normal random variables of your choices of sample size n. Let's call them Zi,i-1...k. Show the following: a) Visually show that the i2 has similar distribution as X2 distribution with k degrees of freedom. (hint for R novice) it might be easier to define an n k matrix, where each column is randomly generated by a standard normal distribution, then use the rowSums function to calculate sum of squares. b) Look up the R package fitdistrplus, and use the R function fitdistr to show that ,2 is indeed fitted to a x random variable. Try a range of different n and k, and report your findings. (Note, you may use the BFGS method with an initial value of df - 1 to fit the distribution chi-squared.)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Securing SQL Server Protecting Your Database From Attackers

Authors: Denny Cherry

3rd Edition

0128012757, 978-0128012758

More Books

Students also viewed these Databases questions

Question

Draw a picture consisting parts of monocot leaf

Answered: 1 week ago

Question

1. What are the pros and cons of diversity for an organisation?

Answered: 1 week ago

Question

1. Explain the concept of diversity and equality in the workplace.

Answered: 1 week ago