My musings are pretty random anyway, so here’s some musings on randomness.

Most people have an inkling of what the word ‘random’ means, but if you try and tie it down, it proves to be a concept that is difficult to define. OK, let me start with a dictionary definition from Dictionary.com:

Lacking any definite plan or prearranged order; haphazard

That’s just one of many similar definitions of ‘random’ to be found at Dictionary.com. But hang on a minute – isn’t having no definite plan a plan of sorts. We can imagine Mad King Wotzit from Philopotamia talking with his generals. “Look, we don’t know where the enemy is, and we don’t know many of them there are, and we don’t know if they have muskets, so the plan is to go ahead with no plan and react to circumstances as they arise. Are we all agreed?”

I don’t think that definition is strong enough. We often proceed without a plan, but not randomly, and the obstacles in our way may appear haphazard but there will be a reason why every single one exists.

Randomness for a mathematician, a statistician or a philosopher is something deeper. Take, for instance, the tossing of a coin. It may come down head up or tail up and there are no other options (if we declare the case where it lands on its edge as a no throw). So a sequence of throws could go H, T, T, T, H, T…..

The critical thing is that any toss doesn’t depend on any of the previous tosses, so it has a 50% chance of being heads and 50% chance of being tails. If we have tossed the coin one million times we would ‘expect’ to get 500,000 heads and 500,000 tails, but, if fact we may get 499,997 heads meaning we tossed a tail 500,003 times. The average number of heads we would get if we did this a number of times would be very close to 500,000, but it might, by chance, be several hundred away.

Suppose we had thrown the fair coin a million times and we came up with 499.000 heads and 501,000 tails, and we continue for another million tosses. Should we expect more heads this time, so that the average comes out right? I believe that it is obvious that if the coin and tosses are fair, then we cannot tell before hand if the gap between heads and tails would close or get wider. The second million, like the first million will result in about 500,000 each heads and tails.

One-tenth penny coins from British West Africa, dated 1936 and 1939. (Photo credit: Wikipedia)

Nevertheless gamblers waste their money on the belief that the odds will even up over time. This is therefore known as the Gambler’s Fallacy.

But how do you know if a real coin, as opposed to a theoretical coin is fair. Well, you test it of course. You toss the coin, say 1,000,000 times and see if you achieve 500,000 heads and 500,000 tails. If you get 500,000 heads or near that number, you can say that the coin is ‘probably fair’. What you can’t say, of course, is that the coin is ‘definitely fair’ as the coin could be a dud, but still produce, by chance, the result that a fair coin would.

In addition a real coin is subject to physical laws. Given the starting conditions of the flip, and given the laws of physics, a tossed coin behaves deterministically, resulting in only one possible outcome for the toss. So the toss is not random as people usually use the term. Calculating what the result might be will likely forever be impossible though.

Do things happen randomly? I don’t believe that real events can be random. If an event is truly random it cannot depend on events that have gone before, because otherwise it would be, in principle, be predictable from the earlier events. The real events that come closest to being unpredictable are decay events and other events at the quantum level, but even there the outcome is fixed, and only the time that the event happens is variable.

Computer science requires randomness for various purposes, most notably for generation of keys for ciphers for encryption. However the numbers that are generated are not truly random, but involve some heavy computation with very large integers. Encrypted information requires decryption, which also requires some very heavy computational lifting. Often extra ‘entropy’ is added from mouse movements and key presses.

Computer and other physical random numbers can use physical sources such as cosmic rays or the decay of an unstable atom to seed the calculation of a random number. Both the cosmic ray count and the decay of an unstable atom appear to be random locally, but cosmologically both events are the result of the state of the universe and its history to that point in time which is deterministic and deterministic processes are the opposite of random.

I feel strongly that the universe is deterministic, and at a classical level this is almost indisputable, but at the quantum level things are not so clear and at our current level of understanding, I believe that it is correct to say that happenings at the quantum level appear to be only statistically predictable. I understand that this is not because of some aspect of quantum mechanics that is currently unknown. There are no ‘hidden variables‘. Some other way around this dilemma may be found, probably involving another way of looking at the problem.

Since the numbers generated by a computational process are not truly random, it is theoretically possible to crack the cipher and decode the message without the key. The numbers involved are so large that this would be extremely difficult and time-consuming using conventional techniques. Quantum computing techniques can theoretically be used to crack current classical encryption schemes.

Mathematical randomness is a totally different thing. Any finite number can be generated by many methods and if the method is known, then the number can’t be called random. This is the basis of a mathematical game where a sequence of numbers is given and the next number is required to solve the puzzle. I don’t like these games because it is possible that two different algorithms may produce the required answer, and an algorithm could be imagined that gives an answer different to the ‘solution’. In other words there is not one unique solution.

This makes it extremely hard, if not impossible to decide if a ‘black-box’ algorithm (one where the working are unknown) is producing a random sequence of numbers. Beyond that point, I’m not going to go, as I do not have the knowledge, nor currently the space in this post, to make a stab at a decent discussion. Maybe I’ll come back to the topic.