Big numbers are not scary

Because they’re still numbers. You’re scared of them because you’re not used to seeing them on a regular basis.

The recent announcement of the US public debt being in the neighbourhood of 14+ trillion had caused some waves. You can relate with 0 to 20 easily. You can count reasonably well to 100. You might even be fairly good at handling numbers of up to 10 grand.

But a trillion? Your hands start to sweat.

People’s reaction to numbers seem to increase with the magnitude of the numbers, particularly if there’s a dollar, pound or yen sign attached to it (or any other monetary sign).

Well, the numbers are just going to grow. The earth’s population is going to grow. From what I understand, debt (not just that of US) will continue to grow (it has to, to keep the economy growing. It has to do with international borrowing or some such. Hey, I’m not an economist). The size of your computer’s storage capacity will grow.

So deal with it.

When I heard about the US public debt amount, I was only mildly surprised. I think it has to do with my exposure to numbers. And not just because I have a background in maths. Look, my first job had me looking at data that are 7 or 8 figures. And they’re of debt. I got quickly blasé about millions of dollars (of debt no less) within a month or two.

Then somewhere down the line, I was associated with a million dollar deal, of which I was tasked to create a website for a customer. And the crux of the deal seemed to hinge somewhat on my website. I had to design the website’s look (Ha! Me! Web designer!), craft a good login system, write it for security (because the website’s public), deal with SSL certificates, map the public web URL and the private subdomain IP address (oh networking stuff!), make it look somewhat like the competitor’s (because the sales team convinced the customer to switch providers), design the backend database, write the programs that will feed the database all of the transactional data (and plan the schedules for running the programs). Basically, almost everything technical, that’s me.

Oh and I had to do it within 1 month (it was the holiday December season too). Because that’s how long the sales team gave me for when the customer wanted it done. And I did it, even as I managed to handle tasks given to me by my ex-manager (long story) as well as my own tasks. And I still managed to do tech support. “The network is not working.” I went and checked, and plugged out the LAN cable, blew off any dust, plugged it back in, and the network’s back on. I’m not kidding.

Where was I?

That million dollar contract website also had to handle millions of satellite call transaction data. You see a million here, a million there, and suddenly big numbers aren’t so scary.

Then there’s the fact that my salesperson brother tells me stories about his work and customers. His company has a VIP pass that you can have only if you spent more than 600 grand a year. This means you’ll probably have spent upwards of, if not more than, a million dollars a year at the store. My brother has a personal sales target of over a million dollars a year.

My point isn’t to be insensitive to big numbers, even financial ones. The point is to not be scared of them. Fear is crystallised when you can find words to describe it. It’s even worse when fear can be numerically measured.

As my maths professor once said, “Keep cool and calm” on the subject of solving a nasty problem. “Then just do it.”

Negative sales targets and percentage commissions

A while ago, I received an email from a distraught salesman. He believed his sales commissions were wrongly calculated, and asked me to shed some light.

Note that I’m not using the exact numbers he gave in his email.

The story goes that Michael (as I’ll call him) and his colleagues were given sales targets that were negative. How could sales targets be negative? Shouldn’t you be trying to sell something? The reason given was that the current economy was disastrous, and basically each sales person was trying to not lose sales.

You’re gonna bleed. It’s how much you bled.

Anyway, given Michael’s negative sales target, he managed to exceed it. He didn’t manage to bring in sales (positive sales numbers), but he didn’t lose too much money (slight negative sales numbers). But his sales commissions didn’t reflect that.

Now I’m not going to discuss how that works out. I can’t presume to understand the business logic behind the sales commission in this case, but I’ll discuss the mathematics behind the numbers.

The normal sales targets and commission

Let’s say your sales target for this month is $1000. This means you’re expected to sell about $1000 worth of products or services. We’ll ignore the condition that you will get some commission based on what you sell, regardless of how much you sold (my brother’s a sales person), as well as other types of commissions.

Let’s say the sales commission is based on how much extra you sold beyond your sales target. Makes sense, right? Let’s use simple percentages.

If you sold $1100 worth of products or services, then your percentage commission might be calculated as follows:
(Difference between Your Sales and Your Sales Target) / (Your Sales Target)

Or ($1100 – $1000) / ($1000) = 10% commission.

