Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #5509 > unrolled thread
| Started by | Sseziwa Mukasa <mukasa@gmail.com> |
|---|---|
| First post | 2011-10-07 09:10 +0000 |
| Last post | 2011-10-07 09:10 +0000 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.soft-sys.math.mathematica
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: average of the consecutive coin tosses Sseziwa Mukasa <mukasa@gmail.com> - 2011-10-07 09:10 +0000
| From | Sseziwa Mukasa <mukasa@gmail.com> |
|---|---|
| Date | 2011-10-07 09:10 +0000 |
| Subject | Re: average of the consecutive coin tosses |
| Message-ID | <j6mflo$7n1$1@smc.vnet.net> |
Mean[RandomInteger[{0,1},{1000}]
Regards,
Ssezi
On Oct 6, 2011, at 4:18 AM, michael partensky wrote:
> Hi.
>
> What are the better ways of doing what this guy does very inefficiently for
> the average of the consecutive coin tosses:
>
> tr = (flips = 1; (#/flips++) & /@ Accumulate[Table[toss, {1000}]]) // N);
>
> where
>
> toss= RandomInteger[];
>
> Thanks
> Michael
Back to top | Article view | comp.soft-sys.math.mathematica
csiph-web