True/False questions present no particular problems for numerical substitutions. They are a good place to start "getting used to" the numerical substitution system.
Since the correct answer of the question will not change, the teacher must ensure, however, that all possible substitutions do not change the truth or falsity of the statement.
For instance, the first question in the question file below is faulty. Why? It is possible for the value of "y" to be 1 (since y is a random integer in [1,9]). So, about one-ninth of the time, the statement is true - but the "correct" answer is false!
The second question corrects the problem by ensuring that "y" will never have the value 1.
\TITLE True/False Substitutions \TF A F {$x=rni(1,9)}{$y=rni(1,9)} {$x} + {$y} = {$x + 1} (A bad question!) \TF A F {$x=rni(1,9)}{$y=rni(2,9)} {$x} + {$y} = {$x + 1} (A correct question...}
The following applet runs this question file:
Short-answer questions are relatively straightforward with regard to substitutions, although there is one special consideration.
If the correct answer for your short-answer question contains a substitution, you must use the alternate answer format for the correct answer (see below). This ensures that the values of the variables have been assigned before the answer is calculated.
In the question file below, the first question is correct, but the "correct" answer for the second question will be "flaky".
\Title Short-Answer Substitutions \FF {$A=rni(1,9)}{$B=rni(1,9)}What is {$size=18 {$A} + {$B}}? \A {$A+B} \FF A {$A+B} {$A=rni(1,9)}{$B=rni(1,9)}What is {$size=18 {$A} + {$B}}?
The applet below runs this question file:
If numerical substitutions are not handled very carefully, a serious problem can arise in multiple-choice type questions wherein randomized substitutions may produce two or more identical answer choices for a question.
If one of the identical choices is not the correct answer, the result is merely confusing for the student and embarrassing for the teacher. If one of the identical answer is the correct answer, the result is a minor disaster.
Until you are used to the system, I recommend that you try numerical substitutions in true/false and short-answer questions. In multiple-choice questions, it can help if you insure that each multiple-choice answer choice is a different multiple of a common value. Here is a simple example:
The first question below contains duplicate answers. Do you see why? (B - F = 3*F - F = 2*F) This is not the most difficult situation, however. It is possible that some random values produce duplicate choices, but most do not! You could think that you have tested your questions thoroughly, and still be embarassed. The third question in the file below will sometimes display correctly, and other times have two (or more!) duplicate answers!
I recommend that you avoid substitutions in multiple-choice questions until you are comfortable with using substitutions in true/false and short-answer questions.
\Title Multiple-Choice Substitutions \MC A C {$F=RNI(2,9)}{$B=3*F}Johnny has {$F} friends. Each of Johnny's friends has {$B} beans. How many beans are there all together? A. {$F} B. {$2*F} C. {$F*B} D. {$B + F} E. {$B - F} \MC A C {$F=RNI(2,9)}{$B=3*F}Johnny has {$F} friends. Each of Johnny's friends has {$B} beans. How many beans are there all together? A. {$F} B. {$2*F} C. {$F*B} D. {$B + F} \MC A A {$a=rni(2,6)}{$t=rni(2,8)}A car accelerates uniformly at {$a} m/s{$exp 2} for {$t} seconds. How far has it traveled in this time? A. {$0.5*A*T*T} meters B. {$A*T*T} meters C. {$0.5*A*A*T} meters D. {$A*T} meters
The applet below runs this question file: