[npl] / trunk / NationalProblemLibrary / UVA-Stat / setStat212-Homework02 / stat212-HW02-12.pg Repository:
ViewVC logotype

View of /trunk/NationalProblemLibrary/UVA-Stat/setStat212-Homework02/stat212-HW02-12.pg

Parent Directory Parent Directory | Revision Log Revision Log


Revision 450 - (download) (annotate)
Tue Jul 3 21:31:53 2007 UTC (5 years, 10 months ago) by jjholt
File size: 1959 byte(s)
Adding statistics problems.  Note: Tags to be fixed soon.

    1 ## DESCRIPTION
    2 ##  Statistics: Numerical descriptive techniques
    3 ## ENDDESCRIPTION
    4 
    5 ## KEYWORDS('statistics', 'numerical', 'descriptive statistics')
    6 ## JJH tagged this problem.
    7 
    8 ## DBchapter('Numerical Descriptive Techniques')
    9 ## DBsection()
   10 ## Date('6/1/2005')
   11 ## Author('Jeff Holt')
   12 ## Institution('UVA')
   13 ## TitleText1('Statistics for Management and Economics')
   14 ## EditionText1('6')
   15 ## AuthorText1('Keller, Warrack')
   16 ## Section1()
   17 ## Problem1()
   18 
   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 "PGnumericalmacros.pl",
   28 "PGstatisticsmacros.pl",
   29 "PGauxiliaryFunctions.pl"
   30 );
   31 
   32 TEXT(beginproblem());
   33 $showPartialCorrectAnswers = 1;  # Change to 0 to shut off separate answer display.
   34 ## install_problem_grader(~~&std_problem_grader); # Uncomment to turn off partial credit.
   35 
   36 $data[2] = random(80,85,1);
   37 $data[3] = random(90,95,1);
   38 $data[1] = $data[2] - random(0,5,1);
   39 $data[0] = $data[2] - random(5,10,1);
   40 $data[4] = $data[3] + random(0,5,1);
   41 $data[5] = $data[3] + random(5,10,1);
   42 
   43 $mean = ($data[0]+$data[1]+$data[2]+$data[3]+$data[4]+$data[5])/6;
   44 $range = $data[5] - $data[0];
   45 $variance = (($data[0]-$mean)**2 + ($data[1]-$mean)**2 + ($data[2]-$mean)**2 +
   46             ($data[3]-$mean)**2 + ($data[4]-$mean)**2 + ($data[5]-$mean)**2)/5;
   47 $stdev = $variance**(0.5);
   48 
   49 @slice = NchooseK(6,6);
   50 @shuffleddata = @data[@slice];
   51 
   52 
   53 BEGIN_TEXT
   54 $PAR A sample of weights (in pounds) for six 12-year-olds is given below:
   55 $PAR
   56 \[
   57 $shuffleddata[0] \quad
   58 $shuffleddata[1] \quad
   59 $shuffleddata[2] \quad
   60 $shuffleddata[3] \quad
   61 $shuffleddata[4] \quad
   62 $shuffleddata[5]
   63 \]
   64 $PAR
   65 Find the range and standard deviation for this sample.
   66 $PAR
   67 Sample Range = \{ans_rule(15)\}
   68 $PAR
   69 Sample Standard Deviation = \{ans_rule(15)\}
   70 $BR
   71 
   72 
   73 END_TEXT
   74 
   75 &ANS(num_cmp($range) );
   76 &ANS(num_cmp($stdev) );
   77 
   78 ENDDOCUMENT();       # This should be the last executable line in the problem.

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9