The goal of this problem is to prove rigorously the theoretical result illustrated by the simulations of Problem 1.
1. Compute the density of a random variable X whose logarithm log X is N(µ, σ2). Such a random variable is usually called a lognormal random variable with mean µ and variance σs.
Throughout the rest of the problem we assume that X is a lognormal random variable with parameters 0 and 1 (i.e. X is the exponential of an N(0, 1) random variable) and that Y is a lognormal random variable with parameters 0 and σ2(i.e. Y is the exponential of an N(0, σ2) random variable). Moreover, we use the notation ρmin and ρmax introduced in the last paragraph of Subsection 2.1.2
Problem 1
1. Construct a vector of 100 increasing and regularly spaced numbers starting from .1 and ending at 20. Call it SIG2. Construct a vector of 21 increasing and regularly spaced numbers starting from -1.0 and ending at 1.0. Call it RHO.
2. For each entry σ2 of SIG2 and for each entry ρ of RHO:
- Generate a sample of size N = 500 from the distribution of a bivariate normal vector Z = (X, Y ), where X ∼ N(0, 1), and Y ∼ N(0, σ2), and the correlation coefficient of X and Y is ρ (the S object you create to hold the values of the sample of Z's should be a 500×2 matrix);
- Create a 500 × 2 matrix, call it EXPZ, with the exponentials of the entries of Z (the distributions of these columns are lognormal as defined in Problem 2.7);
- Compute the correlation coefficient, call it ρ˜, of the two columns of EXPZ 3. Produce a scatterplot of all the points (σ2, ρ˜) so obtained. Comment.