Skip to content

Commit 6381499

Browse files
authored
Merge pull request #1034 from gajennings/main
Fix bug 4754
2 parents 698ca88 + f31542d commit 6381499

File tree

1 file changed

+18
-23
lines changed

1 file changed

+18
-23
lines changed

OpenProblemLibrary/UVA-Stat/setStat212-Homework06/stat212-HW06-08.pg

Lines changed: 18 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
## Institution(UVA)
1212
## Author(Nolan A. Wages)
1313
## Level(2)
14-
## Static(1)
14+
## MO(1)
1515
## TitleText1('Statistics for Management and Economics')
1616
## AuthorText1('Keller, Warrack')
1717
## EditionText1('6')
@@ -24,54 +24,49 @@ DOCUMENT(); # This should be the first executable line in the problem.
2424

2525
loadMacros(
2626
"PGstandard.pl",
27-
"PGchoicemacros.pl",
28-
"PGnumericalmacros.pl",
29-
"PGstatisticsmacros.pl",
27+
"MathObjects.pl",
3028
"PGcourse.pl"
3129
);
3230

3331
TEXT(beginproblem());
3432
$showPartialCorrectAnswers = 1;
35-
## install_problem_grader(~~&std_problem_grader);
36-
37-
$a = random(1,3,1);
38-
$b = random(6,10,1);
39-
$c = random(1,2,1);
40-
$d = random(5,7,1);
41-
$e = $c+1;
42-
$f = $d - 1;
43-
$g = $d - 2;
44-
4533

34+
Context("Numeric");
4635

36+
$a = random(1,3,1);
37+
$p = $a + random(1,2,1);
38+
$q = $p + random(1,2,1);
39+
$r = $q + random(1,2,1);
40+
$b = $r + random(1,2,1);
41+
$w = $b-$a;
42+
$f = Compute("(x-$a)/$w");
43+
44+
Context()->texStrings;
4745
BEGIN_TEXT
4846
$PAR
4947
The following density function describes a random variable \(X\).
5048

5149
$PAR
5250
\[
53-
f(x) = \frac{x - 1}{8} \;\;\mathrm{if}\;\; 1 < x < 5
51+
f(x) = $f \;\;\text{if}\;\; $a < x < $b
5452
\]
5553
$PAR
5654

57-
A. Find the probability that \(X\) lies between 2 and 4.
55+
A. Find the probability that \(X\) lies between $p and $r.
5856
$PAR
5957
Probability = \{ans_rule(15)\}
6058
$PAR
6159

62-
B. Find the probability that \(X\) is less than 3.
60+
B. Find the probability that \(X\) is less than $q.
6361
$PAR
6462
Probability = \{ans_rule(15)\}
6563
$PAR
6664

67-
68-
69-
70-
7165
END_TEXT
66+
Context()->normalStrings;
7267

73-
ANS(num_cmp(.5));
74-
ANS(num_cmp(.25));
68+
ANS(Compute("($r-$a)^2/$w^2-($p-$a)^2/$w^2")->cmp());
69+
ANS(Compute("($q-$a)^2/$w^2")->cmp());
7570

7671

7772
ENDDOCUMENT(); # This should be the last executable line in the problem.

0 commit comments

Comments
 (0)