## Forum archive 2000-2006

### Marat Sadykov - normal_ prob errors ### Marat Sadykov - normal_ prob errors

by Arnold Pizer -
Number of replies: 0 normal_ prob errors topic started 10/14/2003; 11:38:34 PMlast post 10/16/2003; 3:21:48 PM Marat Sadykov - normal_ prob errors 10/14/2003; 11:38:34 PM (reads: 812, responses: 1) Hello, There seem to be errors in problems on normal distribution using normal_prob function. For example the code : ------------------------------------------------------------------ DOCUMENT(); # This should be the first executable line in the problem. TEXT(beginproblem()); $showPartialCorrectAnswers = 1;$mu = random(60,80,5); $sigma = random(5,10,.1);$a = random(50,$mu,5);$b = random(50,$mu,5); while($a==$b) {$b = random(60,80,5);} $c = random(20,40,1);$xa = ($a-$mu)/$sigma;$xb = ($b-$mu)/$sigma;$xc = ($c-$mu)/$sigma;$ans1 = normal_prob($xa, "infty");$ans2 = normal_prob(-"infty", $xb); BEGIN_TEXT The physical fitness of an athlete is often measured by how much oxygen the athlete takes in (which is recorded in milliliters per kilogram, ml/kg). The mean maximum oxygen uptake for elite athletes has been found to be ($mu) with a standard deviation of ($sigma). Assume that the distribution is approximately normal.$PAR (a) ( ) What is the probability that an elite athlete has a maximum oxygen uptake of at least ($a) ml/kg?$PAR answer: {ans_rule(10)} $PAR (b) ( ) What is the probability that an elite athlete has a maximum oxygen uptake of ($b) ml/kg or lower? $PAR answer: {ans_rule(10)}$PAR (c) ( ) Consider someone with a maximum oxygen uptake of ($c) ml/kg. Is it likely that this person is an elite athlete? Write "YES" or "NO."$PAR answer: {ans_rule(10)} END_TEXT ANS(num_cmp($ans1, tol=>0.01)); ANS(num_cmp($ans2, tol=>0.01)); ANS(str_cmp("NO")); ENDDOCUMENT(); # This should be the last executable line in the problem. ------------------------------------------------------------------- ... causes the following warning messages ... ------------------------------------------------------------------ Compiler warnings: * Odd number of elements in hash assignment at (eval 158) line 446. ##More details: -------- PG_priv::romberg called at (eval 159) line 64 ---- PG_priv::normal_prob called at (eval 54) line 32 ---- PG_priv::__ANON__ called at /usr/local/lib/perl5/5.6.1/i686-linux/Safe.pm line 222 ---- Safe::reval called at /usr/local/webwork/system/lib//PGtranslator.pm line 733 ---- PGtranslator::translate called at /usr/local/webwork/system/cgi/cgi-scripts/processProblem8.pl line 445 ----------------------------------- * This option |8| is not recognized in this subroutine HASH(0x8aefc44) 8 => at (eval 140) line 3747. ##More details: -------- PG_priv::set_default_options called at (eval 158) line 447 ---- PG_priv::romberg called at (eval 159) line 64 ---- PG_priv::normal_prob called at (eval 54) line 32 ---- PG_priv::__ANON__ called at /usr/local/lib/perl5/5.6.1/i686-linux/Safe.pm line 222 ---- Safe::reval called at /usr/local/webwork/system/lib//PGtranslator.pm line 733 ---- PGtranslator::translate called at /usr/local/webwork/system/cgi/cgi-scripts/processProblem8.pl line 445 ------------------------------------------------------------------- ... Any idea of what is happening? Appreciate your help Marat Sadykov, Columbia <| Post or View Comments |> John Jones - Re: normal_ prob errors 10/16/2003; 3:21:48 PM (reads: 935, responses: 0) Hi, I think this was fixed in PGstatisticsmacros. Try getting a fresh copy of that file. John <| Post or View Comments |>