01: e: Calculated Question Type

Calculated questions is to create individual numerical questions whose response is the result of a numerical formula which contain variable numerical values by the use of wildcards (i.e {x} , {y}) that are substituted with random values when the quiz is taken.

  • Choose a Question type as Calculated, and Click Add.
  • Select the question category
  • Any shared wildcards for this category are listed beneath. If you change category, you’ll need to click the “Update the category” button to refresh this list. There may not be any shared wildcards yet – if not, you can create them later if you wish.
  • Enter the question text. This must contain at least one wildcard, inside curly braces. For example, if you wanted the student to sum numbers A and B, the question text might read: “What is {A} + {B}?” You may also include quantities computed from wildcards using the syntax “{=…}: for example, the question “What is {={A}+{B}} – {A}?” with wildcard values A=4 and B=3 would display as “What is 7 – 4?”
  • Add the formula for the answer. This formula must contain at least the wildcards that appear in the question text.Select the grade.(See Correct answer formula syntax for further details which is given below.)
  • Determine the tolerance for error that you will accept in the answer. The tolerance and tolerance type settings combine to give a range of acceptable scores. So, if tolerance = t, correct answer = x and the difference between the user’s answer and the correct answer is dx, then the tolerance types are as follows:
    1. Nominal – will mark an answer correct if the answer is within the parameters of |dx| <= t
    2. Relative – will mark an answer correct if the answer is within the parameters of  |dx| / x <= t
    3. Geometric – will mark an answer correct if the answer is within the parameters of x/(1+t) <= (x+dx) <= x*(1+t)
  • Answer display and Format determine the precision of the answer. Select the number of decimal places or significant figures you want to use.
  • Then click on save

  • Choose Wildcards dataset properties page click next.
  • A Dataset is a group of possible numbers to use in the equation. Datasets are listed as items with a wild card value. For example, if there are 4 items in a dataset that hold a value for the variable (ie. the variables could be represented by the number 5, 10, 12, or 15),  4 different versions of the question with those parameters are generated.

     A Wildcard will use the Dataset to randomize each question that will uses the same data set. For example if the question is {A} + 25 and the Dataset is 5, 10, 12, or 15, then the quiz questions will display either 5 + 25, 10 + 25, 12 + 25, or 15 + 25.

  • On the Edit Wildcards datasets page, Fill in the parameters for the item to add.

  • Answers tolerance parameters can be set here, this will use the parameters set when creating the question. The tolerance and tolerance type settings combine to give a range of acceptable scores. So, if tolerance = t, correct answer = x and the difference between the user’s answer and the correct answer is dx, then the tolerance types are as follows:
    1. Nominal – will mark an answer correct if the answer is within the parameters of |dx| <= t
    2. Relative – will mark an answer correct if the answer is within the parameters of  |dx| / x <= t
    3. Geometric – will mark an answer correct if the answer is within the parameters of x/(1+t) <= (x+dx) <= x*(1+t)
  • Add a Dataset. Leave the reuse previous value if available radio button checked and select the quantity of wildcard sets to create. Then click on Add button.

  • When the Dataset is added, the Set will show at the bottom. Then click on save changes.

Correct answer formula syntax

DO NOT PUT THE = sign in the formula.

  • As a general rule, write these formulas like you would in a calculator e.g. 3 + 5 * sin(3/{x}). A notable exception is exponentiation, where xcannot be entered as {x}^3 , but instead should be entered as pow({x}, 3)
  • Each function’s placeholders and other arguments should be in parentheses (brackets). For example, if you want students to calculate the sine of one angle and cosine of two times another angle, you would enter sin({a}) + cos({b}*2) or sin({a}) + cos(2*{b}).
  • It’s usually better to have too many parentheses (brackets) than too few. The server won’t care, and the more specific you are about what you mean, the more likely it will like your complex formulas.
  • There is no implicit multiplication. To you, the human editor, “5(23)” or “5x” may seem perfectly obvious. To the server doing the math, it’s crazy talk and won’t be understood. Always use the “*” for multiplication.
  • Any special mathematical function must have parentheses around its values. Take the sine function in the first bullet point for instance. Notice that the 3 / x is wrapped in parentheses (brackets)–this is so the server can understand it properly. Without those parentheses, the server won’t know if you mean “(sin 3) / x” or “sin (3 / x)” and will reject the entire formula accordingly.

Share this

RSS
Facebook
Facebook
TWITTER
Pinterest
LinkedIn

Leave a Reply

Your email address will not be published. Required fields are marked *