Showing posts with label life. Show all posts
Showing posts with label life. Show all posts

Sunday, December 1, 2013

Life and the Central Limit Theorem - An asscociation made in mathematical heaven

Too often in life we tend to generalize and associate individual behavior with the behavior of a group. Many of our social biases stem from such a tendency and what we fail to appreciate is the wonderfully complex world we live in.
The Central Limit theorem is one of those beautifully constructed mathematical models that seek to bring about a semblance of order in a chaotic world. In its simplest formulation, it provides a way of visualizing the behavior of seemingly random events. It essentially is a mathematical model of life, a life that involves a myriad of possibilities, a plethora of possible outcomes - some good some bad.
The simplest demonstration of this theorem can be obtained by the roll of an unbiased dice. If we roll one dice then at every roll we can land up with any of the six numbers from 1 - 6 and the probability of occurrence of any of these digits is the same and equal to 16.66%
However, if we now roll two dice and evaluate the sum of the digits that show up then the total number of possible outcomes goes up to 11 with the probability of a 7 showing up now being the highest. The probability is not longer uniformly distributed. This is because 7 can show up as a result of the following combinations
1 - 6
2 - 5
3 - 4
4 - 3
5 - 2
6 - 1

If we start rolling more dice simultaneously and repeat the analysis, the distributions creeps closer and closer to a normal distribution yielding the simplest demonstration of the theorem. I have coded the algorithm for evaluating this in a spreadsheet and it is available here and you can try it out. The only input required is the number of dice that you want to roll together and hit "Calculate". The code evaluates the total number of outcomes possible and then then probability distribution is plotted.
Caution: Owing to the mathematical complexity of evaluating the total number of combinations which rises exponentially with larger number of dice, do not input more than 6 as it is likely to crash your PC ( if its a 32 bit CPU). If you have a 64 bit processor then you can try a bigger number

PS: Code could have probably been written to use recursion but got lazy and hence relied on mathematical jugglery.
Case 1: When one die is used. Number of possible combinations and outcomes is 6



Case 2 : With two dice the number of combinations is 36 and outcomes is 11


Case 3: With 6 dice the number of combinations is 46656 and outcomes is 31


The moral is that a lot of unrelated events can still lead to something that is so wonderfully symmetric and this applies to more aspects of our lives then we care to think about. From the noise that affects electronic circuits (Additive White Gaussian Noise) to how the marks/ratings will be distributed among a random selection of individuals to why individuals in a group behave differently than when alone ( Mob psychology), patters of behavior and data are often more relevant than individual behavior.
As individuals we make choices but given the random nature of individual choice, the outcomes follow a Gaussian distribution which we unwittingly contribute to. Extreme cases of success and failure are the outliers on this curve while humanity's choice as a whole is the mean. Making choices closer to the mean would imply a higher probability of favorable outcome but if everyone does it then it takes away the importance of individual choice.
Neo : "Choice, the problem is choice." - Matrix

Friday, March 25, 2011

Realization

Life is replete with misery
Death bathes in peace
Isin't love of life therefore
Like loving a dreaded disease.
Compared to sorrow, the joys of life
Are minuscule by far.
Yet we savor the insignificant delights
Etched in memory, standstill as the Northern Star

All this is an illusion
Everything that we see
It may please our senses
But the truth it can never be
Life after death!
Could Death deal me such a blow
It ends life - it must!!!
True peace, how else shall I know?

NOTE: Written when I was probably pretty depressed.. no idea when

Life to Me

Life to me is a gushing stream
Neither bliss nor a dream.
It flows on without rest
Our patience and perseverance it does test.
I cannot define what life is
But, I only this
That I must toil day and night
And try with all my might..
People die but no one cares
Even at a dead body no one stares
Even I will die: that I know
But before I die and go.
I will leave my mark on the mind of man
And then to forget me who can.

NOTE: Written by me sometime around when I was 15 years old

Saturday, May 2, 2009

Life - The stochastic model

I have often wondered about the meaning of life and the existential questions. I have always drawn a blank. Big surprise eh? For some reason, I just cannot come to terms with the notion that life just "is" and there is no logical reason or higher purpose behind it. If everything in nature stemmed from a few basics laws then it ought to be possible to bring about some semblance of order in the nature of things. I fully understand the problem of algorithmic compressibility and I am not looking for a way to figure out the future. I have always loved mathematics and all my initial attempts at understanding the universe were inherently mathematical.

I pondered over the fact that cause and effect are interrelated and a finite number of causes should always lead to a finite number of effects. Thus, if it is possible to limit the set of inputs, the output set should also be bounded. Under this hypothesis, if I could narrow down the number of factors that can effect a situation I could hypothetically have a very good chance of finding the outcome. Seemed simple enough but turns out that nature is far more complicated. This hypothesis kept me busy for a while and I attributed my failures to the fact that I was not accounting for all the variables.

