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

View of /trunk/rochester_problib/setStatistics3Estimates/ur_stt_3_5.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: 1780 byte(s)
new problems

    1 ##DESCRIPTION
    2 ##KEYWORDS('large sample', 'confidence interval', 'statistics')
    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 "PGauxiliaryFunctions.pl"
   16 );
   17 
   18 TEXT(beginproblem());
   19 $showPartialCorrectAnswers = 1;
   20 
   21 for ($i=0; $i<4; $i++) {
   22   $n[$i] = random(70,120,5);
   23   $x[$i] = random(1,105,.1);
   24   $s[$i] = random(2,5, .01);
   25 }
   26 
   27 @conf = (90,95,99);
   28 @a = (1.645,1.96,2.575);
   29 @slice = NchooseK(3,1);
   30 @sconf = @conf[@slice];
   31 @sa = @a[@slice];
   32 
   33 for ($i=0; $i<4; $i++) {
   34   $ans1[$i] = $x[$i] - $sa[0]*($s[$i]/sqrt $n[$i]);
   35   $ans2[$i] = $x[$i] + $sa[0]*($s[$i]/sqrt $n[$i]);
   36 }
   37 
   38 BEGIN_TEXT
   39 A random sample of \(n\) measurements was selected from a population with unknown mean \(\mu\) and
   40 standard deviation \(\sigma\).  Calculate a \($sconf[0] \\%\) confidence interval for \(\mu\) for each of the
   41 following situations: $PAR
   42 (a) \( \ \) \(n = $n[0], \ \overline{x} = $x[0], \ s = $s[0] \) $BR
   43 \{ans_rule(20)\} \( \leq \mu \leq \) \{ans_rule(20)\} $PAR
   44 (b) \( \ \) \(n = $n[1], \ \overline{x} = $x[1], \ s = $s[1] \) $BR
   45 \{ans_rule(20)\} \( \leq \mu \leq \) \{ans_rule(20)\} $PAR
   46 (c) \( \ \) \(n = $n[2], \ \overline{x} = $x[2], \ s = $s[2] \) $BR
   47 \{ans_rule(20)\} \( \leq \mu \leq \) \{ans_rule(20)\} $PAR
   48 (d) \( \ \) \(n = $n[3], \ \overline{x} = $x[3], \ s = $s[3] \) $BR
   49 \{ans_rule(20)\} \( \leq \mu \leq \) \{ans_rule(20)\}
   50 END_TEXT
   51 ANS(num_cmp($ans1[0]));
   52 ANS(num_cmp($ans2[0]));
   53 ANS(num_cmp($ans1[1]));
   54 ANS(num_cmp($ans2[1]));
   55 ANS(num_cmp($ans1[2]));
   56 ANS(num_cmp($ans2[2]));
   57 ANS(num_cmp($ans1[3]));
   58 ANS(num_cmp($ans2[3]));
   59 
   60 ENDDOCUMENT();       # This should be the last executable line in the problem.

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9