This is assuming that your sales amount exceeded the sales target, of course.

The case of negative sales targets

Now if the sales target is negative, as in Michael’s case, the mathematical formula still applies. But you have to note the negative sign. For some reason, “business” people (no offense to business people) tend to see -4567 as larger than 12, even though 12 > -4567. They see the magnitude first, not the value itself. (It’s also why I get emails about calculations involving negative numbers… anyway…)

Let’s say the sales target is -$1000. Everyone’s expected to lose money, but you try not to lose more than $1000. At least that’s what I’m interpreting it as.

Let’s say Michael managed to lose only $50. Or -$50 to be clear. The formula
(Difference between Your Sales and Your Sales Target) / (Your Sales Target)

have to be modified to this
(Difference between Your Sales and Your Sales Target) / (Magnitude of Your Sales Target)

In maths and programming terms, the “magnitude” part refers to the absolute function. Meaning you ignore any negative signs. Actually, the modified version works for the normal case too (which is why you should use it for the normal version anyway to take care of weird cases like this but I digress…).

So, we get (-$50 – [-$1000]) / abs(-$1000) = $950 / $1000
= 95%

Actually, you should use this:
abs( [Your Sales] – [Your Sales Target] ) / abs(Your Sales Target)

That’s the “foolproof” version. Consider it a bonus for reading this far. Frankly speaking, any competent programmer should be able to come up with that formula, even without much maths background. You just need to think about the situation a little carefully (ask “what if?” more often).

Michael’s calculated commission

When Michael wrote to me, he said his commission was calculated as follows (given that he only lost $50):
-$50 / -$1000 = 5%

Let’s say someone else lost -$900 that month. With the above calculation, that person gets:
-$900 / -$1000 = 90%

Clearly it makes more sense to lose more money! This was why Michael wrote to me.

I don’t propose the method I gave is correct, business-logic-wise. Michael didn’t give me any details on what he’s selling, or what his company is (or even why it’s acceptable to have negative sales targets, regardless of the economy). So I cannot give any help other than from a pure mathematical point of view. But I hope it’ll at least give Michael a fairer commission amount.

Questions

Given Michael’s situation, what do you think is an appropriate calculation formula?

Can you think of (or know of) a realistic situation where a negative sales target is acceptable? I say “acceptable”, but seriously, no company should “accept” that they lose money every month.

Colour of numbers

I was mucking around in my image editor (Paint.NET) because I was doing some CSS colour editing. While I was playing around with the HSV of the colour, I saw this in the RGB box: 314159. You know what that reminds me of? PI. No, not that pie, PI! Great, now I’m hungry…

So I wondered what numbers would look like if they had colours.

First, we have PI as 3.14159 (ratio of a circle’s circumference to its diameter)
Colour of PI

Then we have the constant e, 2.71828
Colour of e

Fibonacci and his sequence also make an appearance: 1, 1, 2, 3, 5, 8 (13, 21, 34, …)
Colour of Fibonacci sequence

We also have the golden ratio, 1.61803. It’s also the limit as the (n+1)th term divide by the nth term in the Fibonacci sequence.
Colour of golden ratio

For some reason, I remember the Avogadro constant, even though I don’t do chemistry or physics anymore… It’s 6.02214179 x 10^23. Yes, it’s a big number… The colour also reminds me of bromine gas, which is reddish-brown in colour. Wait, how come I still remember these things?
Colour of Avogadro constant

Here’s an interesting one. Absolute zero is the theoretical temperature where everything barely has energy. It’s defined as 0 Kelvin, and is equal to -273.15 degree Celsius. And you thought ice at 0 degree Celsius was cold…
Colour of Absolute Zero

Financial reports must be untouched by human hands

People handling billing or financial data are usually very uptight. Especially when it comes to numbers. If you thought mathematicians, statisticians or economists were protective of their numerical figures, go talk to someone who works in the financial department.

PI is an elegant number. It goes to about 3.14159265, and describes the ratio of the circumference of a circle to its diameter. It doesn’t mean much to a finance person though.

But the bits have mercy if their report shows that there’s a $3.14 missing.

