Exercise 3. Bank earnings expected value
What is the expected value of \(S\), the sum of losses over 10,000 loans? For now, assume a bank makes no money if the loan is paid.
This exercise is part of the course
HarvardX Data Science - Probability (PH125.3x)
Exercise instructions
- Using the chances of default (
p_default
), calculate the expected losses over 10,000 loans.
Hands-on interactive exercise
Have a go at this exercise by completing this sample code.
# Assign the number of loans to the variable `n`
n <- 10000
# Assign the loss per foreclosure to the variable `loss_per_foreclosure`
loss_per_foreclosure <- -200000
# Assign the probability of default to the variable `p_default`
p_default <- 0.03
# Calculate the expected loss due to default out of 10,000 loans