domingo, 21 de octubre de 2007

Random average ¿?

One day, I just thought of what the average of n numbers would give. What I thought first was that there would be no constant average thus there were random numbers, but when I did the experiment I prove myself to be wrong. I still dont know exactly the reason, but as I remember of my probability course it had to be something regarding all possibilities contained in the gauss bell.
So, the list of random numbers where possibilites not repeated inside the bell. So the Average had to be the middle of the bell; 0.5
It is a interesting thing I guess, you can try it! Just fill out n random numbers in excel and take the average of it and you'll see!!

Talking to a friend of the experiment, he found it quite courious. He then sujested me to try it with PI decimals. It bump me again the couriousity and I made a simple C++ program to see what was the result. I first needed to find a quite big amount of PI decimals(which is also of great interest of me, but still havent do it) so I downloaded a list from this page http://www.uoguelph.ca/zoology/devobio/210labs/MeiosisQuiz/pi.html which has about 100,000 decimals.
I didnt like quite much the result. I got as a result 4.49 and with a 2.87 variance. I guess if more PI numbers are introduced the average would tend to 5, but not quite sure!

With the help of my friend, he made used the Matematica software and created the following graph using 1000,000 digits of PI.This proves that it tends to 4.5 which if you analize it, it is the mean of 0-9 not 1-9(which is 5).

If you want to try it, here is the code.
(oops the variables are in spanish! sorry..!!)
mhmmmm couldnt upload the code,, if you need it,, i'll send it to you!
sorry!

2 comentarios:

elzr dijo...

Great! I read back about the Central Limit Theorem and if you assume that every pi digit is a random, independent variable, then it states that the average will tend to 5.

It's amazing how it took my getting independently interested in one of its instances for me to finally internalize a theorem that everyone claimed to be the cornerstone of probability theory. The only learning is self-directed learning...

elzr dijo...

Oh btw, I remembered I once did a similar "test" of randomness, in C++ to boot. The result was this graph.