# minimise syntax errors in secondary school maths exams using Mathematica

June 12, 2013 8:44 PM Subscribe

In high school maths exams students when use Mathematica to solve problems, a syntax error that costs a lot of time to find can lose a student a lot of marks. What strategies can teachers use to reduce the risk or cost of syntax errors to students sitting high-stakes exams?

I'm asking this one for Mrs Kandinski. She's a substitute maths teacher in an Australian (Victorian) secondary school that uses Mathematica both in lessons and in exams. Students have to sit a maths exam using Mathematica as a tool to solve problems. Students in many schools use CAS calculators instead, like the TI-Inspire line. Compared to using CAS calculators, the school believes that Mathematica offers the students a better learning environment and the opportunity to acquire some skills that are transferable and will be more useful in the future.

The problem with using Mathematica is that, in an exam situation, students risk losing a great deal of time to syntax errors. The exams are state-wide and very high stakes for the students and the school (university entry relies on these exams). CAS calculators are not as "risky" to use, in this regard, as Mathematica. So she is asking whether anyone can explain their strategies to minimise the cost to students of making simple syntax errors in exams.

This must be a problem for teachers in IT or programming subjects at similar levels (end of high school, start of university). So maybe teachers in other fields would have some insight or suggestions.

The school is heavily invested in using Mathematica for this, and believes that the overall benefits outweigh the risks, so just changing back to CAS is not an option for solving this problem.

I'm asking this one for Mrs Kandinski. She's a substitute maths teacher in an Australian (Victorian) secondary school that uses Mathematica both in lessons and in exams. Students have to sit a maths exam using Mathematica as a tool to solve problems. Students in many schools use CAS calculators instead, like the TI-Inspire line. Compared to using CAS calculators, the school believes that Mathematica offers the students a better learning environment and the opportunity to acquire some skills that are transferable and will be more useful in the future.

The problem with using Mathematica is that, in an exam situation, students risk losing a great deal of time to syntax errors. The exams are state-wide and very high stakes for the students and the school (university entry relies on these exams). CAS calculators are not as "risky" to use, in this regard, as Mathematica. So she is asking whether anyone can explain their strategies to minimise the cost to students of making simple syntax errors in exams.

This must be a problem for teachers in IT or programming subjects at similar levels (end of high school, start of university). So maybe teachers in other fields would have some insight or suggestions.

The school is heavily invested in using Mathematica for this, and believes that the overall benefits outweigh the risks, so just changing back to CAS is not an option for solving this problem.

I've never used Mathematica on an exam (that sounds terrifying!) but are students allowed to have CAS calculators in addition to the computer? That way, they can at least check their work? Then teachers could promote good answer-checking habits. Perhaps teachers could also devote a few hours a year to recognizing the most common syntax mistakes? Or maybe bringing in some CS teachers from a local community college (or the high school, if they are there) to help? I'm sure they experience similar issues.

I'm also a little confused how a test can be state-wide but the test format is set by the school.

It's always been weird to me that high schools stress calculators and technology during math. I have only ever been allowed to use a non-graphing scientific calculator in college math classes and honestly don't know if I could turn on a Inspire if I tried. But oh well--you've got to work with the hand you are dealt here! :(

posted by obviousresistance at 11:26 PM on June 12, 2013 [1 favorite]

I'm also a little confused how a test can be state-wide but the test format is set by the school.

It's always been weird to me that high schools stress calculators and technology during math. I have only ever been allowed to use a non-graphing scientific calculator in college math classes and honestly don't know if I could turn on a Inspire if I tried. But oh well--you've got to work with the hand you are dealt here! :(

posted by obviousresistance at 11:26 PM on June 12, 2013 [1 favorite]

The exams are state wide but each school can choose from a couple of different models of calculator to teach their students to use through the preceding two years. The Mathematica thing is a trial being done by only a few schools. It has some clear benefits from an educational perspective, but also this disadvantage.

posted by kandinski at 12:11 AM on June 13, 2013

posted by kandinski at 12:11 AM on June 13, 2013

From my experience using mathematica (or similar programs of that level), syntax errors are usually

a)a misplaced bracket

b)A mispelled keyword

c)Incorrectly ordered syntax.

Unless a student is certain of the syntax of a particular command I'd recommend they open it in help, then input in the same format (using examples). Under exam stress conditions this is possible difficult to do of course!

Inkyz suggestion of white space above is useful, especially for counting brackets. From memory I think mathematica will do the counting for you, so that might help. Capitilisation is also important in mathematica, and often my problem when a function isn't working. Unfortunately Mathematica's error reporting isn't that useful.

You can assign answers to variables in Mathematica, so if you want to calculate sin(x^2+y+-tan(z) you can calculate each individual term seperately then add them together, which will help a lot with avoiding bracket based confusion.

posted by Cannon Fodder at 1:07 AM on June 13, 2013

a)a misplaced bracket

b)A mispelled keyword

c)Incorrectly ordered syntax.

Unless a student is certain of the syntax of a particular command I'd recommend they open it in help, then input in the same format (using examples). Under exam stress conditions this is possible difficult to do of course!

Inkyz suggestion of white space above is useful, especially for counting brackets. From memory I think mathematica will do the counting for you, so that might help. Capitilisation is also important in mathematica, and often my problem when a function isn't working. Unfortunately Mathematica's error reporting isn't that useful.

