Distributions: Exercises


1. Value-at-Risk (VaR). You are told to find the 92% VaR threshold for a porfolio with profits that are normally distributed with mean of 3 and a standard deviation of 7.

In R, the function qnorm(percentile, mean, sd) finds the boundary value associated with a given percentile of the normal distribution.

Use qnorm() to compute the VaR threshold.


# Define the percentile. percentile <- ___ # Define the mean. mean_profit <- 3 # Define the standard deviation. sd_profit <- ___ # Calculate the VaR threshold. var_threshold <- qnorm(___, mean = ___, sd = ___) # Define the percentile. percentile <- 0.08 # Define the mean. mean_profit <- 3 # Define the standard deviation. sd_profit <- 7 # Calculate the VaR threshold. var_threshold <- qnorm(percentile, mean_profit, sd_profit) test_error() test_object("percentile", incorrect_msg="Remember that you want to find the threshold associated with the lowest 8% of returns.") test_object("sd_profit", incorrect_msg="Check the problem description for the correct value of the standard deviation.") test_object("var_threshold", incorrect_msg="Did you enter all of the arguments to `qnorm()` correctly?") success_msg("Excellent work. What would happen to `var_threshold` if you doubled the standard deviation of the profits?")
Did you set the parameters of the qnorm() correctly?

Previous Exercise Next Exercise