(c) Superimpose on the histogram a graph of the PDF of a 2n1 distribution using the lines function. (d) Comment on how close our empirical distribution is to the 2n1 distribution. (iv) Calculate the mean and variance of X and compare it to the mean and variance of a 2 n1 distribution. (v) Calculate the median, lower and upper quartiles of the vector X using either quantile or summary and compare them to the median, lower and upper quartiles of a 2?n?1 distribution. (vi) (a) Simulate 1,000 values from a 2 n21 distribution and store them in the vector chi. (b) Use qqplot to obtain a QQ plot for the vectors X and chi Heights of a particular group of women are normally distributed with mean 162cm and standard deviation 9 cm. (i) (a) Create a vector xvar which contains 1,000 zeros. (b) Use a loop to obtain 1,000 sample variances from a sample of 20 women, using set.seed(27) and storing the sample variance of the ith sample of 20 women in the ith element of xvar. Recall that 2 2 12 (1) n n S 2 2 2 for samples of size n from a 2 N(,) distribution. (ii) Create a new vector X from xvar which is equal to 2 (201) 9 2 2xvar. (iii) (a) Draw a labelled histogram of the densities of vector X. (b) Superimpose on the histogram the empirical PDF of vector X using the functions density and lines.
(c) Superimpose on the histogram a graph of the PDF of a 2n1 distribution using the lines function. (d) Comment on how close our empirical distribution is to the 2n1 distribution. (iv) Calculate the mean and variance of X and compare it to the mean and variance of a 2 n1 distribution. (v) Calculate the median, lower and upper quartiles of the vector X using either quantile or summary and compare them to the median, lower and upper quartiles of a 2?n?1 distribution. (vi) (a) Simulate 1,000 values from a 2 n21 distribution and store them in the vector chi. (b) Use qqplot to obtain a QQ plot for the vectors X and chi Heights of a particular group of women are normally distributed with mean 162cm and standard deviation 9 cm. (i) (a) Create a vector xvar which contains 1,000 zeros. (b) Use a loop to obtain 1,000 sample variances from a sample of 20 women, using set.seed(27) and storing the sample variance of the ith sample of 20 women in the ith element of xvar. Recall that 2 2 12 (1) n n S 2 2 2 for samples of size n from a 2 N(,) distribution. (ii) Create a new vector X from xvar which is equal to 2 (201) 9 2 2xvar. (iii) (a) Draw a labelled histogram of the densities of vector X. (b) Superimpose on the histogram the empirical PDF of vector X using the functions density and lines.
Linear Algebra: A Modern Introduction
4th Edition
ISBN:9781285463247
Author:David Poole
Publisher:David Poole
Chapter7: Distance And Approximation
Section7.3: Least Squares Approximation
Problem 31EQ
Question
not use ai please
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 2 steps
Recommended textbooks for you
Linear Algebra: A Modern Introduction
Algebra
ISBN:
9781285463247
Author:
David Poole
Publisher:
Cengage Learning
Linear Algebra: A Modern Introduction
Algebra
ISBN:
9781285463247
Author:
David Poole
Publisher:
Cengage Learning