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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started