[npl] / trunk / NationalProblemLibrary / UVA-Stat / setStat212-Homework11 / stat212-HW11-08.pg Repository:
ViewVC logotype

View of /trunk/NationalProblemLibrary/UVA-Stat/setStat212-Homework11/stat212-HW11-08.pg

Parent Directory Parent Directory | Revision Log Revision Log


Revision 454 - (download) (annotate)
Thu Jul 5 18:11:13 2007 UTC (5 years, 10 months ago) by jjholt
File size: 1844 byte(s)
Consolidated tags.

    1 ##DESCRIPTION
    2 ##KEYWORDS('statistics','Inference about a population')
    3 ##
    4 ## CMMK tagged this problem
    5 
    6 ## DBchapter('Inference About a Population')
    7 ## DBsection()
    8 ## Date('07/12/2005')
    9 ## Author('Cristina Murray-Krezan')
   10 ## Institution('UVa')
   11 ## TitleText1('Statistics for Management and Economics')
   12 ## EditionText1('6')
   13 ## AuthorText1('Keller, Warrack')
   14 ## Section1()
   15 ## Problem1()
   16 
   17 
   18 ##ENDDESCRIPTION
   19 
   20 DOCUMENT();        # This should be the first executable line in the problem.
   21 
   22 loadMacros(
   23 "PG.pl",
   24 "PGbasicmacros.pl",
   25 "PGchoicemacros.pl",
   26 "PGanswermacros.pl",
   27 "PGgraphmacros.pl",
   28 "PGnumericalmacros.pl",
   29 "PGstatisticsmacros.pl",
   30 "extraAnswerEvaluators.pl"
   31 );
   32 
   33 TEXT(beginproblem());
   34 $showPartialCorrectAnswers = 1;
   35 # install_problem_grader(~~&std_problem_grader);
   36 
   37 $n1 = random(35,51,2);
   38 $n2 = random(36,52,2);
   39 $xbar1 = random(50,60,0.1);
   40 $xbar2 = random(70,80,0.1);
   41 $s1 = random(5,6,0.1);
   42 $s2 = random(10,11,0.1);
   43 
   44 $df = $n1 + $n2 - 2;
   45 $sp2 = (($n1-1)*$s1**2 + ($n2-1)*$s2**2)/$df;
   46 
   47 $siglev = random(92,98,.5);
   48 $alpha = 0.01*(100-$siglev);
   49 
   50 $tcrit = tdistr($df,$alpha/2);
   51 $ucl = ($xbar1 - $xbar2) + $tcrit*sqrt($sp2*(1/$n1 + 1/$n2));
   52 $lcl = ($xbar1 - $xbar2) - $tcrit*sqrt($sp2*(1/$n1 + 1/$n2));
   53 
   54 
   55 BEGIN_TEXT
   56 $PAR
   57 Two random samples are selected from two independent populations.
   58 A summary of the samples sizes, sample means, and sample standard
   59 deviations is given below:
   60 $PAR
   61 \[
   62 \begin{array}{lll}
   63 n_1 = $n1, & \bar{x}_1 = $xbar1, & s_1 = $s1 \\
   64 n_2 = $n2, & \bar{x}_2 = $xbar2, & s_2 = $s2 \\
   65 \end{array}
   66 \]
   67 $PAR
   68 Find a $siglev$PERCENT confidence interval for the difference
   69 \(\mu_1 - \mu_2\) of the means, assuming equal population
   70 variances.
   71 $PAR
   72 
   73 Confidence Interval = \{ ans_rule(25) \}
   74 $PAR
   75 
   76 END_TEXT
   77 
   78 ANS(interval_cmp("($lcl,$ucl)", sloppy=>'yes'));
   79 
   80 ENDDOCUMENT();       # This should be the last executable line in the problem.

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9