Question: Coding using R, please show code for these steps 1. Create a vector with 6 numerical values of different degree of freedoms 2. Use the

Coding using R, please show code for these steps

1. Create a vector with 6 numerical values of different degree of freedoms

2. Use the function rt() to generate 100 random values which is from a t-distribution with each choice of degree of freedoms in step 1.

3. Plot the histogram and density curve of the 6 sequences of the data using functions hist() and density(). Print 6 plots in one page. In the plots, give a title of the each plot and indicate the value of degree of freedom, such as "Histogram with df = 5".

4. Use the random values in step 2 to compute the density value of the t-distribution by function dt(). Plot the density for the 6 sequences of the data.

5. Use the sumstats() function from the sample code of week2 to compute all summary statistics for the 6 sequences of data. Save the results in a matrix with 9 rows and 6 columns. Rows report the each statistics and colomns represent of each data serires.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!