[npl] / trunk / NationalProblemLibrary / NAU / setStatistics / sampling1.pg Repository: Repository Listing bbplugincoursesdistsnplrochestersystemwww

# View of /trunk/NationalProblemLibrary/NAU/setStatistics/sampling1.pg

Thu Jul 19 01:05:05 2012 UTC (11 months ago) by nandor.sieben
File size: 4016 byte(s)
`fixes`

```    1 ## DESCRIPTION
2 ##  Statistics
3 ## ENDDESCRIPTION
4
5 ## KEYWORDS('Statistics','Sampling')
6 ## Tagged by dgt5v
7
8 ## DBsubject('Statistics')
9 ## DBchapter('Experiment Design')
10 ## DBsection('Sampling')
11 ## Date('Unknown altered 7/2012')
12 ## Author('Unknown  altered by C. Tyler Diggans')
13 ## Institution('ASU  altered at NAU')
14
15 ####################################################################################
16 ## Original Problem('Library/ASU-topics/setStat/dueck8.pg')
17
18 ## Changed the numbers used to hundreds so that the samples are representative
19 ## and added an example where the sample size is not large enough to be
20 ## representative.
21 ###################################################################################
22 #
23 # First comes some stuff that appears at the beginning of every problem
24 #
25
26 DOCUMENT();        # This should be the first executable line in the problem.
27
29 "PG.pl",
30 "PGbasicmacros.pl",
31 "PGchoicemacros.pl",
33 "PGauxiliaryFunctions.pl",
34 "PGasu.pl"
35 );
36
37 TEXT(beginproblem());
38
40
41
42 @event = ("A sample of 300 residents from Seattle is taken to estimate the median income of all Seattle residents.",
43     "A sample of 300 dentists from Seattle is taken to estimate the median income of all Seattle residents.");
44 \$pick = random(0,1);
45 @ans = ("REPRESENTATIVE?", "NON-REPRESENTATIVE?");
46
47 \$mc = new_multiple_choice();
48
49 \$mc->qa("Is this study", \$ans[\$pick]);
50 \$mc->extra(\$ans[1-\$pick]);
51 \$mc->makeLast(\$ans[1]);
52
53 BEGIN_TEXT
54
55 \$event[\$pick]
56
57 \$BR
58 \{ \$mc->print_q \}
59 \{ \$mc->print_a \}
60
61 END_TEXT
63
64
65 @event = ("A sample of 200 professional football players is taken to estimate the mean weight of all adult males.",
66     "A simple random sample of 2000 men over age 18 is taken to estimate the mean weight of all adult males.");
67 \$pick = random(0,1);
68 @ans = ("NON-REPRESENTATIVE?", "REPRESENTATIVE?");
69
70 \$mc = new_multiple_choice();
71
72 \$mc->qa("Is this study", \$ans[\$pick]);
73 \$mc->extra(\$ans[1-\$pick]);
74 \$mc->makeLast(\$ans[0]);
75
76 BEGIN_TEXT
77
78 \$event[\$pick]
79
80 \$BR
81 \{ \$mc->print_q \}
82 \{ \$mc->print_a \}
83
84 END_TEXT
86
88 @event = ("A simple random sample of 10 men over the age 18 is taken to estimate the mean height of all adult males.",
89     "A simple random sample of 2,500 men over the age 18 is taken to estimate the mean height of all adult males.");
90 \$pick = random(0,1);
91 @ans = ("NON-REPRESENTATIVE?", "REPRESENTATIVE?");
92
93 \$mc = new_multiple_choice();
94
95 \$mc->qa("Is this study", \$ans[\$pick]);
96 \$mc->extra(\$ans[1-\$pick]);
97 \$mc->makeLast(\$ans[0]);
98
99 BEGIN_TEXT
100
101 \$event[\$pick]
102
103 \$BR
104 \{ \$mc->print_q \}
105 \{ \$mc->print_a \}
106
107 END_TEXT
109 ## End added by NAU
110
111 @event = ("A telephone survey of 1000 registered voters is conducted during the day in order to determine the chances of a certain candidate winning an election.",
112     "A simple random sample of 1000 voters is taken in order to determine the chances of a certain candidate winning an election.");
113 \$pick = random(0,1);
114 @ans = ("NON-REPRESENTATIVE?", "REPRESENTATIVE?");
115
116 \$mc = new_multiple_choice();
117
118 \$mc->qa("Is this study", \$ans[\$pick]);
119 \$mc->extra(\$ans[1-\$pick]);
120 \$mc->makeLast(\$ans[0]);
121
122 BEGIN_TEXT
123
124 \$event[\$pick]
125
126 \$BR
127 \{ \$mc->print_q \}
128 \{ \$mc->print_a \}
129
130 END_TEXT
132
133
134 @event = ("Using a sample of 400 patients from a local hospital, researchers measured cholesterol level in an attempt to estimate the mean cholesterol level of U.S. citizens.",
135     "A simple random sample of 400 U.S. citizens is taken in order to estimate the mean cholesterol level of U.S. citizens.");
136 \$pick = random(0,1);
137 @ans = ("NON-REPRESENTATIVE?", "REPRESENTATIVE?");
138
139 \$mc = new_multiple_choice();
140
141 \$mc->qa("Is this study", \$ans[\$pick]);
142 \$mc->extra(\$ans[1-\$pick]);
143 \$mc->makeLast(\$ans[0]);
144
145 BEGIN_TEXT
146
147 \$event[\$pick]
148
149 \$BR
150 \{ \$mc->print_q \}
151 \{ \$mc->print_a \}
152
153 END_TEXT