Monday 2 April 2012

NOTE: Explaining Precision

When teaching the SAS PRG3: Advanced Techniques and Efficiencies course, I always start section 2.2 Controlling Data Set Size with a slight amount of trepidation. My minor apprehension is due to the knowledge that the section includes a discussion on numeric precision. I'm confident that I know and understand the material, but I always find it's like explaining the rules of cricket to an overseas visitor!

There's always one or two learners who look at me like they don't believe it's not a SAS bug that "3 * (1/3)" doesn't precisely equal one.

Well, the next time that I teach PRG3 I shall do so with a tad more confidence because I've found a new ally in my battle to persuade my learners that it's a matter of computer science, not a bug in SAS. In Numbers great and small: the problem of Big Datum, Chris Hemedinger & Bill Brideson make a detailed and lucid explanation.

Accompanied by screenshots and plenty of links for reference, Chris & Bill's explanation knocked me for six when I first read it. And, if you're not on top of the rules of cricket, here's a brief explanation:
The Rules of Cricket as Explained to a foreign visitor
You have two sides, one out in the field and one in.
Each man that's in the side that's in, goes out, and when he's out, he comes in and the next man goes in until he's out.
When they are all out the side that's out comes in and the side that's been in goes out and tries to get those coming in out.
Sometimes you get men still in and not out.
When both sides have been in and out including the not-outs, that's the end of the game.
Howzat? 
The humorous piece of seeming nonsense above really does describe the game of cricket perfectly.