MathGroup Archive 2013

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

Search the Archive

Re: tossing a coin

  • To: mathgroup at smc.vnet.net
  • Subject: [mg130946] Re: tossing a coin
  • From: michael partensky <partensky at gmail.com>
  • Date: Tue, 28 May 2013 04:15:49 -0400 (EDT)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • Delivered-to: l-mathgroup@wolfram.com
  • Delivered-to: mathgroup-outx@smc.vnet.net
  • Delivered-to: mathgroup-newsendx@smc.vnet.net
  • References: <20130526090801.381E86A52@smc.vnet.net>

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 at 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
>




  • References:
  • Prev by Date: Re: Silly question on how to insert sections, subsections and etc. on
  • Next by Date: Re: How to extract from list
  • Previous by thread: tossing a coin
  • Next by thread: Re: tossing a coin