Session Ready
Exercise

Exercise 1. Bank earnings

Say you manage a bank that gives out 10,000 loans. The default rate is 0.03 and you lose $200,000 in each foreclosure.

Create a random variable \(S\) that contains the earnings of your bank. Calculate the total amount of money lost in this scenario.

Instructions
100 XP
  • Using the sample function, generate a vector called defaults that contains n samples from a vector of c(0,1), where 0 indicates a payment and 1 indicates a default
  • Multiply the total number of defaults by the loss per foreclosure.