summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/randexam/randexam-a-answer.tex
blob: bd1cbc9f702d64a4b3f5cd60e222752103058aea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
% -*- coding: utf-8 -*-
% !TEX program = xelatex
\documentclass[12pt,math=all]{randexam}

%\boolfalse{exam@answer} % hide answers

\SetExamOption{
  seed = 19061116, % random seed
}

\begin{document}

\examtitle{name=Math 1906 Final Exam,date=\today,version=A} % make exam title

\gradetable[total=4]

\exampart{Fill in the blanks.}{6 questions; 3 points for each; 18 points in total.}

% make answer table: six in total, three for each row, strut height 3em
\answertable[total=6,column=3,strut=3em]

\begin{question}
The first question $k>0$, text $f(x)=\ln x-\frac{x}{\e}+k$ text $(0,+\infty)$
text text text text text text text text text text text text text text text text
text text text text text text text text text text text text text \fillout{$2$}.
\end{question}

\bigskip

\begin{question}
The second question $\va=(2,1,2)$, $\vb=(4,-1,10)$, $\vc=\vb-\lambda\va$,
text text text $\va\bot\vc$, text text text text text text text text text
text text text text text $\lambda=$ \fillout{$3$}.
\end{question}

\bigskip

\begin{question}
The third question $\left|\begin{array}{cc}
  1  & 2\\
  -3 & x
\end{array}\right|=0$, text text text text text text text text
text text text text text text text text text $x=$ \fillout{$-6$}.
\end{question}

\bigskip

\begin{question}
The fourth question $\alpha_1=(1,1,0), \alpha_2=(0,1,1), \alpha_3=(1,0,1)$,
text $\beta=(4, 5, 3)$ text $\alpha_1, \alpha_2, \alpha_3$ text text text text 
text text text text text text text text text text text text text text text text
text text text text text text $\beta=$ \fillout{$3\alpha_1+2\alpha_2+\alpha_3$}.
\end{question}

\bigskip

\begin{question}%[points=3]
The fifth question $\xi$ text text text $E\xi=3, D\xi=2$, text text text text text
text text text text text text text text text text $E\xi^2=$ \fillout{$11$}.
\end{question}

\bigskip

\begin{question}
The sixth question $\xi$ text text text text $\eta$ text text text text $\xi\sim N(1,4),
\eta\sim N(2,5)$, text text text text text text text text text text text text text text
text text text text text text text text text text $\xi-2\eta\sim$ \fillout{$N(-3,24)$}.
\end{question}

\bigskip

\newpage

\exampart{Select one answer from four choices.}{6 questions; 3 points for each; 18 points in total.}

% make answer table: six in total, six for each row, default strut height
\answertable[total=6,column=6]

\begin{question}
The first question text, text text text text text text text text text text
text text text text text text text text text text text text text \pickout{C}
\begin{abcd}
\item first $\int f'(x)\dx=f(x)$
\item second $\int \d f(x)=f(x)$
\item third $\frac{\d}{\dx}\big(\int f(x)\dx\big)=f(x)$
\item fourth $\d\big(\int f(x)\dx\big)=f(x)$
\end{abcd}
\end{question}

\bigskip

\begin{question}
The second question $F(x)$ text $f(x)$ text, text \pickout{A}
\begin{abcd}
\item first choice $F(x)$ text $\Leftrightarrow$ $f(x)$ text
\item second choice $F(x)$ text text $\Leftrightarrow$ $f(x)$ text
\item third choice $F(x)$ text $\Leftrightarrow$ $f(x)$ text text
\item fourth choice $F(x)$ text text $\Leftrightarrow$ $f(x)$ text text
\end{abcd}
\end{question}

\bigskip

\begin{question}
The third question $A = \left(\begin{array}{ccc}
  1 & 1 & 0\\
  1 & x & 0\\
  0 & 0 & 1
\end{array}\right)$ text text $\lambda_1 = 1$ text $\lambda_2
= 2$, text $x=$ \pickout{B}
\begin{abcd}
\item $2$
\item $1$
\item $0$
\item $-1$
\end{abcd}
\end{question}

\bigskip

\begin{question}
The fourth question $f = 4 x_1^2 - 2 x_1 x_2 + 6 x_2^2$ text text text text text text
text text text text text text text text text text text text text text text \pickout{C}
\begin{abcd}
\item $\left(\begin{array}{cc}
  4 & - 2\\
  - 2 & 6
\end{array}\right)$
\item $\left(\begin{array}{cc}
  2 & - 2\\
  - 2 & 3
\end{array}\right)$
\item $\left(\begin{array}{cc}
  4 & - 1\\
  - 1 & 6
\end{array}\right)$
\item $\left(\begin{array}{cc}
  2 & - 1\\
  - 1 & 3
\end{array}\right)$
\end{abcd}
\end{question}

\bigskip

