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

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

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

1 ## DESCRIPTION
2 ##  Statistics: Inference about Comparing Two Populations
3 ## ENDDESCRIPTION
4
5 ## KEYWORDS('statistics', 'Two Populations', 'Inference')
6 ## CMMK tagged this problem.
7
8 ## DBchapter('What is Statistics?')
9 ## DBsection()
10 ## Date('07/01/2005')
11 ## Author('Cristina Murray-Krezan')
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 );
28
29
30 $shoPartialCorrectAnswers = 0; 31 install_problem_grader(~~&std_problem_grader); 32 33 #True false questions are a special case of a "Select List" 34 #Make a new select list 35 36$tf = new_select_list();
37
38 #$tf now "contains" the select list object. 39 #Insert some questions and whether or not they are true. 40 41$tf->rf_print_q(~~&pop_up_list_print_q);
42
43 $tf-> ra_pop_up_list( [No_answer => "?", T=> "True", F => "False"] ); 44 45$tf -> qa ( # each entry has to end with a comma
46 "In testing the difference between two population means using two independent samples, the sampling distribution of the sample mean difference $$\bar{x}_1-\bar{x}_2$$ is normal if the sample sizes are both greater than 30.",
47 "F",
48
49 "A political analyst in Iowa surveys a random sample of registered Democrats and compares the results with those obtained from a random sample of registered Republicans.  This is an example of two independent samples.",
50 "T",
51
52 "In comparing two means when samples are dependent, the variable under consideration is $$\bar{x}_D$$, where the subscript D refers to the difference.",
53 "T",
54
55 "The best estimator of the difference between two population means $$\mu_1 - \mu_2$$ is the difference between two sample means $$\bar{x}_1-\bar{x}_2$$.",
56 "T",
57
58 "In testing for the equality of two population variances, when the populations are normally distributed, the 5% level of significance is used.  To determine the rejection region, it is necessary to refer to the $$F-$$table corresponding to an upper-tail area of 0.05.",
59 "F",
60
61 "When the necessary conditions are met, a two-tail test is conducted to test the difference between two population proportions.  The two sample proportions are $$\hat{p}_1=0.40$$ and $$\hat{p}_2=0.35$$ and the standard error of the sampling distribution of $$p_1-p_2$$ is 0.04.  The calculated value of the test statistic is 1.25.",
62 "T",
63
64 "Two samples of sizes 25 and 20 are independently drawn from two normal populations where the unknown population variances are assumed equal.  The number of degrees of freedom of the equal-variances $$t$$ test statistic is 44.",
65 "F",
66
67 "The number of degrees of freedom associated with the $$t$$ test, when the data are gathered from a matched pairs experiment with 10 pairs, is 9.",
68 "T",
69 );
70
71 #Choose four of the question/answer pairs at random.
72 $tf ->choose(4); 73 74 #Now print the text using$ml->print_q for the questions and $ml->print_a 75 #to print the answers. 76 77 BEGIN_TEXT 78$PAR
79
80 Select True or False from each pull-down menu, depending on whether the corresponding statement is true or false.
81 $BR 82 83 \{$tf->print_q\}
84
85 $PAR 86 87 END_TEXT 88 89 #Enter the correct answer to be checked against the answers of the students. 90 91 ANS( str_cmp($tf->ra_correct_ans ) ) ;
92
93 ENDDOCUMENT(); #This should be the last executable line in the problem.