## 2.5 Problems: Review of Random Variables

Exercise 2.1 Suppose $$X$$ is a normally distributed random variable with mean $$0.05$$ and variance $$(0.10)^{2}.$$ That is, $$X\sim N(0.05,\,(0,10)^{2})$$. Use the and qnorm() functions in R to compute the following:
1. $$Pr(X\geq0.10)$$,~$$Pr(X\leq-0.10)$$.
2. $$Pr(-0.05\leq X\leq0.15)$$.
3. $$1\%$$ and $$5\%$$ quantiles, $$q_{0.01}^{R}$$ and $$q_{0.05}^{R}$$.
4. $$95\%$$ and $$99\%$$ quantiles, $$q_{0.95}^{R}$$ and $$q_{0.99}^{R}$$.
Exercise 2.2 Let $$X$$ denote the monthly return on Microsoft Stock and let $$Y$$ denote the monthly return on Starbucks stock. Assume that $$X\sim N(0.05,\,(0.10)^{2})$$ and $$Y\sim N(0.025,\,(0.05)^{2})$$.
1. Using a grid of values between $$-0.25$$ and $$0.35$$, plot the normal curves for $$X$$ and $$Y$$. Make sure that both normal curves are on the same plot.
2. Plot the points $$(\sigma_{X},\mu_{X})=(0.10,0.05)$$ and $$(\sigma_{Y},\mu_{Y})=(0.05,0.025)$$ in an x-y plot.
3. Comment on the risk-return tradeoffs for the two stocks.
Exercise 2.3 Let $$X_{1},\,X_{2},\,Y_{1},$$ and $$Y_{2}$$ be random variables.
1. Show that \begin{align*} \text{Cov}(X_{1}+X_{2},Y_{1}+Y_{2}) = & \text{Cov}(X_{1},Y_{1}) + \text{Cov}(X_{1},Y_{2}) +\\ &\text{Cov}(X_{2},Y_{1}) + \text{Cov}(X_{2},Y_{2}). \end{align*}
Exercise 2.4 Let $$X$$ be a random variable with $$\mathrm{var}(X)<\infty.$$
1. Show that $$\mathrm{var}(X)=E[(X-\mu_{X})^{2}]=E[X^{2}]-\mu_{X}^{2}.$$
Exercise 2.5 Let $$X$$ and $$Y$$ be a random variables such that $$\mathrm{cov}(X,Y)<\infty$$.
1. If $$Y=aX+b$$ where $$a>0$$ show that $$\rho_{XY}=\mathrm{cor}(X,Y)=1.$$
2. If $$Y=aX+b$$ where $$a<0$$ show that $$\rho_{XY}=\mathrm{cor}(X,Y)=-1.$$
Exercise 2.6 Let $$R$$ denote the simple monthly return on Microsoft stock and let $$W_{0}$$ denote initial wealth to be invested over the month. Assume that $$R\sim N(0.04,\,(0.09)^{2})$$ and that $$W_{0}=\100,000$$.
1. Determine the 1% and 5% Value-at-Risk (VaR) over the month on the investment. That is, determine the loss in investment value that may occur over the next month with 1% probability and with 5% probability.
Exercise 2.7 Let $$R_{t}$$ denote the simple monthly return and assume $$R_{t}\sim iid\,N(\mu,\sigma^{2}).$$ Consider the 2-period return $$R_{t}(2)=(1+R_{t})(1+R_{t-1})-1$$.
1. Assuming that $$\mathrm{cov}(R_{t},R_{t-1})=0,$$ show that $$E[R_{t}R_{t-1}]=\mu^{2}.$$ Hint: use $$\mathrm{cov}(R_{t},R_{t-1})=E[R_{t}R_{t-1}]-E[R_{t}]E[R_{t-1}]$$.
2. Show that $$E[R_{t}(2)]=(1+\mu^{2})-1$$.
3. Is $$R_{t}(2)$$ normally distributed? Justify your answer.
Exercise 2.8 Let $$r$$ denote the continuously compounded monthly return on Microsoft stock and let $$W_{0}$$ denote initial wealth to be invested over the month. Assume that $$r\sim iid\,N(0.04,(0.09)^{2})$$ and that $$W_{0}=\100,000.$$
1. Determine the 1% and 5% value-at-risk (VaR) over the month on the investment. That is, determine the loss in investment value that may occur over the next month with 1% probability and with 5% probability. (Hint: compute the 1% and 5% quantile from the Normal distribution for $$r$$ and then convert the continuously compounded return quantile to a simple return quantile using the transformation $$R=e^{r}-1$$.)
2. Let $$r(12)=r_{1}+r_{2}+\cdots+r_{12}$$ denote the 12-month (annual) continuously compounded return. Compute $$E[r(12)]$$, $$\mathrm{var}(r(12))$$ and $$\mathrm{sd}(r(12))$$. What is the probability distribution of $$r(12)$$?
3. Using the probability distribution for $$r(12)$$, determine the 1% and 5% value-at-risk (VaR) over the year on the investment.
Exercise 2.9 Let $$R_{VFINX}$$ and $$R_{AAPL}$$ denote the monthly simple returns on VFINX (Vanguard S&P 500 index) and AAPL (Apple stock). Suppose that $$R_{VFINX}\sim i.i.d.\,N(0.013,(0.037)^{2})$$, $$R_{AAPL}\sim i.i.d.\,N(0.028,(0.073)^{2})$$.
1. Sketch the normal distributions for the two assets on the same graph. Show the mean values and the ranges within 2 standard deviations of the mean. Which asset appears to be more risky?
2. Plot the risk-return tradeoff for the two assets. That is, plot the mean values of each asset on the y-axis and the standard deviations on the x-axis. Comment on the relationship.
3. Let $$W_{0}=\1,000$$ be the initial wealth invested in each asset. Compute the $$1\%$$ monthly Value-at-Risk values for each asset. (Hint: $$q_{0.01}^{Z}=-2.326$$).
4. Continue with the above question, state in words what the $$1\%$$ Value-at-Risk numbers represent (i.e., explain what $$1\%$$ Value-at-Risk for a one month $$\1,000$$ investment means).
5. The normal distribution can be used to characterize the probability distribution of monthly simple returns or monthly continuously compounded returns. What are two problems with using the normal distribution for simple returns? Given these two problems, why might it be better to use the normal distribution for continuously compounded returns?
Exercise 2.10 In this question, you will examine the chi-square and Students t distributions. A chi-square random variable with $$n$$ degrees of freedom, denoted $$X\sim\chi_{n}^{2},$$ is defined as $$X=Z_{1}^{2}+Z_{2}^{2}+\cdots+Z_{n}^{2}$$ where $$Z_{1},Z_{2},\ldots,Z_{n}$$ are $$iid\,N(0,1)$$ random variables. Notice that $$X$$ only takes positive values. A Student’s t random variable with $$n$$ degrees of freedom, denoted $$t\sim t_{n}$$, is defined as $$t=Z/\sqrt{X/n}$$, where $$Z\sim N(0,1)$$, $$X\sim\chi_{n}^{2}$$ and $$Z$$ is independent of $$X$$. The Student’s t distribution is similar to the standard normal except that it has fatter tails.
1. On the same graph, plot the probability curves of chi-squared distributed random variables with 1, 2, 5 and 10 degrees of freedom. Use different colors and line styles for each curve. Hint: In R the density of the chi-square distribution is computed using the function dchisq().
2. On the same graph, plot the probability curves of Student’s t distributed random variables with 1, 2, 5 and 10 degrees of freedom. Also include the probability curve for the standard normal distribution. Use different colors and line styles for each curve. Hint: In R the density of the chi-square distribution is computed using the function dt().
Exercise 2.11 Consider the following joint distribution of $$X$$ and $$Y$$:
X/Y 1 2 3
1 0.1 0.2 0
2 0.1 0 0.2
3 0 0.1 0.3
1. Find the marginal distributions of $$X$$ and $$Y$$. Using these distributions, compute $$E[X]$$, $$\mathrm{var}(X)$$, $$\mathrm{sd}(X)$$, $$E[Y]$$, $$\mathrm{var}(Y)$$ and $$\mathrm{sd}(Y)$$.
2. Compute $$\mathrm{cov}(X,Y)$$ and $$\mathrm{cor}(X,Y)$$.
3. Find the conditional distributions $$\mathrm{Pr}(X|Y=y)$$ for $$y=1,2,3$$ and the conditional distributions $$\mathrm{Pr}(Y|X=x)$$ for $$x=1,2,3.$$
4. Using the conditional distributions $$\mathrm{Pr}(X|Y=y)$$ for $$y=1,2,3$$ and $$\mathrm{Pr}(Y|X=x)$$ for $$x=1,2,3$$ compute $$E[X|Y=y]$$ and $$E[Y|X=x]$$.
5. Using the conditional distributions $$\mathrm{Pr}(X|Y=y)$$ for $$y=1,2,3$$ and $$\mathrm{Pr}(Y|X=x)$$ for $$x=1,2,3$$ compute $$\mathrm{var}[X|Y=y]$$ and $$\mathrm{var}[Y|X=x]$$.
6. Are $$X$$ and $$Y$$ independent? Fully justify your answer.
Exercise 2.12 Let $$X$$ and $$Y$$ be distributed bivariate normal with $$\mu_{X}=0.05$$, $$\mu_{Y}=0.025$$, $$\sigma_{X}=0.10$$, and $$\sigma_{Y}=0.05$$.
1. Using R package mvtnorm function rmvnorm(), simulate 100 observations from the bivariate normal distribution with $$\rho_{XY}=0.9$$. Using the plot() function create a scatterplot of the observations and comment on the direction and strength of the linear association. Using the function pmvnorm(), compute the joint probability $$Pr(X\leq,\,Y\leq0)$$.
2. Using R package mvtnorm function rmvnorm(), simulate 100 observations from the bivariate normal distribution with $$\rho_{XY}=-0.9$$. Using the plot() function create a scatterplot of the observations and comment on the direction and strength of the linear association. Using the function pmvnorm(), compute the joint probability $$Pr(X\leq,\,Y\leq0)$$.
3. Using R package mvtnorm function rmvnorm(), simulate 100 observations from the bivariate normal distribution with $$\rho_{XY}=0$$. Using the plot() function create a scatterplot of the observations and comment on the direction and strength of the linear association. Using the function pmvnorm(), compute the joint probability $$Pr(X\leq,\,Y\leq0)$$.