equivValue

Overview

The equivValue method compares numerical values that may be represented in different ways, such as units of measurement, where \(1m\) = \(100cm\). equivValue will evaluate the expression to a numerical form for comparison. As long as the value given by the student is mathematically equal to the result the author was expecting, the question will validate as correct.

Although similar to equivSymbolic, the equivValue method cannot be used with variables. It does however work with decimals, fractions and percentage. equivValue is particularly useful if you are using units of measurement. This method also handles validation of lists and ranges, using the tolerance symbol.


  • Tolerance

    A plus-minus (±) value can be added by authors to the value field in the validation area. This means that students can give a response with tolerance that will be deemed as correct. For example, if the valid response set by the author is \(10±1.5\) the student can respond with any value from \(8.5\) to \(11.5\) and get points. Tolerance works only with the the equivValue method. See Example 5 below.


  • Allow decimal marks

    Authors can specify what separators can be used by the student. From the Thousand Separator drop down menu you can select dot, comma, and/or space. The Decimal Separator menu contains the option for either a dot or a comma. Note that the specified thousand separator and decimal separator cannot be the same, e.g. both dot.


  • Significant decimal places

    This option defines how many significant decimal places can be allowed in students responses. Default and maximum value is 10. See Example 6 below.


  • Inverse result

    Enabling this means that the value specified in the Value field will not be accepted as the correct answer. It is a useful way of excluding very specific answers from validation.
    Use case: Students are asked to enter something equivalent in value to \(100\), but you don't want them to enter the same number, and thus score points, for this response. In this case, adding an additional scoring method equivLiteral, and enabling Inverse Result will exclude \(100\) from correct response options.


  • Ignore text

    This refers to LaTeX text only, and when enabled will ignore any LaTeX text the student enters in the response area.


  • Compare sides

    Used when comparing two constant equations, when both sides of an equation have not been fully specified, such as {{response}} + {{response}} = {{response}}. By default, expressions such as this will validate as isTrue. This means that as long as the expression is mathematically correct, it will validate- even if the value entered is different to that specified in the validation area. However, enabling Compare Sides ensures that the response given is symbolically equal to the equation set in the validation area.
    See Example 8 below.




Examples

Example 1 - Basic equivValue scoring.

As long as the student's answer has the same value as the response set by the author the question will validate as correct. See examples below:

AnswerMarking
\(100\)true
\(200-100\)true
\(\frac{200}{2}\)true
\(50\times2\)true
\(100\%\)false
Source
{
    "instant_feedback": true,
    "is_math": true,
    "stimulus": "Enter something with an equivalent value to \\(100\\)",
    "type": "formulaV2",
    "ui_style": {
        "type": "block-on-focus-keyboard"
    },
    "validation": {
        "scoring_type": "exactMatch",
        "valid_response": {
            "score": 1,
            "value": [
                {
                    "method": "equivValue",
                    "value": "100",
                    "options": {
                        "decimalPlaces": 10,
                        "inverseResult": false
                    }
                }
            ]
        }
    }
}


Example 2 - Ignore Order.

In this example, decimals and fractions that are the equivalent value to the response set in validation will be correct, no matter the format.

AnswerMarking
\(0.5\)true
\(\frac{1}{2}\)true
\(\frac{5}{10}\)true
\(50\%\)true
\(.25+.25\)true
Source
{
    "instant_feedback": true,
    "is_math": true,
    "stimulus": "Enter something with an equivalent value to \\(0.5\\)",
    "type": "formulaV2",
    "ui_style": {
        "type": "block-on-focus-keyboard"
    },
    "validation": {
        "scoring_type": "exactMatch",
        "valid_response": {
            "score": 1,
            "value": [
                {
                    "method": "equivValue",
                    "value": "0.5",
                    "options": {
                        "decimalPlaces": 10
                    }
                }
            ]
        }
    }
}


Example 3 - Using units.