Sometimes, in the course of my work, I get requests to dump data from the database. Well, more like generating ad-hoc reports based on whatever was needed. Excel seems to be the preferred output format, since it displays all the data in nice little columns and rows. And let’s face it, the user is probably more skilled in Excel macros and functions than you and I are. Let them do their little calculations and predictions and pie charts, I say.

But noooo… Finance people will have none of that.

“I cannot manipulate data.” was the usual answer.

Wait, when I churned out those data, wasn’t I manipulating data, of sorts? I was doing SUMs, GROUP BYs and ORDER BYs with the database queries. If the user wanted a sum over that particular column, and I didn’t provide it, just use the inbuilt Excel sum function.

“Oh no, I cannot manipulate data.”

Apparently, whatever financial reports must be completely generated by the computer. All financial reports must be untouched by human hands. Let’s hope you got that algorithm right. Wait, aren’t you human? Would that mean the reports went through human hands?

“The numbers don’t tally!” – a serial counting problem

Boy in shock

How many numbers are there from 7 to 26 (both inclusive)? How do you calculate your age?

Both solutions require you to count from one number to another. And if you’re quick-witted, you might have deduced that a subtraction shortens the process considerably. However, be careful of how you subtract.

For the first question, if you take 26 – 7, you get 19. But there are 20 numbers:
7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26

For the second question, you simply take the current year minus the year you were born in (let’s leave the exact months out of this). So I’m born in 1977, and as of this writing, it’s the year 2009, so I’m 2009 – 1977 = 32 years old. Which is correct. Wait, did I just tell you my age?

The army equipment

I’m going to relate to you an incident which happened when I was enlisted in the army. No it’s not a war story. It is, surprisingly, a counting problem.

I was a lowly private then, assigned to the store to help. On a particular day, the lance corporal I was helping was making sure of equipment stock. Basically ensuring that the stock number of a piece of equipment on paper, physically reflects the stock number of that piece of equipment in the store.

We took down all the (communications, I think) equipment down from the racks, and placed them neatly on the floor. Since the racks were now empty, we might as well clean them (army efficiency…). After that, the lance corporal and I started to count the equipment on hand.

It was a while later, and I was counting my part of the equipment, when the lance corporal swore. He was pacing, and gesticulating, and his face was contorting in expressions of worry I’ve never seen before.

“You ‘A’ level right? The numbers don’t tally! Tell me what’s wrong!” *

The lance corporal had counted the pieces of equipment. It tallied with what was recorded on paper. Then he sorted them by serial number (there was one on each piece of equipment). Then he matched them with the serial numbers recorded in the system. It was correct too.

And because the serial numbers were in increasing order, differing by 1, he did the subtraction trick. And found to his horror of horrors that it wasn’t the number he counted! Hence his panic.

Let’s say the serial numbers were:
SERIAL0007
SERIAL0008
SERIAL0009

SERIAL0024
SERIAL0025
SERIAL0026

The records said there were 20 pieces of this equipment on hand. But the subtraction gave him:
26 – 7 = 19!

What went wrong?

The problem was, the lance corporal didn’t count the equipment with serial number SERIAL0007.

The age problem

Let’s look at the age problem again. Say there’s a baby born in the year 2000. Which year would the baby be 1 year old? 2001. Which year would the baby be 5 years old? 2005.

How is the age calculated? Take the current year minus the birth year.

It works, because the birth year is not counted.

Back to the serial numbers

In the case of the serial numbers, each serial number had to be counted in.

Serial numbers SERIAL0007 and SERIAL0008 means there were 2 pieces of equipment, even though
8 – 7 = 1

Thus, the number of pieces of equipment for serial numbers SERIAL0007 through to SERIAL0026 should be 26 – 7 (+ 1) = 20

Conclusion

A series of numbers is easy to count the number of its members. Just use subtraction.

Just be careful to note whether the start of the series have to be counted.

=====
* In Singapore, ‘A’ level refers to the GCE ‘A’ levels, commonly taken by students at around 18 years old. If one passes this, one can proceed to the university (generally speaking). And in Singapore, having a degree means a lot.

And young men with an ‘A’ level certificate entering the army may sometimes be viewed or referred to with a slight derogatory attitude, albeit lighthearted and with a fun undertone. And with their status sometimes pronounced as “air level”.

[image by Izmabel]