Skip to content
Back to formatted view

Raw Message

Message-ID: <1344046448137-4639145.post@n4.nabble.com>
Date: 2012-08-04T02:14:08Z
From: David Arnold
Subject: Head or Tails game
In-Reply-To: <356463E1-2506-43B6-A99B-CA26F9DAA829@comcast.net>

David,

set.seed(123)  # always good to make reproducible 
winnings <- sum(sample(c(-1,1), 10000, replace=TRUE)) 

Unfortunately, that's not the game. The game requires 40 flips of a coin.

Then you have to play the game 10,000 times.

D.



--
View this message in context: http://r.789695.n4.nabble.com/Head-or-Tails-game-tp4639142p4639145.html
Sent from the R help mailing list archive at Nabble.com.