[npl] / trunk / NationalProblemLibrary / UVA-Stat / setStat212-Homework04 / stat212-HW04-14.pg Repository: Repository Listing bbplugincoursesdistsnplrochestersystemwww

# View of /trunk/NationalProblemLibrary/UVA-Stat/setStat212-Homework04/stat212-HW04-14.pg

Tue Jul 3 21:36:52 2007 UTC (5 years, 10 months ago) by jjholt
File size: 1897 byte(s)
```Added stat problems.  Tags to be fixed soon.
```

```    1 ## DESCRIPTION
2 ##  Statistics: Probability
3 ## ENDDESCRIPTION
4
5 ## KEYWORDS('statistics', 'probability')
6 ## naw tagged this problem.
7
8 ## DBchapter('Probability')
9 ## DBsection()
10 ## Date('6/13/2005')
11 ## Author('Nolan A. Wages')
12 ## Institution('UVA')
13 ## TitleText1('Statistics for Management and Economics')
14 ## EditionText1('6')
15 ## AuthorText1('Keller, Warrack')
16 ## Section1()
17 ## Problem1()
18
19
20 DOCUMENT();        # This should be the first executable line in the problem.
21
23 "PG.pl",
24 "PGbasicmacros.pl",
25 "PGchoicemacros.pl",
27 "PGnumericalmacros.pl",
28 "PGstatisticsmacros.pl",
29 "PGauxiliaryFunctions.pl"
30 );
31
32
33
34
35 TEXT(beginproblem());
36 \$showPartialCorrectAnswers = 1;  # Change to 0 to shut off separate answer display.
38
39
40 \$a = random(75,85,1);
41 \$b = random(25,35,1);
42 \$c = random(10,15,1);
43 \$a1 = random(35,45,1);
44 \$d = .01*\$a;
45 \$e = .01*\$b;
46 \$f = .01*\$c;
47 \$d1 = .01*\$a1;
48 \$g = 1-\$f;
49 \$g1 = 1-\$d1;
50
51 BEGIN_TEXT
52 \$PAR
54 that \$a\$PERCENT of people who have suffered a heart
55 attack had periodontal disease, an inflammation of
56 the gums.  Only \$b\$PERCENT of healthy people have
57 this disease.  Suppose that in a certain community
58 heart attacks are quite rare, occurring with only
59 \$c\$PERCENT probability.
60 \$PAR
61 A. If someone has periodontal
62 disease, what is the probability that he or she
63 will have a heart attack?
64 \$PAR
65 Probability = \{ans_rule(15)\}
66 \$PAR
67 B. If \$a1\$PERCENT of the people in a community will have
68 a heart attack, what is the probability that a person
69 with periodontal disease will have a heart attack?
70 \$PAR
71 Probability = \{ans_rule(15)\}
72
73 \$BR
74
75 END_TEXT
76
77 &ANS(num_cmp((\$d*\$f)/((\$d*\$f)+(\$g*\$e))) );
78 &ANS(num_cmp((\$d*\$d1)/((\$d*\$d1)+(\$g1*\$e))) );
79
80 ENDDOCUMENT();       # This should be the last executable line in the problem.
```