Free Republic
Browse · Search
General/Chat
Topics · Post Article

To: djf

% some lunch time matlab, at your service

>> heads = rand(100, 1e5)> .5; % 100,000 trials of coin 100 tosses

>> total_heads = sum(heads); % number of heads

>> mean(total_heads)

ans =

49.9962 % we expect about 50;

>> std(total_heads)

ans =

4.9998 % we expect about 5

>> lx =length( find(mean_x >=45 & mean_x <= 55));

%% “expected” number between 45 and 55
>> fprintf( ‘%20.0f\n’, sum( binopdf( 45:55, 100, .5))*1e5)

72875

%% experimental number between 45 and 55

>> fprintf( ‘%20.0f\n’, lx)

72523


21 posted on 03/19/2008 9:38:04 AM PDT by Lonesome in Massachussets (The women got the vote and the Nation got Harding.)
[ Post Reply | Private Reply | To 19 | View Replies ]


To: Lonesome in Massachussets; samtheman

OK.
I dusted off the cobwebs and slapped together a GWBASIC program.

It basically (ha, ha!) used the RND function to give me a random number, multiplied it by 100, took the integer part and added 1. I ran the rnd function through a few thousand iterations to make sure it never returned either 0 or 1, and it was cool.

Each of my “100 penny bags” constituted 1 trial, and there was a main loop driver so that I could dump the bag as many times as I wanted.

At the end of each trial, I took the LARGER of the number of heads or tails and added it to the total. This ends up giving me a number that represents the expected deviation from 50-50

results:
I did 3 runs with 1000 bag dumps and 1 run with 10,000 bag dumps
53.769
53.876
53.837

finally
53.996

Averaging these gives me about 53.855

So if our expected results were that 53.855 percent of matter was positive matter, and 46.145 percent of matter was antimatter, and all the stuff eradicated each other and left the excess, then we have:

7.71 percent of the mass left

that would mean 92.29 percent of the universe is composed of energy and neutrinos and whatever

The only thing I wasn’t sure of was that if it came up 50-50, it still got added in to the total. But if the universe started 50-50, we wouldn’t be here. So I am not sure how much that might skew the results, but I can play with it a bit more if I get ambitious.


25 posted on 03/20/2008 1:09:59 PM PDT by djf
[ Post Reply | Private Reply | To 21 | View Replies ]

Free Republic
Browse · Search
General/Chat
Topics · Post Article


FreeRepublic, LLC, PO BOX 9771, FRESNO, CA 93794
FreeRepublic.com is powered by software copyright 2000-2008 John Robinson