Stat 407 Lab 11 Multivariate Normal Fall 2001 SOLUTION

advertisement
Stat 407 Lab 11 Multivariate Normal Fall 2001 SOLUTION
In this lab we look at samples from multivariate normal distributions with different means and covariances,
and one real data set to assess normality.
1. Consider a bivariate normal population with µ1 = 0, µ2 = 2, σ11 = 2, σ22 = 1, ρ12 = 0.5.
(a) Write out the squared generalized distance expression (X − µ)0 Σ−1 (X − µ) as a function of x1 , x2 .
x21 − x1 (x2 − 2) + 2(x2 − 2)2
(b) Write out the bivariate normal density function.
f (x1 , x2 ) =
1
1
exp(− (x1 − 0 x2 − 2)0
2
2π(2 × 1 − 0.71 )
2
"
2
0.71
0.71
1
#−1
(x1 − 0 x2 − 2))
2. Using the tools available in S-Plus generate and examine samples from a standard normal distribution.
Choose Data, Random Numbers, and select Normal, mean 0 and standard deviation 1.
(a) Generate samples of size 20, 100, and the number of variables equal to 2 and 5. This will give you 4
data sets.
(b) Plot the samples using pairwise plots (or a scatterplot matrix as appropriate). Describe the differences
between the 4 data sets.
Should note more odd patterns in smaller sample size, and larger number of variables.
(c) Plot the data using normal probability plots. Describe the differences between the 4 data sets.
Should note more odd patterns in smaller sample size, and larger number of variables.
3. Now start ggobi on several test data sets, and 50% contour ellipse for the distribution.
In each case note the main features of the shape.
(a) Sample from a standard 3D normal, and 50% contour from the standard normal probability density.
Look at the 1D plots of each variable in the normal sample, and describe what you see. Adjust the
smoothness parameter of the ASH curve to get the most bell-shaped curve.
The first two variables look quite non-normal.
Watch both data sets in the tour.
Should see roughly spherical patterns. The contour will look like a sphere.
(b) Sample from a standard 6D normal, and 50% contour from the standard normal probability density.
Look at the 1D plots of each variable in the normal sample, and describe what you see. Adjust the
smoothness parameter of the ASH curve to get the most bell-shaped curve.
Watch both data sets in the tour.
Should see roughly spherical patterns. The contour will look like a sphere.
4. Explore the womens track data for its marginal normality, multivariate normality, nonlinear relationships
and outliers. Examine transformations to improve the appearance of normality.
The 100m, 200m and 400m appear reasonably normal, the remaining events have highly skewed distributions. A log transformation appears to fix the 800m, and power transformations fix the remaining events.
The bivariate normality assumption looks reasonable for the transformed variables based on the scatterplot
matrix view. There are a few outliers, though, which are not consistent with normality.
1
2
3
4
Download