equivValue is very often used with units. In this example, a value given in any applicable unit of measurement that is equal to 1 mile will be correct. US Customary Units must be used. See our list of Customary US Unit Abbreviations for reference.

AnswerMarking
\(1mi\)true
\(5280ft\)true
\(63360in\)true
\(\frac{10560}{2}ft\)true
\(1.2m\)false
\(\frac{10560}{3}ft\)false
Source
{
    "instant_feedback": true,
    "is_math": true,
    "stimulus": "Enter something with an equivalent value to \\(1\\) Mile.",
    "type": "formulaV2",
    "ui_style": {
        "type": "block-on-focus-keyboard"
    },
    "validation": {
        "scoring_type": "exactMatch",
        "valid_response": {
            "score": 1,
            "value": [
                {
                    "method": "equivValue",
                    "value": "1mi"
                }
            ]
        }
    }
}


Example 4 - using units.

equivValue can be used with both US and S.I. units. However note that equivValue does not convert values to another measurement system. In this example S.I. Units are used. See our list of S.I. Units Abbreviations for reference.

AnswerMarking
\(1kg\)true
\(1000g\)true
\(100000cg\)true
\(\frac{2000000}{2}mg\)true
\(1.2kg\)false
\(\frac{100000}{2}cg\)false
Source
{
    "instant_feedback": true,
    "is_math": true,
    "stimulus": "Enter something with an equivalent value to \\(1\\) Kilogram.",
    "type": "formulaV2",
    "ui_style": {
        "type": "block-on-focus-keyboard"
    },
    "validation": {
        "scoring_type": "exactMatch",
        "valid_response": {
            "score": 1,
            "value": [
                {
                    "method": "equivValue",
                    "value": "1kg",
                    "options": {
                        "decimalPlaces": 10
                    }
                }
            ]
        }
    }
}


Example 5 - Tolerance - Plus/Minus.

A plus-minus value can be set in validation, so that the correct response is within a range. In this example a tolerance of \(1.6\) is applied.

AnswerMarking
\(10\)true
\(11.6\)true
\(8.4\)true
\(11\)true
\(11.7\)false
Source
{
    "instant_feedback": true,
    "is_math": true,
    "stimulus": "Enter something with an equivalent value to the value \\(10\\).",
    "type": "formulaV2",
    "ui_style": {
        "type": "block-on-focus-keyboard"
    },
    "validation": {
        "scoring_type": "exactMatch",
        "valid_response": {
            "score": 1,
            "value": [
                {
                    "method": "equivValue",
                    "value": "10 \\pm 1.6",
                    "options": {
                        "inverseResult": false
                    }
                }
            ]
        }
    }
}


Example 6 - Allow Decimal.

The Decimal Places field is used to specify the number of significant decimal places in the response. In this example, Decimal Places is set to 3. Students will not need to enter all digits after the decimal point for the response to be deemed correct.

AnswerMarking
\(10\)true
\(10.000\)true
\(10.0001\)true
\(9.9995\)true
\(10.0005\)false
\(10.001\)false
\(9.9994\)false

Source
{
    "instant_feedback": true,
    "is_math": true,
    "stimulus": "Enter something with an equivalent value to the value \\(10\\) to \\(3\\) decimal places",
    "type": "formulaV2",
    "ui_style": {
        "type": "block-on-focus-keyboard"
    },
    "validation": {
        "scoring_type": "exactMatch",
        "valid_response": {
            "score": 1,
            "value": [
                {
                    "method": "equivValue",
                    "value": "10",
                    "options": {
                        "decimalPlaces": 3,
                        "inverseResult": false
                    }
                }
            ]
        }
    }
}


Example 7 - Equation solving as is true

In this example students have to enter responses in the empty boxes. A student's response will be considered correct as long as the left side of the equation is mathematically equal to the right side. Validation settings must contain one of the possible correct responses. In this example it is set to "\(4+5=9\)".

AnswerMarking
\(2+5=7\)true
\(20+5=25\)true
\(-1-1+5=3\)true
\(.5+5=5.5\)true

