Stochastic Process, Markov Chains, Banking.
because each month there is a small probability that the borrower does not make that month’s repayment. #setting up the loan information loan_amount = 100 repayment = c(10, 0) prior_dist = c(1,0) expected_repayment = numeric(12) #calculating the expected profit for (i in 1:12){ new_dist =