WeBWorK Problems

decimal modification to Parser

decimal modification to Parser

by Alex Jordan -
Number of replies: 2
This may just be a question for Davide Cervone, but I'll post it here.

My idea is to add a post filter to answer checkers, where if the student gets an answer incorrect, and they have entered any decimal numbers as part of their submission, then they get a message alerting them of the error tolerance for decimals. The error message could be different for absolute or relative tolerance (or sigfig if we get around to that), and based on the value of the tolerance flag, and worded in a way that is friendlier to students than the ways we discuss this to ourselves.

What is a good way to implement this? Could it be done at the deepest level, as a modification to the base contexts? Or is that a bad idea, and it would need to be its own thing applied on a problem by problem basis?
In reply to Alex Jordan

Re: decimal modification to Parser

by Davide Cervone -
I'm not sure that issuing such a message whenever there is a wrong answer is the right thing to do. I suspect it will more often be misleading than helpful, since many wrong answers are not due to improper precision, and after seeing it over and over for every incorrect answer, students will stop paying attention to it.

I suspect it is better to give it only when it is actually likely to be the source of their incorrect answer. But how to tell? It might be better to issue the message only if the answer is close but not close enough. Perhaps you could use twice the tolerance (or something like that) and see if the answer is within that before giving he message.

It is also not clear if you want this just for Real answers, or or all answer types. Doing this for Reals would not be too hard, but handling others would be more problematic. For example, with a Formula, some of the test points mint be OK and others would be outside the tolerances, so you'd have to go back through the points and see if any were close but not close enough. For things like vectors, you'd need to do this for each coordinate. (And for vector valued function, each coordinate of the answer at each test point.) It can get complicated.

An alternative might be to use the NumberCheck formula (like that one installed by the NoDecimals option) that would check the number of significant digits in any decimal the student enters and report a message if there are too few. That could be done fairly easily.
In reply to Davide Cervone

Re: decimal modification to Parser

by Alex Jordan -
My feeling is that something will need to be done about this issue to expand WeBWorK to community colleges and high schools. It's a common question/comment that comes from my faculty here using WeBWorK: "I wish it was more clear about decimal precision". The students are generally less aware that a lack of precision could be an issue in the first place, and orientations and reminders don't help. You can add instructions to every single problem about what precision to use, but that is very difficult to maintain. And personally, I think that adding those kinds of instructions to the problem distract from the real math that a student needs to think about. It's why feedback messages from Math Objects are so great, because they can play the role of providing the formatting information if there is a formatting issue with student input.

There is precedent for such messages, even when it's not exactly the source of incorrectness. For instance entering an unreduced fraction in Fraction context or a factored polynomial in LimitedPolynomial context. What if the message was just a reminder, that stressed maybe this is incorrect right now because of a lack of precision? And it could only appear if no other feedback messages had been created. Perhaps a .conf option would control whether or not to give such a message. I'd like that over a command to call like NoDecimals, because it would be all in one place, instead of maintained in each problem file.

It appeals to me to just scan the student answer for decimals that are not precise enough, because that could be done for Formula answers without involving test points. I'll add this to my list of experimental feature branches and if I come up with something that looks good I'll submit a pull request. I will probably ask you to take a look at my regexp for doing the check when I get around to it.