Enter Chaos theory. It gave me nightmares. It went completely against my understanding of mathematics but here it was. I coded a computer program on one of the equations and nearly wrecked my machine but it was there and it was undeniable. It just stated that a given input can result in a wide range of outputs which seemed essentially random in nature. My initial hypothesis went out the window. Closely associated with Chaos was the concept of fractals and that puzzled me for a while. My initial consternation gave way to curiosity and I started to feel that a deeper understanding was needed to get to what Chaos was all about. It soon began to seem that Chaotic equations did settle down into a "pattern" after a while and though they do not stabilise, they do remain bounded. There was still hope. If the universe is based on Chaos then it has had enough time to settle into a pattern and we should be able to figure out the bounds.

Then came probability and gate crashed my concepts. The mathematical probability struck me as wondrous. It seemed to say that you can try doing something once and it may work, try twice and it may work but try it a zillion times and you will fail "x" percentage of the time. It was a surprising result but it was true because it is verifiable. Could life indeed be a stochastic process? Modern science does treat it as so and so you will see percentages like children in Somalia have 70% chance of survival etc etc. Statistics such as this are a clear indication that there is a probability lurking around the corner. Probability of survival, probability of success... what else? It seems we are on the verge of a scientific and philosophical breakthrough. A point in our history where we realize that there are just too many decisions to be made and each decision has a certain probability of success. The number of choices we see before us are in turn a result of the choices made earlier. So that's cause and effect. After all this, even in spite of good decisions and sound judgement it is still possible to screw up courtesy Chaos.

Which now makes me wonder about the probability of probability describing life... Hmmm... maybe another day.

Friday, April 24, 2009

Eagles eye view

Wow! Its been a while since I have penned down my thoughts. Probably because I havent "really" had any thoughts. Of late life has been just a roller coaster ride.. its been fun but hardly the kind of ride where you get to appreciate anything but the speed and the twists and turns.
My initial thought was to pen down the highlights of the past two years but the more I think about it the more pointless it seems. Which brings me to a more important question..
Is there a level of abstraction of looking at life that can make even living itself seem trivial?

The more life is looked at with a microscope the rougher it seems. People say that one should learn to laugh at oneself. People also say that learn to forgive. What is the common theme behind these age old tenets? Isint it the fact that they preach abstraction. If one can look at ones life from a vantage point seperating the event from the subject and the perpetrator then would the world be a better place to live it?

For instance, if someone pours a bucket of water on you when you are sleeping. You are bound to be angry. Why? Because YOU have been woken up, YOU are cold, YOU are wet and hence YOU are angry. Watching the same chain of events unfold for a stranger on television would elicit anything but anger.. strange isint it? Just seperating the event from the subject (YOU) turns a potential conflict into a script from a comedy flick. The pertinent question is how high can this level of abstraction go. Global warming, pollution, threat of nuclear holocaust.. on a tiny planet planet populated by simple minded savages.. a planet which rotates around an insignificant star in an insignificant corner of a galaxy.. a galaxy which is one of the billons probably teeming with life.

Does this mean that all our worries, pains, strive for perfection, our affections, our afflications are all inconsequential in the larger scheme of things? Maybe they are. However, if everyone stops reacting then we will have world peace but would this be a world worth saving? Do I have a point to make? Yes I do and it has all to do with salt.

Salt! I like a bit more on my food but many dont. What has that got to do with world peace you may ask.. well the point is that there is a level of abstraction for everyone. It is not a global standard that can be defined. Even the best cooks cant estimate MY need for salt can they!
The fact is that the more you distance yourself from the nitty gritty details of life, the happier you will be but what level of distance you maintain has to be your decision alone. Once your BP hits the roof you know its time to move to the next level of abstraction.

Sunday, November 25, 2007

True Love

Few companions can as faith full be,
As mathematics has been to me.
In the earth, water and skies above
Its only her image that I see.

Started as someones bundle of joy,
Added all their values in my life.
Subtracted from their bank account
And marched down the road of strife.

Soon integrated the feeling of joyous love.
Life was linear. Unidimensional and Oh so cool!
But the differentiation of my cash and feelings
Left me stranded like a fool.

Few companions can as faith full be,
As mathematics has been to me.
In the earth, water and skies above
Its only her image that I see.

Found new equations and new ways to solve.
In the matrix of Life I was only at (1,1).
So with a fiery heart and iron clad resolve
Started the transformation. Listened to none.

The Work - monotonic and discontinuous,
Led to most limits being tested:
But the Asymptotic curve of patience
Kept the chin up and mind rested.

Few companions can as faith full be,
As mathematics has been to me.
In the earth, water and skies above
Its only her image that I see.

While the helical future spirals ahead,
Tumultuous thoughts I co ordinate.
This equation shall be solved yet
Even if I have to convert Boolean to date.

All experiences in life are Gaussian
The central Limit Theorem has been used.
Questions on life are many, I think of one;
Is it non linear, random or just confused?

Few companions can as faith full be,
As mathematics has been to me.
In the earth, water and skies above
Its only her image that I see.