**Big Numbers**

The first was my physics degree. Having taken the cosmology track of physics, my temporary world was of energetic particles ranging from a few electron volts (eV) through to relativistic energies of cosmic rays in the Giga Electron Volts.

(and these are proper Gigas, none of your Gibis masquerading as Gigas)

Obviously when dealing with these calculations typical results would look like 8.763E9 eV or 1.348E-6 metres, none of which it was possible to get a handle on. These are not intuitive ranges of numbers, they are well outside the "middle earth" range of values that we are used to.

So a given result, churned out of a lengthy calculation could be exactly right, or 1 or 2 or 5 orders of magnitude off. Who knows? unless you studied, which I didn't.

But that presented a problem, at the end of a calculation for a problem you had no way to intuit whether your answer was even plausible. Did you miss a Square root? what about converting that distance into a velocity? is the formula even correct? No way to tell, you just need a steady calculator hand and faith in your physics.

However, there was a method that was encouraged by the teaching staff, and is presumably standard in these realms which is the unit check.

The procedure is to duplicate your calculation, which is usually a messy collection of energies, velocities, c and other constants. However replacing all the nasty numbers with the units of that parameter.

For example c, the speed of light is in ms^-1

The gravitational constant is m^3kg^-1s^-2

Energy in kg*m^2*s^-2

Velocity, mass, time, distance are as you would imagine.

So something like the energy momentum formula

can be given in terms of its units;

and you can quickly cancel through the equation on both sides, ignoring scalar multiples to see that both sides match;

Typically the value of the procedure is to check that the value of the equation that you are using to find a velocity, is indeed in ms^-1 and not pounds per square foot etc.

Or that if you want a ratio that all the units have cancelled away.

**Binary**

Obviously having graduated and got a job, being a geek naturally I worked with computers, and at some point I decided to find out how they worked, hence principles of computing 101 with the Open University.

The first observation is that you are not going to be doing much binary arithmetic by hand. The second is that its all powers of 2, and no decimals, floating point numbers are for user-land.

**Probabilities**

Studying for an undergraduate Statistics course, and particularly taking the written exams involves a lot of crunching numbers on a calculator.

They want to see series expansions using geometric, binomial, exponential, mostly associated with probability generating functions, but also evaluating p.d.f.s at for some x, and converting between different representations.

But the obvious thing about statistics, is that if your answers comes out at 12.3 and you are looking for the probability that Barry and Lisa's third daughter has a double dominant BB genotype, then you need to go back and check.

So typically when the answer comes out at 1/16 or 0.234, you usually have got the right answer.

However in probability, there is an equivalent of the programming off by one error.

The off by one error is usually a result of an iteration like for(int i=0;i<=0;i++){} or using someone else's counter, and assuming its indexed at 1 or 0.

The probability equivalent is the p=1-q reversal.

The off by one error in programming is pernicious because it is easily overlooked, especially if its rare to complete the iteration to the top of the loop because of some next clause in the loop.

The p=1-q reversal in statistics is pernicious because, normally if the answer is between zero and one, then you got the right answer, job done, case closed, go to the pub etc.

Using sigmoid functions such as 1/(1+exp(x)) can squash all results down between (0,1) however normally in a set question, you are looking for some meaningful statistic so if you get the answer .9992323 you can normally assume you fucked it up. However the problem with p=1-q reversal, is that if p is sensible, say p=0.33, then q is sensible also, q=0.67

I guess the solution is to be a bit more careful :-)

## No comments:

## Post a Comment

Don't be nasty. Being rude is fine.