Source
{
    "instant_feedback": true,
    "is_math": true,
    "stimulus": "<span>Enter any format where the left side is equal to the right.<\/span>",
    "template": "{{response}}+5={{response}}",
    "type": "formulaV2",
    "ui_style": {
        "type": "block-on-focus-keyboard"
    },
    "validation": {
        "scoring_type": "exactMatch",
        "valid_response": {
            "score": 1,
            "value": [
                {
                    "method": "equivValue",
                    "value": "4+5=9",
                    "options": {
                        "decimalPlaces": 10,
                        "inverseResult": false
                    }
                }
            ]
        }
    }
}


Example 8 - Compare sides.

This is the same question as above, only with Compare Sides enabled. This allows authors to limit correct responses, so the equation values entered by the student have the same mathematical result as the equation set by the author. In this example, the expression set in validation is "\(4+5=9\)".

AnswerMarking
\(4+5=9\)true
\(4+5=4+5\)true
\(2+2+5=9\)true
\(2+5=7\)false
\(20+5=25\)false

Source
{
    "instant_feedback": true,
    "is_math": true,
    "stimulus": "<span>Enter any format where the left side is equal to the right.<\/span>",
    "template": "{{response}}+5={{response}}",
    "type": "formulaV2",
    "ui_style": {
        "type": "block-on-focus-keyboard"
    },
    "validation": {
        "scoring_type": "exactMatch",
        "valid_response": {
            "score": 1,
            "value": [
                {
                    "method": "equivValue",
                    "value": "4+5=9",
                    "options": {
                        "decimalPlaces": 10,
                        "inverseResult": false,
                        "compareSides": true
                    }
                }
            ]
        }
    }
}


Combining Methods

equivValue is often combined with isUnit in order to restrict units that can be accepted as a correct answer. In this section you will find worked examples of equivValue combined with isUnit, a short explanation of how they work together and a response table for each example to help you better understand the concept.



Example 1 - equivValue + isUnit with S.I. Units.

Combining equivValue with isUnit is a good method for narrowing down possible responses options when it is needed. In this example the answer should be given in either \(cm\) or \(m\). Listing \(cm\) and \(m\) in isUnit settings ensures that values given in these units of measurement only will be correct. Also note that even though \(5 km\) is set as a valid response in equivValue settings, this answer will be incorrect due to the specified isUnit restrictions.

AnswerMarking
\(5000m\)true
\(500000cm\)true
\(5km\)false

Source
{
    "instant_feedback": true,
    "is_math": true,
    "stimulus": "Enter something with an equivalent value to \\(5\\) kilometres, using only metres or centimetres as the unit.",
    "type": "formulaV2",
    "ui_style": {
        "type": "block-on-focus-keyboard"
    },
    "validation": {
        "scoring_type": "exactMatch",
        "valid_response": {
            "score": 1,
            "value": [
                {
                    "method": "isUnit",
                    "value": "m,cm"
                },
                {
                    "method": "equivValue",
                    "value": "5km",
                    "options": {
                        "decimalPlaces": 10
                    }
                }
            ]
        }
    }
}


Example 2 - equivValue + isUnit with US Customary Units.

This is a similar example of methods combination, only with US Customary Units.

AnswerMarking
\(1mi\)true
\(5280ft\)true
\(63360in\)false
Source
{
    "instant_feedback": true,
    "is_math": true,
    "stimulus": "Enter something with an equivalent value to \\(1\\) mile, using only miles or feet as the unit.",
    "type": "formulaV2",
    "ui_style": {
        "type": "block-on-focus-keyboard"
    },
    "validation": {
        "scoring_type": "exactMatch",
        "valid_response": {
            "score": 1,
            "value": [
                {
                    "method": "isUnit",
                    "value": "mi,ft"
                },
                {
                    "method": "equivValue",
                    "value": "1mi",
                    "options": {
                        "decimalPlaces": 10
                    }
                }
            ]
        }
    }
}