Note: You are currently viewing documentation for Moodle 1.9. Up-to-date documentation for the latest stable version is available here: Numerical question type.

Numerical question type: Difference between revisions

From MoodleDocs
(content moved from Question types)
m (Added link to spanish translation of page)
 
(24 intermediate revisions by 10 users not shown)
Line 1: Line 1:
{{Questions}}
{{Questions}}


From the student perspective, a numerical question looks just like a short-answer question. The difference is that numerical answers are allowed to have an accepted error. This allows a continuous range of answers to be set.  
From the student perspective, a numerical question looks just like a short-answer question. The difference is that numerical answers are allowed to have an accepted error. This allows a fixed range of answers to be evaluated as one answer.  


For example, if the answer is 30 with an accepted error of 5, then any number between 25 and 35 will be accepted as correct.
For example, if the answer is 30 with an accepted error of 5, then any number between 25 and 35 will be accepted as correct.
{{Moodle 2.0}}
In Moodle 2,0 you will be able to


Numerical questions can also have case-insensitive non-numerical answers. This is useful whenever the answer for a numerical question is something like N/A, +inf, -inf, NaN etc.
* grade independently the number and the unit,
* choose to handle the unit response either as
** a text input element or as
** a multichoice radio element,
* just grade the number with the option to write the unit close to the input element,
* put the unit either
** at right of the number as the most common occurence
** or at left as in $ 100,00.


{{Moodle 1.7}}In Moodle 1.7 text answers are no longer allowed - this is what short answer is for.
Furthermore your valid number formats and specific intructions on how to answer will be put near the answer input element.
An example


What is new in 1.7 is that you can have different answers with different levels of accuracy. That lets you as questions like: "What is a root of x^2 - 3x + 2?" or awards different levels of credit depending on how accurate the student was.
[[Image:numerical_multichoice_unit_example_1.jpg]]


==Question set-up==
{{Moodle 1.7}}
From Moodle 1.7 onwards, questions may have different answers with different levels of accuracy. That lets you create questions like "What is a root of x^2 - 3x + 2?" and award different levels of credit depending on the accuracy of the answer.


#Give the question a descriptive name (This is only seen in the question list that you see as a teacher when you are putting together a quiz)
In Moodle 1.7 text answers are no longer allowed - [[Short-Answer question type]] should be used instead.
#Type the equation or numerical question for your students to solve. Moodle has a various text filters that allow you to type an equation and have it properly typeset when displayed. The Algebra filter is very good for writing common matematical expressions in a simple way. More complicated expressions may be written using the [[TeX filter]]. [[Filters (administrator)]] contains information for administrators on how to enable these filters.
#Select an image to display if you want to add a picture to the question.
#Enter the correct answer. 23.4 23,4 and 2.34E+1 would all work. (Prior to Moodle 1.7, you can only add one correct answer in the user interface. If you import the question with a GIFT format file you can specifiy multiple answer(intervals) with accompanying feedback and point-percentage. This is done similar to the CLOZE [[Numerical]] format. There is no units support in the Cloze type.) It is possible, though not simple, to get support for  several answer intervals '''and''' unit support if you create the question in the numerical interface and export it in Moodle XML format. Than you can duplicate the <answer> segment and put in another answer interval and the feedback and grading factor you want for that interval. Than import it again. You will not be able to edit the question in the normal numerical interface though.
#Enter the accepted error, the range above or below the correct answer. For example, if the correct answer is 5, but you will accept 4 or 6 as answers, your accepted error is 1.
#Enter feedback for the question. It is possible to use all kinds of HTML formating for the feedback but it must be written by hand. Unfortunately (in 1.5.3 anyhow) it is right justified and has no identifying formatting.
#Units can be specified and work to a degree. Unfortunately if the student answers with the right number but no unit he can get full points. And if he thinks of another unit and has the right number and no unit, he gets no differentiated feedback, just wrong. You must also give the conversion factor . So if your main answer was '''5500''' with unit '''W''' and you wanted to allow the unit '''kW''' you would have to specify the factor '''0.001'''. If you wanted to allow '''Watt''' you would use the factor '''1'''.
#Moodle 1.7 only: If you want some feedback shown to wrong answers, type a feedback comment with a blank answer.
#Click Save Changes to add the question to the category


