Description
The Numeric question type supercedes Plain Number and Dimensioned Number, giving authors the capabilities of both types along with more sophisticated means to allow tolerances in grading a student's answer.
Answers to numeric-mode questions may or may not specify units. If the system has an answer with units, it will provide separate entry cells for numbers and units. If the system has an answer with no units specified, it displays a single entry cell.
Authors should specify units as an optional argument to
the \answer
macro. For instance, while Dimensioned Number mode
accepts
\answer{9.8 m/s^2}
as an answer, Numeric mode requires that this answer be given as
\answer[m/s^2]{9.8}.
This type should be used carefully, because the system will convert between compatible units. For instance, if the correct answer is given in meters, then the equivalent response given in terms of kilometers or feet or miles, etc., would be graded as correct. However, if a student uses an alternate unit, this will often result in an approximation because of the conversion factor (for example, expressing an answer in miles instead of kilometers would never end up being exact). Thus, it is almost imperative that the author allow some tolerance in grading these questions.
Notes
- As just described, units and numbers are
separate arguments to the
\answer
macro in numeric-mode questions. The number should be enclosed by braces, while the optional units should be enclosed by brackets. - Units are optional. If no units are
specified—that is, if there is no optional argument
to
\answer
—then the system presents the student with a single cell in which to enter his or her answer (without units). If\answer
does receive an optional argument, that argument is taken as the answer's units. In this case, the system displays two cells; the student is to enter the numerical part of the answer in the first cell, and the units in the second. - The units given must be on a list of
acceptable units, and must be spelled correctly. To create
a custom list of units, use the command
\TableOfUnits
in the LaTeX document's preamble---that is, somewhere before\begin{document}
(but necessarily after\usepackage{ed}
.) Use the\units
macro to access a custom list of units. - The
Numeric mode allows five distinct types of grading.
Descriptions are given below, followed by usage
instructions and examples.
- Exact value
- The student's answer must match the value given in
the
\answer
field. There is no error tolerance. - Exact significant digits
- The student's answer must agree with the value
given in the
\answer
field to a specified number of significant digits. - Significant digits with tolerance
- The student's answer must agree with the value
given in the
\answer
field to within a specified tolerance at a given number of significant digits. - Absolute tolerance
- The student's answer must agree with the value
given in the
\answer
field to within a specified tolerance. - Relative tolerance
- The student's answer must agree with the value
given in the
\answer
field to within a specified percent error.
\digits
,\err
, and\percenterr
.\digits
takes one argument, the number of significant digits to be considered in grading. If\err
is also set, the grading type is 'significant digits with tolerance'; otherwise, the grading type is 'exact significant digits'. For example, using\err{2}
and\digits{3}
, with\answer{2.5}
, allows any answer between 2.48 and 2.52 to be accepted (tolerance of 2 at the third significant digit). Using only\digits{3}
with\answer{2.5}
allows only 2.50 as a correct response.\err
takes one argument, the (absolute) error allowed in the student's response. If\digits
is also set, the grading type is 'significant digits with tolerance'; otherwise, the grading type is 'absolute tolerance'. For example, using\err{0.25}
with\answer{2.5}
allows any response between 2.25 and 2.75 to be accepted.\percenterr
takes one argument, the percentage error allowed in the student's response.\percenterr
may not be used with either\digits
or\err
. For example, using\percenterr{5}
with\answer{2.5}
allows any response between 2.5 × 0.95 and 2.5 × 1.05 to be accepted. -
Authors should follow these guidelines when using this question type:
- Allow some tolerance in the student's response, using one of the grading types described above.
- If units are given, then the question text should require a minimum accuracy to a certain number of significant figures rather than decimal places.
- Provide an answer which is as accurate as possible.
- If the use of units is not an important part of the
question (i.e., the ability to convert units is not an
important part of the concept being tested), then it is
probably better not to include units in the
\answer
field. In this case, instructions should be given to express the answer in terms of a particular unit.
Examples
\begin{question}{Numeric} \qutext{Compute the exact value of the function $f(x) = 3x^4 - 2x^2 - 1$ at $x = 2.1$.} \answer{48.5243} % exact grading \end{question}
\begin{question}{Numeric} \qutext{Compute the value of $\log(45)$. Round your answer to 5 significant digits.} \answer{1.6532} % note that this uses exact grading, % since \digits is not used % In this case, a more accurate response would still be % graded as incorrect. \end{question}
\begin{question}{Numeric} \qutext{Compute the value of $\log(45)$. Your answer should be correct to an accuracy of at least 5 decimal places.} \answer{1.653212514} \err{0.00001} % absolute tolerance % Any numerical response between 1.653202514 and % 1.653222514 would be graded as correct. \end{question}
\begin{question}{Numeric} % This question uses algorithmic variables. \qutext{Compute the value of $\log(\var{a})$. Your answer should be correct to an accuracy of at least 5 decimal places.} \answer{\var{log(\var{a})}} \err{0.00001} \code{$a = rand(1,100,4);} % The above code chooses a random value a between 1 and % 100, to four significant figures. \end{question}
\begin{question}{Numeric} \qutext{A man is on the top of a tower that is 800 feet above ground. How far can he see?\\ \\ Use 3960 miles for the radius of the earth.\\ Express your answer to an accuracy of at least 6 significant digits.} \answer[mi]{34.64134750325309} \err{0.0001} % note that \digits{6} would allow no % tolerance, and would cause '182906 ft' % to be rejected. \end{question}
\begin{question}{Numeric} % If the ability to convert units is not an important % part of the question, then not using units is probably % a good decision. \qutext{A man is on the top of a tower which is 800 feet above ground. How far (in miles) can he see?\\ \\ Use 3960 miles for the radius of the earth.\\ Express your answer to an accuracy of at least 4 decimal places.\\ Do NOT include any units in your answer.} \answer{34.64134750325309} \err{0.0001} \end{question}
\begin{question}{Numeric} % An algorithmic version of the previous questions. % The height is a multiple of 50 in [400,900). \code{$height = range(400,900,50); $answer = sqrt((3960 + $height/5280)^2 - 3960^2);} \qutext{A man is on the top of a tower which is \var{height} feet above ground. How far can he see?\\ \\ Use 3960 miles for the radius of the earth.\\ Express your answer to an accuracy of at least 6 significant digits.} \answer[mi]{\var{answer}} \err{2} % Let's be nice and accept any response within % +/- 2 \digits{6} % at the sixth significant digit. \end{question}