Probability and Statistics: Exercises


4. Probability with a Normal Distribution. Suppose an asset has returns that are normally distributed with a mean of 5% (0.05) and a standard deviation of 10% (0.10).

Given this distribution, calculate the probability of observing a return smaller than -15% (-0.15) or greater than 25% (0.25). Use the pnorm() function in R to compute the probabilities.


# Define the mean and standard deviation. mean <- ___ sd <- ___ # Calculate the probability of return smaller than -15%. prob_less_than_minus_15 <- pnorm(-15, mean, sd) # Calculate the probability of return greater than 25%. prob_greater_than_25 <- 1 - pnorm(___, ___, ___) # Total probability. total_prob <- prob_less_than_minus_15 + prob_greater_than_25 # Print the probability. total_prob # Define the mean and standard deviation. mean <- 0.05 sd <- 0.10 # Calculate the probability of return smaller than -15%, prob_less_than_minus_15 <- pnorm(-0.15, mean, sd) # Calculate the probability of return greater than 25%. prob_greater_than_25 <- 1 - pnorm(0.25, mean, sd) # Total probability. total_prob <- prob_less_than_minus_15 + prob_greater_than_25 # Print the probability. total_prob test_error() test_object("total_prob", incorrect_msg="Make sure you've used the correct formula and functions to calculate the probabilities.") success_msg("Excellent work! How does this result compare to what you found with Chebyshev's inequality?")
Make sure to use the pnorm() function correctly by inputting the desired value, mean, and standard deviation. Also, remember that to get the probability greater than a certain value, you need to subtract the cumulative probability up to that value from 1.

Previous Exercise Next Exercise