(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.

MATLAB: An Introduction with Applications
6th Edition
ISBN:9781119256830
Author:Amos Gilat
Publisher:Amos Gilat
Chapter1: Starting With Matlab
Section: Chapter Questions
Problem 1P
icon
Related questions
Question
not use ai please
(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
Transcribed Image Text:(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.
Transcribed Image Text: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.
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Recommended textbooks for you
MATLAB: An Introduction with Applications
MATLAB: An Introduction with Applications
Statistics
ISBN:
9781119256830
Author:
Amos Gilat
Publisher:
John Wiley & Sons Inc
Probability and Statistics for Engineering and th…
Probability and Statistics for Engineering and th…
Statistics
ISBN:
9781305251809
Author:
Jay L. Devore
Publisher:
Cengage Learning
Statistics for The Behavioral Sciences (MindTap C…
Statistics for The Behavioral Sciences (MindTap C…
Statistics
ISBN:
9781305504912
Author:
Frederick J Gravetter, Larry B. Wallnau
Publisher:
Cengage Learning
Elementary Statistics: Picturing the World (7th E…
Elementary Statistics: Picturing the World (7th E…
Statistics
ISBN:
9780134683416
Author:
Ron Larson, Betsy Farber
Publisher:
PEARSON
The Basic Practice of Statistics
The Basic Practice of Statistics
Statistics
ISBN:
9781319042578
Author:
David S. Moore, William I. Notz, Michael A. Fligner
Publisher:
W. H. Freeman
Introduction to the Practice of Statistics
Introduction to the Practice of Statistics
Statistics
ISBN:
9781319013387
Author:
David S. Moore, George P. McCabe, Bruce A. Craig
Publisher:
W. H. Freeman