baeethtsadia
baeethtsadia
10.03.2020 • 
Mathematics

This problem explores an interesting property of the sum of independent normal random variables via the use of the rnorm( ) function. This function is used to draw a specified number of observations from a normal distribution and has a generic structure.
rnorm(n, mean = 0, sd = 1)
where n is the number of observations, mean is the parameter u, and sd is the parameter o. For example, the following code draws 10 observations from the standard normal, Z

set.seed(2019) #set seed for pseudo-random sampling
rnorm(10, mean = 0, sd 1)

## [ 1] 0.7385227 -0.5147605 -1.6401813 0.9160368 -1.2674820 0.7382478
## [ 7] -0.7826228 0.5092959 -1.4899391 -0.3191793

Suppose X is normally distributed with mean 15 and standard deviation 2, while Y is normally distributed with mean 10 and standard deviation 9.
(a) Generate 10,000 observations each from X and Y (NOTE: It is not necessary to print out all the values as part of your solution). Using graphical and numerical summaries, confirm that the sets of observations appear normally distributed with the expected parameters
(b) Suppose we are interested in the distribution of the random variable X + Y i. Using the simulated observations in part a), directly calculate E(X+Y) and Var(X+ Y i. Plot the distribution of X Y and describe its shape
(c) Suppose we are interested in the distribution of the random variable X - Y. Using the simulated observations in part a), directly calculate E(X Y) and Var(X - Y).
(d) From theory, calculate E(X+Y), Var(X+Y), E(X-Y), and Var(X- Y). Compare the theoretical values to the answers from parts b) and c).
(e) From the simulated observations, estimate P(X < Y).
(f) If two independent random variables X and Y are normally distributed, then their sum is also normally distributed. Calculate P(X < Y) and compare this value to the estimate from part e).

Solved
Show answers

Ask an AI advisor a question