[rochester] / trunk / rochester_problib / setStatistics3Estimates / ur_stt_3_21.pg Repository:
ViewVC logotype

View of /trunk/rochester_problib/setStatistics3Estimates/ur_stt_3_21.pg

Parent Directory Parent Directory | Revision Log Revision Log


Revision 18 - (download) (annotate)
Thu Jun 28 18:00:51 2001 UTC (11 years, 10 months ago) by amanda
File size: 1362 byte(s)
new problems

    1 ##DESCRIPTION
    2 ##KEYWORDS('')
    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 "PGnumericalmacros.pl",
   14 "PGstatisticsmacros.pl"
   15 );
   16 
   17 TEXT(beginproblem());
   18 $showPartialCorrectAnswers = 1;
   19 
   20 $a = random(100,130,1);
   21 $r1 = random(60, ($a-10),1);
   22 $r2 = random(($a+10),180,1);
   23 $R = ($r2-$r1)/4;
   24 $b = random(3,6,.01);
   25 
   26 @conf = ("\(80\\%\)",
   27    "\(90\\%\)",
   28    "\(95\\%\)",
   29    "\(98\\%\)",
   30    "\(99\\%\)");
   31 @slice = NchooseK(5,1);
   32 @sconf = @conf[@slice];
   33 
   34 $z1 = normal_distr(.4);
   35 $z2 = normal_distr(.45);
   36 $z3 = normal_distr(.475);
   37 $z4 = normal_distr(.49);
   38 $z5 = normal_distr(.495);
   39 
   40 @z = ($z1, $z2, $z3, $z4, $z5);
   41 @sz = @z[@slice];
   42 
   43 $n = ($sz[0]**2*$R**2)/$b**2;
   44 
   45 BEGIN_TEXT
   46 According to the Food and Drug Administration (FDA), a cup of coffee contains on average \($a\) miligrams (mg) of
   47 caffeine, with the amount per cup ranging from \($r1\) to \($r2\) mg.  Suppose you want to repeat the FDA experiment
   48 to obtain an estimate of the mean caffeine content in a cup of coffee correct to witin \($b\) mg with $sconf[0]
   49 confidence.  How many cups of coffee would have to be included in your sample? $PAR
   50 \(n = \) \{ans_rule(10)\}
   51 END_TEXT
   52 ANS(num_cmp($n, tol=>3));
   53 
   54 ENDDOCUMENT();       # This should be the last executable line in the problem.

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9