The student plans the budget for the next year.
Expenses:
Tuition: 8400
Student Dormitory: 5400
Income:
Scholarship: 3000
Parent's help: 4000
Unknown expenses:
Food 900 - 1350
Transport 200 - 600
Books 400 - 800
Other 600 - 1200
Unknown income:
Restaurant job: 3000 - 5000
Library job: 2000 - 3000
Assume that unkonw expanses and incomes have a uniform distibution within the given limits. Conducting 1000 attempts, assess what credit the student must take so that with a probability of 95% he whould not have to take a higher interest rate loan.
Just guide me to the solution :) Because I have no idea how to start.
Ps. I can use Matlab
Your task is to find the result by simulation. Assuming you have a function $r(a,b)$ available that produces a uniformly distributed random number in the interval $[a,b]$, write a loop that computes (and stores in an array) the expression $$8400+5400-3000-4000+r(300,1350)+r(200,600)+r(400,800)+r(600,1200)-r(3000,5000)-r(2000,3000) $$ a thousand times. Sort the resulting array. Then for any number $x$ in the range from the 950th to the 951st entry in that array, we have that $95\,\%$ of the generated numbers are $<x$.
Remark: The results of such experiments are of course subject to variation. See below where I performed the above calculations twice, giving rise to two different percentiles