\begin{question}
The fifth question \underline{wrong} text \pickout{B}
\begin{abcd}
\item first choice text text text text text text text text text
\item second choice text text text text text text text text text
\item third choice text text text text text text text text text
\item fourth choice text text text text text text text text text
\end{abcd}
\end{question}

\bigskip

\begin{question}
The sixth question $X$ text $(X_1,\cdots,X_n)$ text \underline{wrong} text text
text text text text text text text text text text text text text text \pickout{D}
\begin{abcd}
\item text text text
\item text $n$ text
\item $X_1, \cdots, X_n$ text
\item $X_1 = X_2 =\cdots = X_n$
\end{abcd}
\end{question}

\bigskip

\newpage

\exampart{Work out math questions.}{6 questions; 8 points for each; 48 points in total.}

\begin{question}
The first question $\int\e^{2x}\,(\tan x+1)^2\dx$.
\end{question}

\smallskip

\begin{solution}
$I$ \? $=\int\e^{2x}\,\sec^2 x\dx+2\int\e^{2x}\,\tan x\dx$ \points{2}
\+ $=\int\e^{2x}\,\d(\tan x)+ 2\int\e^{2x}\,\tan x\dx$ \points{4}
\+ $=\e^{2x}\,\tan x - 2\int\e^{2x}\,\tan x\dx+ 2\int\e^{2x}\,\tan x\dx$ \points{6}
\+ $=\e^{2x}\,\tan x + C$ \points{8}
\end{solution}

\vfill

\begin{question}
The second question $A(1,2,-1), B(2,3,0),C(3,3,2)$ text $\triangle ABC$ text text text text text text.
\end{question}

\smallskip

\begin{solution}
Text $\overrightarrow{AB}=(1,1,1),\overrightarrow{AC}=(2,1,3)$, \points{2}
text $\overrightarrow{AB}\times \overrightarrow{AC}=\begin{vmatrix}
\vec{i}&\vec{j} &\vec{k}\\
1&1&1\\
2&1&3\\
\end{vmatrix}=(2,-1,-1)$, \points{4}
text $\triangle ABC$ text $S_{\triangle ABC}=\frac{1}{2}\big|\overrightarrow{AB}\times
\overrightarrow{AC}\big|=\frac{1}{2}\sqrt{6}.$ \points{6}
Text text $2(x-2)-(y-3)-z=0$, text $2x-y-z-1=0$. \points{8}
\end{solution}

\vfill

\newpage

\begin{question}
The third question $A = \left|\begin{array}{cccc}
  0 & 1 & 2 & 3\\
  1 & 2 & 3 & 0\\
  2 & 3 & 0 & 1\\
  3 & 0 & 1 & 2
\end{array}\right|$ text.
\end{question}

\smallskip

\begin{solution}
$A \? = \left|\begin{array}{cccc}
    0 & 1 & 2 & 3\\
    1 & 2 & 3 & 0\\
    2 & 3 & 0 & 1\\
    3 & 0 & 1 & 2
  \end{array}\right| = \left|\begin{array}{cccc}
    0 & 1 & 2 & 3\\
    1 & 2 & 3 & 0\\
    0 & - 1 & - 6 & 1\\
    0 & - 6 & - 8 & 2
  \end{array}\right| = 1 \cdot (- 1)^{2 + 1} \left|\begin{array}{ccc}
    1 & 2 & 3\\
    - 1 & - 6 & 1\\
    - 6 & - 8 & 2
  \end{array}\right|$ \points{4}
\+ $= -\left|\begin{array}{ccc}
    1 & 2 & 3\\
    0 & - 4 & 4\\
    0 & 4 & 20
  \end{array}\right| = - \left|\begin{array}{cc}
    - 4 & 4\\
    4 & 20
  \end{array}\right| = -(-4\cdot20-4\cdot4) = 96$ \points{8}
\end{solution}

\vfill

\begin{question}
The fourth question, tex text $f = x_1^2 + 2 x_1 x_2 - 6 x_1 x_3 + 2 x_2^2 - 12
x_2 x_3 + 9 x^2_3$ text text $f = d_1 y^2_1 + d_2 y^2_2 + d_3 y^2_3$.
\end{question}

\smallskip

\begin{solution}
$f \? = x_1^2 + 2 x_1 x_2 - 6 x_1 x_3 + 2 x_2^2 - 12 x_2 x_3 + 9 x^2_3$ \par
  \+ $= x_1^2 + 2 x_1 (x_2 - 3 x_3) + (x_2 - 3 x_3)^2 + x_2^2 - 6 x_2 x_3 $ \par
  \+ $= (x_1 + x_2 - 3 x_3)^2 + x_2^2 - 6 x_2 x_3$ \points{3}
  \+ $= (x_1 + x_2 - 3 x_3)^2 + x_2^2 - 2 x_2 \cdot 3 x_3 + (3 x_3)^2 - 9x_3^2$ \par
  \+ $= (x_1 + x_2 - 3 x_3)^2 + (x_2 - 3 x_3)^2 - 9 x_3^2$ \points{6}