[[Category:Teacher]]
==Numerical question set-up==
[[Category:Question]]
#In Quiz or Question bank
[[Category:Quiz]]
#Select the question category
#Give the question a descriptive name - this allows you to identify it in the question bank.
#Enter a question in the 'question text' field. This can include an equation - Moodle has a couple of text filters that allow you to type an equation and have it properly typeset when displayed. The Algebra filter is very good for writing common mathematical expressions in a simple way. More complicated expressions may be written using the [[TeX filter]]. [[Filters]] contains information for administrators on how to enable these filters. Alternatively, select an image to display if you want to add a picture to the question.
#Select an image to display if you want to add a picture to the question. For the student, it appears immediately after the question text and before the choices.
#Set the 'default question grade' (i.e. the maximum number of marks for this question).
#Set the 'Penalty factor' (see [[Numerical_question_type#Penalty_factor|Penalty factor]] below).
#Add general feedback. This is text that appears to the student after he/she has answered the question.
#Now enter the first accepted answer(s). Note: Floating point numbers, e.g. 23.4, may also be written as 23,4 or 2.34E+1.
#Enter an accepted error for this answer. This is the range above or below the answer that Moodle will accept as a match. For example, if the correct answer is 5, but you will accept 4 or 6 as answers, your accepted error is 1.
#Enter a grade for this answer.
#Enter feedback for the accepted answer. This is the text that the student will see if they enter a number within the accepted error of the answer.
#Repeat for each of the answers you want to accept.  You can provide feedback for ''all'' wrong answers by using a wildcard, i.e. the asterisk character (*), as an answer with grade 'None'.
#Units can also be specified. For example, if you enter a unit of 'cm' here, and the accepted answer is 15, then the answers '15cm' and '15' are both accepted as correct. You can also specify a multiplier. So, if your main answer was 5500 with unit W, you can also add the unit kW with a multiplier of 0.001. This means that the answers '5500', '5500W' or '5.5kW' would all be marked correct. Note that the accepted error is also multiplied, so an allowed error of 100W would become an error of 0.1kW.
#Click 'Save changes' to add the question to the category.
 
=== Penalty factor ===
 
The 'penalty factor' only applies when the question is used in a quiz using adaptive mode - i.e. where the student is allowed multiple attempts at a question even within the same attempt at the quiz. If the penalty factor is more than 0, then the student will lose that proportion of the '''maximum''' grade upon each successive attempt. For example, if the default question grade is 10, and the penalty factor is 0.2, then each successive attempt after the first one will incur a penalty of 0.2 x 10 = 2 points.
 
==Tips and tricks==
*Remember that numerical questions in the Quiz module are slightly different than those in the Lesson module.
 
==Error messages==
 
