[rochester] / trunk / rochester_problib / setStatistics4HypothesisTesting / ur_stt_4_15.pg Repository:
ViewVC logotype

Annotation of /trunk/rochester_problib/setStatistics4HypothesisTesting/ur_stt_4_15.pg

Parent Directory Parent Directory | Revision Log Revision Log


Revision 30 - (view) (download)

1 : amanda 29 ##DESCRIPTION
2 :     ##KEYWORDS('small sample','hypothesis testing','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 :     $n = random(3,20,1);
22 :     $mean = random(80,95,1);
23 :     $s = random(5,15,1);
24 :     $eff = random(90,99,1);
25 :     $e = $eff/100;
26 :     $alpha = random(.01,.05,.04);
27 :     $m = $mean/100;
28 :     $s1 = $s/100;
29 :    
30 :     $df = $n-1;
31 :     $t = tdistr($df, $alpha);
32 :     $test = ($m-$e)/($s1/sqrt $n);
33 :    
34 :     $mc = new_multiple_choice();
35 :    
36 :     @ans = ("We can reject the null hypothesis that \( \mu = $e\) and accept that \( \mu
37 :     > $e\), that is, the bug repellent is effective. ",
38 :     "There is not sufficient evidence to reject the null hypothesis that \( \mu =
39 :     $e\). ");
40 :    
41 :     if ($test > $t ) {$tag = 0;} else {$tag = 1;}
42 :    
43 :     $mc -> qa('The final conclustion is', $ans[$tag]);
44 :    
45 :     $mc -> extra($ans[1-$tag]);
46 :    
47 :     BEGIN_TEXT
48 :     The effectiveness of a new bug repellent is tested on \($n\) subjects for a 10
49 :     hour period. Based on the number and location of the bug bites, the percentage
50 :     of surface area exposed protected from bites was calculated for each of the
51 :     subjects. The results were as follows: $PAR
52 :     \( \overline{x} = $mean \) $PERCENT, \( \ s = $s \)$PERCENT $PAR
53 :     The new repellent is considered effective if it provides a percent
54 :     repellency of at least \($eff\). Using \(\alpha = $alpha \), construct a
55 :     hypothesis test with null hypothesis \(\mu = $e\) and alternative hypothesis \(\mu>$e\) to determine
56 :     whether the mean repellency of the new bug relellent is greater than \($eff\) by computing the following:
57 :     $PAR
58 : amanda 30 (a) \( \ \) the degree of freedom \( \ \) \{ans_rule(10)\} $PAR
59 :     (b) \( \ \) the critical \(t\) value \( \ \) \{ans_rule(10)\} $PAR
60 : amanda 29 (c) \( \ \) the test statistics \( \ \) \{ans_rule(10)\} $PAR
61 :     $PAR
62 :    
63 :     \{ $mc->print_q() \}
64 :     $PAR
65 :     \{ $mc->print_a() \}
66 :    
67 :     END_TEXT
68 :     ANS(num_cmp($df));
69 :     ANS(num_cmp($t, tol=>.002));
70 :     ANS(num_cmp($test));
71 :     ANS(radio_cmp($mc->correct_ans));
72 :    
73 :     ENDDOCUMENT(); # This should be the last executable line in the problem.

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9