Not much happening around the nest this week to report. Call volume was down some so this is as good a time as any to do some discussion on rounding as that is a big topic of work this week.
Rounding
What is the bid deal right? Well the big deal is this can significantly change your answers and there are different methods of rounding that may provide the user with unexpected results.
When to round?
That answer is simple. Only round at the end. DUH! Well that is great if you can do all your math at once or you don’t need to see intermediate steps. Most spreadsheet programs will show you what we will call “soft” rounded numbers. it is just a visual representation but the math will take place with the full result. But what about things not spreadsheets. One such example is SQL. It is very possible that the user may need to create a query that shows volume by species and then another that shows total volume. there are 2 approaches.
- create a query that summarizes the species
- create a query that summarizes the total from the species summary.
Not a big deal right? Again correct because the SQL queries will use all of the numbers returned. but what can happen is the user will want to make the species values look good and will insert a ROUND(,) to make the resulting values look good. After all the user will plan to use this multiple times no sense reformatting every time right. WRONG. Now the user is left with a “hard” rounded number. There is nothing after the rounding precision for the next summary to work with. So if the user then summarizes these rounded numbers and rounds those for the final result the answers WILL be different than just getting a summary based on the raw data with no rounding.
So just remember not to introduce compounding error by rounding at the intermediate steps.
Just a quick note on rounding methods. There are several.
- Truncation
- Doesn’t matter what is after the decimal just lop it off.
- 4.1 = 4
- 7.9 = 7
- Floor
- Basically the same as truncation. The system always rounds down.
- Ceiling
- The opposite of floor. This always rounds up.
- Round 5 up
- This is what most people typically think of for rounding.
- Round every other 5 up
- Some programs and procedures call for this. It is a statistical thing. For the most part don’t do it. Besides if the software doesn’t do it natively it would be difficult to implement.
While some may not consider some of those rounding varying software can use them. This is also a good time to introduce the terms.