You can assign answers to variables in Mathematica, so if you want to calculate sin(x^2+y+-tan(z) you can calculate each individual term seperately then add them together, which will help a lot with avoiding bracket based confusion.

posted by Cannon Fodder at 1:07 AM on June 13, 2013

They are using a programming tool without having been taught how to develop programs? That will end well. If you doing this as an experiment then you are doing your students a grave disservice.

The basic principle is develop the solution in parts and check as you go, e.g. (syntax may be wrong), do

area = pi; print area;

area= pi*r; print area;

area=pi*r^2; print area;

Of course they could also arrive at area=(pi*r)^2 by this method so knowing what kind of answer to expect is also important.

Programming requires discipline. Something kids generally and kids in an exam situation tend not to have. Programming also takes time, you can spend the time while you are writing or when you are debugging, your choice.

posted by epo at 4:27 AM on June 13, 2013

The basic principle is develop the solution in parts and check as you go, e.g. (syntax may be wrong), do

area = pi; print area;

area= pi*r; print area;

area=pi*r^2; print area;

Of course they could also arrive at area=(pi*r)^2 by this method so knowing what kind of answer to expect is also important.

Programming requires discipline. Something kids generally and kids in an exam situation tend not to have. Programming also takes time, you can spend the time while you are writing or when you are debugging, your choice.

posted by epo at 4:27 AM on June 13, 2013

Can you provide more detail on the sort of problems they're meant to do?

It seems like most things my TI-89 can do (which seems to have roughly the functionality of the Inspire CAS) are one line in Mathematica and probably easier to do in Mathematica because it's easier to spot mismatched parentheses (or square brackets in Mathematica).

I think the answer is that they probably

I guess I'm saying that after two years, they really ought to have the facility to do simple computations in Mathematica without having to spend ages boggling over syntax errors. For example, in another piece of software, I'm forever putting extra commas in when entering matrices (so {1,1,} instead of {1,1}), but I've seen the resulting error message so many times that I know what sort of error I'm looking for. It's actually easier to spot than on a calculator (where I'm prone to the same error) because you can see more of the line at once. Mathematica's syntax highlighting will alert you if you're trying to use RwoReduce instead of RowReduce.

posted by hoyland at 6:03 AM on June 13, 2013

It seems like most things my TI-89 can do (which seems to have roughly the functionality of the Inspire CAS) are one line in Mathematica and probably easier to do in Mathematica because it's easier to spot mismatched parentheses (or square brackets in Mathematica).

I think the answer is that they probably

*shouldn't*be programming, unless the exams are not what I'm imagining. They should be entering one line at a time and most things should be one-line computations. So maybe you have to enter a matrix and then row-reduce it. You should do that as two lines:A = {lists}so you can see you got the matrix right. In one line, your likeliest errors are making a typo in a command name (which hopefully syntax highlighting can help with), putting your brackets in the wrong place (which breaking things up into pieces and checking each component should help with) and doing something like writing x2 instead of x^2. It's the first and the last that are easier to avoid on a calculator. The first because you don't type commands and the last because, unless TI has changed something, x2 will just give an error on a calculator, but Mathematica will assume you meant to introduce a variable called x2. But then you've got a random x2 in your answer and that's usually a hint something's gone wrong.

RowReduce[A]

I guess I'm saying that after two years, they really ought to have the facility to do simple computations in Mathematica without having to spend ages boggling over syntax errors. For example, in another piece of software, I'm forever putting extra commas in when entering matrices (so {1,1,} instead of {1,1}), but I've seen the resulting error message so many times that I know what sort of error I'm looking for. It's actually easier to spot than on a calculator (where I'm prone to the same error) because you can see more of the line at once. Mathematica's syntax highlighting will alert you if you're trying to use RwoReduce instead of RowReduce.

posted by hoyland at 6:03 AM on June 13, 2013

From my limited and long-ago use of Mathematica, I thought it was helpful to learn how to switch between the different forms of input/output. In particular, pretty print to make sure I typed something in correctly, full form to copy and paste quickly into a new line.

Otherwise...practice? Do all the students have access to Mathematica from home? If so, assigning some speed drills of the most common types of calculations would probably help, but it might not be the most constructive use of time.

posted by tinymegalo at 4:33 PM on June 13, 2013

Otherwise...practice? Do all the students have access to Mathematica from home? If so, assigning some speed drills of the most common types of calculations would probably help, but it might not be the most constructive use of time.

posted by tinymegalo at 4:33 PM on June 13, 2013

This thread is closed to new comments.

1) I build complex expressions up from smaller pieces, and run it at each step to validate the smaller pieces compile properly and are correct

2) I store computations in intermediate/temporary variables, so the later pieces can stay relatively simple

3) I use a lot of whitespace to format the expressions and make it clear what's going on and what is connected to what (and to a lesser extent extra parentheses, though those can sometimes make things less clear due to the extra characters; on the other hand, they can also reveal syntax errors)

4) Once the expression is done, I eyeball the result and see if it looks reasonable; regardless, if I have time, I'll try to compute the thing another way and see if I get the same result

5) If all else fails and I can't figure out the problem, I give up and start over from scratch. It can often be faster to write it from the beginning than to find a subtle error

posted by inkyz at 9:25 PM on June 12, 2013