[npl] / trunk / NationalProblemLibrary / UVA-Stat / setStat212-Homework03 / stat212-HW03-06.pg Repository: Repository Listing bbplugincoursesdistsnplrochestersystemwww

# View of /trunk/NationalProblemLibrary/UVA-Stat/setStat212-Homework03/stat212-HW03-06.pg

Tue Jul 3 21:36:52 2007 UTC (5 years, 10 months ago) by jjholt
File size: 2410 byte(s)
Added stat problems.  Tags to be fixed soon.


    1 ## DESCRIPTION
2 ##  Statistics: Descriptive statistics
3 ## ENDDESCRIPTION
4
5 ## KEYWORDS('statistics', 'descriptive statistics')
6 ## NAW tagged this problem.
7
8 ## DBchapter('What is Statistics?')
9 ## DBsection()
10 ## Date('6/8/2005')
11 ## Author('Nolan A. Wages')
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$mc[1] = new_multiple_choice();
37 $mc[1]->qa('If P(A) = 0.20, P(B) = 0.30 and P(A and B) = 0.06, then A and B are: ', 38 'independent events' 39 ); 40$mc[1]->extra(
41     'dependent events',
42     'mutually exclusive events',
43     'complementary events'
44 );
45
46
47 $mc[2] = new_multiple_choice(); 48$mc[2]->qa('If A and B are mutually exclusive events with P(A) = 0.70, then P(B):',
49     'cannot be larger than 0.30'
50 );
51 $mc[2]->extra( 52 'can be any value between 0 and 1', 53 'can be any value between 0 and 0.70', 54 'cannot be smaller than 0.30' 55 ); 56 57 58$mc[3] = new_multiple_choice();
59 $mc[3]->qa('A useful graphical method of constructing the sample space for an experiment is:', 60 'a tree diagram' 61 ); 62$mc[3]->extra(
63     'a pie chart',
64     'a histogram',
65     'an ogive'
66 );
67
68
69
70 $mc[4] = new_multiple_choice(); 71$mc[4]->qa('Two events A and B are said to be independent if:',
72     '$$P(A \mbox{ and } B) = P(A)\cdot P(B)$$'
73 );
74
75 $mc[4]->extra( 76 '$$P(A \mbox{ and } B) = P(A) + P(B)$$', 77 '$$P(A|B) = P(B)$$', 78 '$$P(B|A) = P(A)$$' 79 ); 80 81 82$mc[5] = new_multiple_choice();
83 $mc[5]->qa('Two events A and B are said to be mutually exclusive if:', 84 '$$P(A \mbox{ and } B) = 0$$' 85 ); 86$mc[5]->extra(
87     '$$P(A|B) = 1$$',
88     '$$P(B|A) = 1$$',
89     '$$P(A \mbox{ and } B) = 1$$'
90 );
91
92
93
94 $a = random(1,5,1); 95$b = random(1,5,1);
96 while ($a ==$b) {
97     $b = random(1,5,1); 98 } 99 100 101 BEGIN_TEXT 102$PAR
103 \{ $mc[$a]->print_q() \}
104
105 \{ $mc[$a]->print_a() \}
106 $PAR 107 \{$mc[$b]->print_q() \} 108 109 \{$mc[$b]->print_a() \} 110$PAR
111
112 END_TEXT
113
114 ANS(radio_cmp($mc[$a]->correct_ans));
115 ANS(radio_cmp($mc[$b]->correct_ans));
116
117 ENDDOCUMENT();       # This should be the last executable line in the problem.