[npl] / trunk / NationalProblemLibrary / UVA-FinancialMath / setFinancialMath-Sect53-ContingentPay / math114-53-05.pg Repository: Repository Listing bbplugincoursesdistsnplrochestersystemwww

# View of /trunk/NationalProblemLibrary/UVA-FinancialMath/setFinancialMath-Sect53-ContingentPay/math114-53-05.pg

Wed Oct 12 19:45:41 2005 UTC (7 years, 7 months ago) by gage
File size: 1644 byte(s)
```This commit was generated by cvs2svn to compensate for changes in r5, which
included commits to RCS files with non-trunk default branches.```

```    1 ## DESCRIPTION
2 ##  Financial mathematics: Contingent payments
3 ## ENDDESCRIPTION
4
5 ## KEYWORDS('financial mathematics', 'contingent payments')
6 ## JJH tagged this problem.
7
8 ## DBsubject('Financial Mathematics')
9 ## DBchapter('Probability and Contingent Payments')
10 ## DBsection('Contingent Payments')
11 ## Date('5/22/2005')
12 ## Author('Jeff Holt')
13 ## Institution('UVA')
14 ## TitleText1('Financial Mathematics')
15 ## EditionText1('1')
16 ## AuthorText1('Holt')
17 ## Section1('5.3')
18 ## Problem1()
19
20 DOCUMENT();        # This should be the first executable line in the problem.
21
23            "PGbasicmacros.pl",
24            "PGchoicemacros.pl",
26 "PGauxiliaryFunctions.pl");
27
28 TEXT(beginproblem());
29 \$showPartialCorrectAnswers = 0;
30
31 \$yp = random(8.8,10.3,0.1);
32 \$y = 0.01*\$yp;
33 \$p = random(.85,.95,.01);
34 \$q = random(.75,.85,.01);
35 \$r = random(.65,.75,.01);
36 \$e = 0.01*floor(100*(\$p*1000*(1+\$y)**(-1) + \$q*1000*(1+\$y)**(-2) + \$r*1000*(1+\$y)**(-3)));
37
38 # Present the text.
39
40 TEXT(EV2(<<EOT));
41
42 You have an investment opportunity to receive 1000 dollars at the end of
43 each year for the next 3 years.  The probability of receiving the first
44 payment is \$p, and the probability of receiving the second is \$q.
45 If the expected yield rate is \$yp percent effective, and the expected present
46 value is \$e dollars, what is the probability of receiving the third payment?
47
48
49 \$BR
50
51 Answer = \{ &ans_rule(30) \} percent.
52 \$BR
53
54 EOT
55
56 \$ans = \$r*100;
57 ANS(num_cmp(\$ans, format => '%0.3f', tol => .01) );
58
59
60 ENDDOCUMENT();        # This should be the last executable line in the problem.
```

 aubreyja at gmail dot com ViewVC Help Powered by ViewVC 1.0.9