[npl] / trunk / NationalProblemLibrary / UVA-Stat / setStat212-Homework01 / stat212-HW01-17.pg Repository: Repository Listing bbplugincoursesdistsnplrochestersystemwww

# View of /trunk/NationalProblemLibrary/UVA-Stat/setStat212-Homework01/stat212-HW01-17.pg

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


    1 ## DESCRIPTION
2 ##  Statistics: Descriptive statistics
3 ## ENDDESCRIPTION
4
5 ## KEYWORDS('statistics', 'descriptive statistics')
6 ## JJH tagged this problem.
7
8 ## DBchapter('Graphical Descriptive Techniques')
9 ## DBsection()
10 ## Date('5/25/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
23 "PG.pl",
24 "PGbasicmacros.pl",
25 "PGchoicemacros.pl",
27 "PGnumericalmacros.pl",
28 "PGstatisticsmacros.pl",
29 "PGauxiliaryFunctions.pl"
30 );
31
32 TEXT(beginproblem());
33 $showPartialCorrectAnswers = 0; 34 install_problem_grader(~~&std_problem_grader); 35 36$b1 = random(1,4,1);
37 $b = 10*$b1;
38 $b2 =$b1 + 2;
39
40 $c[0] = random(0,2,1); 41$data[0] = $b +$c[0];
42 $c[1] =$c[0];
43 $data[1] =$data[0];
44 $t = random(1,3,1); 45$data[2] = $data[1] +$t;
46 $c[2] =$t + $c[1]; 47$t = random(1,3,1);
48 $data[3] =$data[2] + $t; 49$c[3] = $t +$c[2];
50 $ans[1] = "$c[0]"."$c[1]"."$c[2]"."$c[3]"; 51 52$c[4] = 0;
53 $data[4] =$b + 10;
54 $c[5] = random(2,7,1); 55$data[5] = $data[4] +$c[5];
56 $c[6] =$c[5];
57 $data[6] =$data[5];
58 $c[7] =$c[6];
59 $data[7] =$data[6];
60 $t = random(1,2,1); 61$data[8] = $data[7] +$t;
62 $c[8] =$t + $c[7]; 63$ans[2] = "$c[4]"."$c[5]"."$c[6]"."$c[7]"."$c[8]"; 64 65$c[9] = random(3,6,1);
66 $data[9] =$b + 20 + $c[9]; 67$t = random(0,2,1);
68 $data[10] =$data[9] + $t; 69$c[10] = $t +$c[9];
70 $c[11] = 9; 71$data[11] = $b + 20 +$c[11];
72 $c[12] =$c[11];
73 $data[12] =$data[11];
74 $ans[3] = "$c[9]"."$c[10]"."$c[11]"."$c[12]"; 75 76$c[13] = random(0,4,1);
77 $data[13] =$b + 30 + $c[13]; 78$c[14] = random(8,9,1);
79 $data[14] =$b + 30 + $c[14]; 80$ans[4] = "$c[13]"."$c[14]";
81
82 $c[15] = random(0,3,1); 83$data[15] = $b + 40 +$c[15];
84 $t = random(0,3,1); 85$data[16] = $data[15] +$t;
86 $c[16] =$t + $c[15]; 87$t = random(0,3,1);
88 $data[17] =$data[16] + $t; 89$c[17] = $t +$c[16];
90 $ans[5] = "$c[15]"."$c[16]"."$c[17]";
91
92 @slice = NchooseK(18,18);
93 @a = @data[@slice];
94
95 BEGIN_TEXT
96 $PAR Consider the following data set: 97$PAR
98 $99 \begin{array}{ccccccccc} 100 a[0] & a[1] & a[2] & a[3] & a[4] & a[5] & a[6] & a[7] & a[8]\\ 101 a[9] & a[10] & a[11] & a[12] & a[13] & a[14] & a[15] & a[16] & a[17] 102 \end{array} 103$
104 $BR 105 Below is a partially completed stem-and-leaf diagram for this data set: 106 107$PAR
108 $BCENTER 109 \{begintable(2)\} 110 \{row($b1, ans_rule(20))\}
111 \{row(ans_rule(3), ans_rule(20))\}
112 \{row($b2, ans_rule(20))\} 113 \{row(ans_rule(3),$ans[4])\}
114 \{row(ans_rule(3), ans_rule(20))\}
115 \{endtable()\}
116 $ECENTER 117$PAR
118
119 Determine the correct values for the missing entries, and fill them in.
120 If no value is needed for a given entry, then enter X.
121
122
123 $PAR 124 125 END_TEXT 126 127 ANS(str_cmp($ans[1]));
128 ANS(num_cmp($b1 + 1)); 129 ANS(str_cmp($ans[2]));
130 ANS(str_cmp($ans[3])); 131 ANS(num_cmp($b2 + 1));
132 ANS(num_cmp($b2 + 2)); 133 ANS(str_cmp($ans[5]));
134
135 ENDDOCUMENT();       # This should be the last executable line in the problem.