> #Contour plot purposely made x and y-axes the same – length so that one can judge variability > par(pty = "s") > contour(x = x1, y = x2, z = fx, main = "Multivariate normal", xlab = expression(x[1]), ylab = expression(x[2]), xlim = c(10,20), ylim = c(15, 25)) > #panel.first = grid() does not work quite right with contour() so used abline() instead > abline(h = 17:23, lty = "dotted", col = "lightgray") > abline(v = seq(from = 12, to = 18, by = 2), lty = "dotted", col = "lightgray") To rotate the plot, hold your left mouse button down while you move the mouse. To zoom in on the first plot, hold your right mouse button down while you move the mouse. Examine the following: surface is centered at . surface is wider in the x2 direction than in the x1. This is because there is more variability. the shape of the surface The contour plot is an – ellipse and the surface plot looks like a 3D normal curve. underneath the surface is 1. Note that the 3D plot is not in the graphics window. In to get the plot into Word, I used the Windows’ Snipping Tool. Suppose = and . The only change from the previous example is that 22 has increased. Note that . are 3D
> #Contour plot – purposely made x and y-axes the same length so that one can judge variability > par(pty = "s") > contour(x = x1, y = x2, z = fx, main = "Multivariate normal", xlab = expression(x[1]), ylab = expression(x[2]), xlim = c(10,20), ylim = c(15, 25)) > #panel.first = grid() does not work quite right with contour() so used abline() instead > abline(h = 17:23, lty = "dotted", col = "lightgray") > abline(v = seq(from = 12, to = 18, by = 2), lty = "dotted", col = "lightgray") To rotate the plot, hold your left mouse button down while you move the mouse. To zoom in on the first plot, hold your right mouse button down while you move the mouse. Examine the following: surface is centered at . surface is wider in the x2 direction than in the x1. This is because there is more variability. the shape of the surface – The contour plot is an ellipse and the surface plot looks like a 3D normal curve. underneath the surface is 1. Note that the 3D plot is not in the graphics window. In to get the plot into Word, I used the Windows’ Snipping Tool. Suppose = and . The only change from the previous example is that 22 has increased. Note that . are 3D
data-distributions-correlation.docx