MathGroup Archive 2011

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: average of the consecutive coin tosses

  • To: mathgroup at smc.vnet.net
  • Subject: [mg121962] Re: average of the consecutive coin tosses
  • From: Jonas <coroa at online.de>
  • Date: Fri, 7 Oct 2011 04:48:51 -0400 (EDT)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • References: <j6jobf$lv7$1@smc.vnet.net>

On Thu, Oct 06 2011, michael partensky wrote:

> tr = (flips = 1; (#/flips++) & /@ Accumulate[Table[toss, {1000}]]) // N);
>

Accumulate[RandomInteger[{0,1}, 1000]]/Range[1000] // N

should do the trick.




  • Prev by Date: Re: Find a single solution to a system of equations
  • Next by Date: Calendar Info
  • Previous by thread: Re: average of the consecutive coin tosses
  • Next by thread: Re: average of the consecutive coin tosses