Text $y_1 = x_1 + x_2 - 3 x_3, y_2 = x_2 - 3 x_3, y_3 = x_3$, \newline
text $f = y_1^2 + y_2^2 - 9y_3^2$ text.\points{8}
\end{solution}

\vfill

\newpage

\begin{question}
The fifth question text text text $0.2$ text text, text text $100$ text text.\par
(1) text text text text text text $\xi$ text $10$ text $30$ text.\par
(2) text text text text text $\xi$ text $10$ text $30$ text.
\end{question}

\smallskip

\begin{solution}
$E\xi = n p = 100 \cdot 0.2 = 20, D\xi = n p q = 100 \cdot 0.2 \cdot 0.8 = 16$. \points{2}
(1) $P (10 < \xi < 30) = P (|\xi - E\xi| < 10) \ge 1 - \frac{D\xi}{10^2}
     = 1 - \frac{16}{100} = 0.84$. \points{4}
(2) $P (10 < \xi < 30) \? \approx \Phi_0\left(\frac{30 - 20}{\sqrt{16}}\right)
         - \Phi_0\left(\frac{10 - 20}{\sqrt{16}}\right)$ \points{6}
      \+ $= 2 \Phi_0(2.5) - 1 = 2 \cdot 0.9938 - 1 =0.9876$ \points{8}
\end{solution}

\vfill

\begin{question}
The sixth question $N(\mu,\sigma^2)$ text text $16$ text, text text text $3160$, text text $100$.
Text text $H_0:\mu=3140$ text text ($\alpha = 0.01$).
\end{question}

\smallskip

\begin{solution}
(1) Text text $H_0 : \mu = 3140$. \points{2}
(2) Text text text $T = \frac{\widebar{X}-\mu}{S / \sqrt{n}} \sim t(n-1)$. \points{3}
(3) Text text $t_{\alpha} = t_{\alpha} (n - 1) = t_{0.01} (15) =2.947$. \points{5}
(4) Text text text $t = \frac{\widebar{x} - \mu_0}{s/\sqrt{n}} =\frac{3160-3140}{100/4} = 0.8$.\points{7}
(5) Text $| t | < t_{\alpha}$, text text $H_0$, text text text. \points{8}
\end{solution}

\vfill

\newpage

\exampart{Work out math proofs.}{2 questions; 16 points in total.}

\SetExamTranslation{solution-Solution=Proof} % rename "Solution" as "Proof"

\begin{question}[points=9]
The first question $\{x_n\}$ text $x_1=\sqrt2$, $x_{n+1}=\sqrt{2+x_n}$.
Text text text, text text text.
\end{question}

\smallskip

\begin{solution}
(1) Text, text $x_1<2$, text $x_k<2$ text
$$x_{k+1}=\sqrt{2+x_k}<\sqrt{2+2}=2,$$
Text text text text text $n$ text $x_n<2$, text text text.
Text text
$$\frac{x_{n+1}}{x_n}=\sqrt{\frac{2}{x_n^2}+\frac{1}{x_n}}>\sqrt{\frac{2}{2^2}+\frac{1}{2}}=1,$$
Text text text text text. Text text text text text, Text text text text.\points{4}
(2) Text text text text $A$, text text text text text text
$$A=\sqrt{2+A}.$$
Text text $A=2$, text text $\{x_n\}$ text text text $2$.\points{8}
\end{solution}

\vfill

\begin{question}[points=7]
The second question $A$ text $B$ text, text $A$ text $\widebar{B}$ text.
\end{question}

\smallskip

\begin{solution}
\? $P (A \cdot \widebar{B}) = P (A - B) = P (A - A B)$ \points{2}
\< $= P (A) - P (A B) = P (A) - P (A) P (B)$ \points{4}
\< $= P (A) (1 - P (B)) = P (A) P (\widebar{B})$ \points{6}
Text text text $A$ text text text $\widebar{B}$ text text text.\points{8}
\end{solution}

\vfill

\examdata{Some data may be used in the exam} % appendix data

\begin{tabularx}{\linewidth}{*{4}{>{$}X<{$}}}
\hline
\Phi_0(0.5)=0.6915 & \Phi_0(1)=0.8413 & \Phi_0(2)=0.9773 & \Phi_0(2.5)=0.9938 \\
t_{0.01}(8)=3.355 & t_{0.01}(9)=3.250 & t_{0.01}(15)=2.947 & t_{0.01}(16)=2.921 \\
\chi_{0.005}^2(8)=22.0 & \chi_{0.005}^2(9)=23.6 & \chi_{0.005}^2(15)=32.8 & \chi_{0.005}^2(16)=34.3 \\
\chi_{0.995}^2(8)=1.34 & \chi_{0.995}^2(9)=1.73 & \chi_{0.995}^2(15)=4.60 & \chi_{0.995}^2(16)=5.14 \\
\hline
\end{tabularx}

\end{document}