Parent Directory
|
Revision Log
added problem library as webwork/ww_prob_lib with revision tag prob-lib-2
1 ##DESCRIPTION 2 ##KEYWORDS('probability','events','conditional') 3 ## 4 ##ENDDESCRIPTION 5 6 DOCUMENT(); # This should be the first executable line in the problem. 7 8 loadMacros( 9 "PG.pl", 10 "PGbasicmacros.pl", 11 "PGchoicemacros.pl", 12 "PGanswermacros.pl", 13 "PGgraphmacros.pl", 14 "PGauxiliaryFunctions.pl" 15 ); 16 17 TEXT(&beginproblem); 18 $showPartialCorrectAnswers = 1; 19 20 $a = random(0.2,0.5,0.1); 21 $b = random(0.6,0.9,0.1); 22 $d = 0; 23 if ($a + $b > 1 ) {$d = $a + $b -1;} 24 $c = random($d,$a,0.05); 25 $ans1 = $c / $b; 26 $ans2 = $c / $a; 27 28 BEGIN_TEXT 29 $BR 30 If \( P(A) = $a \), \( \ P(B) = $b \), \ and \( \ P(A \cap B) = $c \), \ then $BR 31 (a) \( \) \( P(A|B) = \)\{ans_rule(10)\} \ and $BR 32 (b) \( \) \( P(B|A) = \)\{ans_rule(10)\} 33 34 END_TEXT 35 36 &ANS(arith_num_cmp($ans1)); 37 &ANS(arith_num_cmp($ans2)); 38 39 40 ENDDOCUMENT(); # This should be the last executable line in the problem. 41
| aubreyja at gmail dot com | ViewVC Help |
| Powered by ViewVC 1.0.9 |