Tests & Quizzes Calculated Questions Scientific Notation

65 views
Skip to first unread message

Tiffany Stull

unread,
Feb 23, 2018, 3:26:01 PM2/23/18
to sakai-user, Sakai Development

Hi all,

I've discovered an issue where the Samigo Tests & Quizzes Calculated Question type can mark correct answers as incorrect.  The situation is the following:

  1. The correct answer is a LARGE number that automatically converts to scientific notation, i.e., 1E11 or bigger.
  2. The numbers following the decimal point in the scientific notation (in front of the E) would be rounded by Samigo to the decimal place specified in the question's settings.

Here's an example question:

Question Text: {x}^2 = {{y}}
x is any number between 500000 and 1000000, with 2 decimal places
Tolerance is default for the question type: 0.01
Decimal places for answer: 3

One instance of this question that comes up for an example student is:  871542.68^2 = ___

The answer provided by my TI-83 calculator (which also has a scientific notation conversion threshold of 1E11) is 7.595866431E11, but if I type this directly into the answer box, Samigo counts it incorrect and gives me 7.596E11 for the correct answer.

Similarly, 759586643061 is counted as incorrect (it SHOULD be the correct answer), but 759600000000 is marked correct.

As expected, tolerance applies to the true number Samigo calculates for the answer (ignoring scientific notation).

In the case of the question above, the 0.01 tolerance applies to 759600000000.00.  Samigo would mark any value between 759599999999.99 and 759600000000.01 as correct.  Thus, for this question, I would need to set a MASSIVE tolerance (in the millions) to make Samigo count my calculator's correct answer as correct.  If I did that, a student entering any value in a range of several million would get the question marked correct.

So the question is: how should Samigo behave when a LARGE number for the Answer is converted to scientific notation?  I assume it should do the following:

  1. Calculate the answer.
  2. Round to the appropriate actual decimal value specified in the question BEFORE converting to scientific notation!
  3. Apply tolerance on the value calculated in step 2 above to determine the range of acceptable correct answers.
  4. Convert the answer to scientific notation for displaying it in the Answer Key (an aside: it might also be nice if the answer key showed both the number in scientific notation and the actual value of the number, because either would be correct).

If my assumption is correct, I'll create a bug jira with this information; if not, please let me know what should be the correct behavior!

Thanks,
Tiffany

Shawn Foster

unread,
Feb 23, 2018, 3:33:28 PM2/23/18
to Tiffany Stull, sakai-user, Sakai Development
Hi, Tiffany.

Is what you are seeing related to the rounding issue with Calculated
Questions from SAM-3258?

https://jira.sakaiproject.org/browse/SAM-3258

-Shawn

--
Shawn Foster
eLearning Technology and Application Development
Western Technology Services
Western University
London, Ontario, Canada

On 2018-02-23 3:25 PM, Tiffany Stull wrote:
> Hi all,
>
> I've discovered an issue where the Samigo /Tests & Quizzes/ *Calculated
> Question* type can mark *correct answers as incorrect*.  The situation
> is the following:
>
> 1. The *correct answer* is a LARGE number that automatically converts
>    to scientific notation, i.e., *1E11 or bigger*.
> 2. The numbers following the decimal point in the scientific notation
>    (in front of the *E*) would be *rounded* by Samigo to the decimal
>    place specified in the question's settings.
>
> Here's an example question:
>
>    *Question Text:* {x}^2 = {{y}}
>    *x* is any number between *500000* and *1000000*, with *2* decimal
>    places
>    *Tolerance is default for the question type:* 0.01
>    *Decimal places for answer:* 3
>
> One instance of this question that comes up for an example student is:
> *871542.68^2 = ___**
> *
> The answer provided by my TI-83 calculator (which also has a scientific
> notation conversion threshold of 1E11) is *7.595866431E11*, but if I
> type this directly into the answer box, Samigo counts it *incorrect* and
> gives me *7.596E11* for the correct answer.
>
> Similarly, *759586643061* is counted as incorrect (it SHOULD be the
> correct answer), but *759600000000* is marked correct.
>
> As expected, *t**olerance* applies to the true number Samigo calculates
> for the answer (ignoring scientific notation).
>
> In the case of the question above, the 0.01 tolerance applies to
> *759600000000.00*.  Samigo would mark any value *between 759599999999.99
> and 759600000000.01* as correct.  Thus, for this question, I would need
> to set a MASSIVE tolerance (in the millions) to make Samigo count my
> calculator's correct answer as correct.  If I did that, a student
> entering any value in a range of several million would get the question
> marked correct.
>
> So the question is: how should Samigo behave when a LARGE number for the
> *Answer* is converted to scientific notation?  I assume it should do the
> following:
>
> 1. Calculate the answer.
> 2. Round to the appropriate *actual **de**cimal value* specified in the
>    question BEFORE converting to scientific notation!
> 3. Apply *tolerance* on the value calculated in step 2 above to
>    determine the range of acceptable correct answers.
> 4. Convert the answer to scientific notation for displaying it in the
>    /Answer Key/ (an aside: it might also be nice if the answer key

Matthew Jones

unread,
Feb 23, 2018, 3:34:20 PM2/23/18
to Shawn Foster, Tiffany Stull, sakai-user, Sakai Development
Or the parsing issue in https://jira.sakaiproject.org/browse/SAM-3330. Is this an issue with Sakai 12?

--
You received this message because you are subscribed to the Google Groups "Sakai Users Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sakai-user+...@apereo.org.
To post to this group, send email to sakai...@apereo.org.
Visit this group at https://groups.google.com/a/apereo.org/group/sakai-user/.

Tiffany Stull

unread,
Feb 23, 2018, 3:49:18 PM2/23/18
to Matthew Jones, Shawn Foster, sakai-user, Sakai Development

Hi Shawn and Matthew,

Unfortunately, I don't think the issues in the jiras you mentioned below will help with this because it looks like those are fixed in 12 and this issue is present everywhere I've tested.  I apologize for not including this information in my original message - I tested on the following servers:


I'm also seeing the same issue in UVA's 11.2 instance, on both a server with and a server without backport of SAM-3227 and related follow-on fixes.  Without SAM-3227, the issue is more egregious because before SAM-3227, any number greater than 10000 was converted to scientific notation.  Thus, without SAM-3227, smaller numbers are ALSO affected by the rounding.

To summarize: the problem only affects LARGE numbers.  It affects them because scientific notation conversion takes place BEFORE rounding.

Tiffany
Reply all
Reply to author
Forward
0 new messages