Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #14653

Re: tossing a coin

From michael partensky <partensky@gmail.com>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: tossing a coin
Date 2013-05-28 07:45 +0000
Message-ID <ko1nbl$r31$1@smc.vnet.net> (permalink)
References <20130526090801.381E86A52@smc.vnet.net>
Organization Time-Warner Telecom

Show all headers | View raw


Dear Leigh. The first part of you statement is correct (assuming a fair
coin). Unfortunately, the second part ("The probability of one occurring
before the other is 50%") is a common misconception, one of many counter-intuitive features of  randomness. You can find a useful introduction here:
http://www.mathematica-journal.com/2011/09/betting-two-patterns-against-each-other/
 .

Even less intuitive could be the results for a  loaded coin. For example,
assume P(H)=0.6 and P(T) = 0.4. You might think that the bet on the pattern
HHH would always be winning relative to say THH, which happens to be false.

My question was about an elegant,  *Mathematica* style (preferably, without
Do, While) detection of the first occurrence of a pattern for (in general)
loaded (sorry, I forgot to mention this part in my question) coin. From
this discussion I hoped to learn more about the best practices of dealing
with patterns in sequences (my own experience is outdated), and hear some
thoughts on statistics of patterns.

Best,
Michael Partenskii




On Mon, May 27, 2013 at 4:45 AM, leigh pascoe <leigh@evry.inserm.fr> wrote:

> Le 26/05/2013 11:08, michael partensky a =E9crit :
> > Hi everybody!
> > Here is a classical problem:
> >
> > A and B take turns flipping a coin. H and T designate "heads" and "tails"
> > respectively.
> > Each of them chooses a pattern. Say, A picks HHTT and B picks HTHT (the
> > length of the fragment may vary). One wins if his pattern appears before
> > the pattern of his opponent.
> >
> > For any two patterns we have to find the answer *experimentally (by
> > producing many random sequences and computing the frequencies of wins)*.
> > What would be the most elegant way of detecting the first appearance of a
> > pattern ?
> >
> > Thanks,
> > Michael Partenskii
> >
> >
> >
> The probability of any given sequence is the same as any other,
> depending only on its length. The probability of one occurring before
> the other is 50%. I don't think you need Mathematica to solve this problem.
>
> Or did I misinterpret your problem?
>
> Leigh
>

Back to comp.soft-sys.math.mathematica | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

Re: tossing a coin michael partensky <partensky@gmail.com> - 2013-05-28 07:45 +0000
  Re: tossing a coin Felipe <fdimer@gmail.com> - 2013-05-30 10:08 +0000

csiph-web