August 12th, 2014, 05:02 PM  #11  
Senior Member Joined: Oct 2013 From: New York, USA Posts: 623 Thanks: 85  Quote:
Quote:
Using a random number generator for numbers from 1 to 3 with 3 being an S, I got 37 S out of 100 numbers. Therefore there were 63 D, which is enough for 12 trials, with the last 3 D and any S with them ignored. Counting four consecutive S as two sets of three and five consecutive S as three sets of three, I got 6 sets of at least three consecutive S from 12 trials, which is 0.5 per trial, which is much higher than the probability.  
August 12th, 2014, 05:32 PM  #12 
Math Team Joined: Dec 2013 From: Colombia Posts: 7,512 Thanks: 2514 Math Focus: Mainly analysis and algebra 
You shouldn't count sets of 3 consecutive S, but rather trials containing a set of 3. My point earlier about fours was to highlight that a set of four contains a set of three.

August 12th, 2014, 05:34 PM  #13 
Senior Member Joined: Oct 2013 From: New York, USA Posts: 623 Thanks: 85  
August 12th, 2014, 06:04 PM  #14 
Math Team Joined: Dec 2013 From: Colombia Posts: 7,512 Thanks: 2514 Math Focus: Mainly analysis and algebra 
I've just run 10 million trials, of which 1,718,259 contained three consecutive draws. Code: use constant S => 1/3; use constant D => 1  S; use constant T => 100000000; use constant G => 5; use constant C => 3; my $t = 0; while ( $t < T ) { my $g = 0; my $c = 0; while ( $g < G ) { if ( rand() < S ) { $c++; } else { $c = 0 if $c < C; $g++; } } $t++; $s++ if $c >= C; } printf STDOUT "Trials: %10d Games per Trial: %2d P(Draw): %1.3f Consequetive Draws Sought: %2d\n", T, G, S, C; printf STDOUT "Trials Completed: %10d Trials Counted: %10d\n", $t, $s; Code: Trials: 10000000 Games per Trial: 5 P(Draw): 0.333 Consequetive Draws Sought: 3 Trials Completed: 10000000 Trials Counted: 1718259 Code: Trials: 100000000 Games per Trial: 5 P(Draw): 0.333 Consequetive Draws Sought: 3 Trials Completed: 100000000 Trials Counted: 17195001 Last edited by v8archie; August 12th, 2014 at 06:19 PM. 
August 13th, 2014, 03:00 PM  #15 
Senior Member Joined: Oct 2013 From: New York, USA Posts: 623 Thanks: 85 
Well 1,718,259 is close to the expected value of 1,719,665.

August 13th, 2014, 03:34 PM  #16 
Global Moderator Joined: Nov 2006 From: UTC 5 Posts: 16,046 Thanks: 938 Math Focus: Number theory, computational mathematics, combinatorics, FOM, symbolic logic, TCS, algorithms 
Yes, my original Monte Carlo of 10 million came to a similar number.


Tags 
paper, probability, question, rock, scissors 
Search tags for this page 
Click on a term to search for related topics.

Thread Tools  
Display Modes  

Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Finding the total energy of a rock  PlzzHelp  Physics  4  April 13th, 2014 02:07 AM 
Printing paper  Yvan  Advanced Statistics  3  October 16th, 2013 11:53 AM 
Paper Size  Cola  Algebra  4  October 21st, 2008 05:31 AM 
Differentiation exam paper question  Mediocre1981  Calculus  4  August 29th, 2008 01:58 PM 
the paper  bigli  Real Analysis  3  May 22nd, 2007 11:00 AM 