"One of the answers you entered was not a valid number." The decimal point used must be a . not a , which is used in some countries. But the error can come anyhow. See (or add to): [http://moodle.org/mod/forum/discuss.php?d=79942 discussion] Though that didn't help me at the time.
 
==Numerical questions in pre 1.7 Moodle==
Numerical questions, in Moodle 1.6 and earlier, can also have case-insensitive non-numerical answers. This is useful whenever the answer for a numerical question is something like N/A, +inf, -inf, NaN etc.
 
==See also==
*[[Cloze | embedded / CLOZE]] question type which functions similarly to this one.
 
*[[Lesson questiontypes]] for more information about a numerical question in a Lesson Activity.
 
[[ca:Tipus_de_pregunta_Numèrica]]
[[de:Numerische Fragen]]
[[es:Tipo de Pregunta Numérica]]
[[fr:Question à réponse numérique]]
[[ja:数値問題タイプ]]

Latest revision as of 14:37, 22 July 2015



From the student perspective, a numerical question looks just like a short-answer question. The difference is that numerical answers are allowed to have an accepted error. This allows a fixed range of answers to be evaluated as one answer.

For example, if the answer is 30 with an accepted error of 5, then any number between 25 and 35 will be accepted as correct. Moodle 2.0


In Moodle 2,0 you will be able to

  • grade independently the number and the unit,
  • choose to handle the unit response either as
    • a text input element or as
    • a multichoice radio element,
  • just grade the number with the option to write the unit close to the input element,
  • put the unit either
    • at right of the number as the most common occurence
    • or at left as in $ 100,00.

Furthermore your valid number formats and specific intructions on how to answer will be put near the answer input element. An example

numerical multichoice unit example 1.jpg


Moodle1.7


From Moodle 1.7 onwards, questions may have different answers with different levels of accuracy. That lets you create questions like "What is a root of x^2 - 3x + 2?" and award different levels of credit depending on the accuracy of the answer.

In Moodle 1.7 text answers are no longer allowed - Short-Answer question type should be used instead.

Numerical question set-up

  1. In Quiz or Question bank
  2. Select the question category
  3. Give the question a descriptive name - this allows you to identify it in the question bank.
  4. Enter a question in the 'question text' field. This can include an equation - Moodle has a couple of text filters that allow you to type an equation and have it properly typeset when displayed. The Algebra filter is very good for writing common mathematical expressions in a simple way. More complicated expressions may be written using the TeX filter. Filters contains information for administrators on how to enable these filters. Alternatively, select an image to display if you want to add a picture to the question.
  5. Select an image to display if you want to add a picture to the question. For the student, it appears immediately after the question text and before the choices.
  6. Set the 'default question grade' (i.e. the maximum number of marks for this question).
  7. Set the 'Penalty factor' (see Penalty factor below).
  8. Add general feedback. This is text that appears to the student after he/she has answered the question.
  9. Now enter the first accepted answer(s). Note: Floating point numbers, e.g. 23.4, may also be written as 23,4 or 2.34E+1.
  10. Enter an accepted error for this answer. This is the range above or below the answer that Moodle will accept as a match. For example, if the correct answer is 5, but you will accept 4 or 6 as answers, your accepted error is 1.
  11. Enter a grade for this answer.
  12. Enter feedback for the accepted answer. This is the text that the student will see if they enter a number within the accepted error of the answer.
  13. Repeat for each of the answers you want to accept. You can provide feedback for all wrong answers by using a wildcard, i.e. the asterisk character (*), as an answer with grade 'None'.
  14. Units can also be specified. For example, if you enter a unit of 'cm' here, and the accepted answer is 15, then the answers '15cm' and '15' are both accepted as correct. You can also specify a multiplier. So, if your main answer was 5500 with unit W, you can also add the unit kW with a multiplier of 0.001. This means that the answers '5500', '5500W' or '5.5kW' would all be marked correct. Note that the accepted error is also multiplied, so an allowed error of 100W would become an error of 0.1kW.
  15. Click 'Save changes' to add the question to the category.

Penalty factor

The 'penalty factor' only applies when the question is used in a quiz using adaptive mode - i.e. where the student is allowed multiple attempts at a question even within the same attempt at the quiz. If the penalty factor is more than 0, then the student will lose that proportion of the maximum grade upon each successive attempt. For example, if the default question grade is 10, and the penalty factor is 0.2, then each successive attempt after the first one will incur a penalty of 0.2 x 10 = 2 points.

Tips and tricks

  • Remember that numerical questions in the Quiz module are slightly different than those in the Lesson module.

Error messages

"One of the answers you entered was not a valid number." The decimal point used must be a . not a , which is used in some countries. But the error can come anyhow. See (or add to): discussion Though that didn't help me at the time.

Numerical questions in pre 1.7 Moodle

Numerical questions, in Moodle 1.6 and earlier, can also have case-insensitive non-numerical answers. This is useful whenever the answer for a numerical question is something like N/A, +inf, -inf, NaN etc.

See also