Graphics Programs Reference
In-Depth Information
solve(A*mˆN - R*(mˆN - 1)/(m - 1), A)
ans =
R*(mˆN-1)/(mˆN)/(m-1)
For example, if one is shopping for a house and can afford to pay $1500 per
monthfor a 30-year fixed-rate mortgage, the maximum loan amount as a
function of the interest rate is given by
disp(' Interest Rate
Loan Amt.')
for rate = 1:10,
disp([rate, double(subs(ans, [R, N, m], [1500, 360,...
1 + rate*percent*peryear]))])
end
Interest Rate
Loan Amt.
1.00
466360.60
2.00
405822.77
3.00
355784.07
4.00
314191.86
5.00
279422.43
6.00
250187.42
7.00
225461.35
8.00
204425.24
9.00
186422.80
10.00
170926.23
Monte Carlo Simulation
In order to make statistical predictions about the long-term results of a
random process, it is often useful to do a simulation based on one's
understanding of the underlying probabilities. This procedure is referred to
as the Monte Carlo method.
As an example, consider a casino game in which a player bets against the
house and the house wins 51% of the time. The question is: How many
games have to be played before the house is reasonably sure of coming out
ahead? This scenario is common enough that mathematicians long ago
figured out very precisely what the statistics are, but here we want to
illustrate how to get a good idea of what can happen in practice without
having to absorb a lot of mathematics.
Search WWH ::




Custom Search