Le 4 mai 2021, la plateforme Yahoo Questions/Réponses fermera. Elle est désormais accessible en mode lecture seule. Aucune modification ne sera apportée aux autres sites ou services Yahoo, ni à votre compte Yahoo. Vous trouverez plus d’informations sur l'arrêt de Yahoo Questions/Réponses et sur le téléchargement de vos données sur cette page d'aide.

Ben
Lv 6
Ben a posé la question dans Science & MathematicsMathematics · il y a 1 décennie

Another coin problem: a super-fair coin making patterns?

Here's the follow-up I promised to:

http://answers.yahoo.com/question/index;_ylt=AjUPi...

You'll want to refer to an old question of mine:

http://answers.yahoo.com/question/index;_ylt=Ah9xL...

http://tech.groups.yahoo.com/group/mathforfun/mess...

Basically, we have a coin which, given that we've tossed it n times and gotten X heads, the probability for heads in the next toss is 1-X/n (and p=1/2 in the first toss).

It's been shown that, for n tosses, X has a distribution that follows

Pr(X=x) = E(n-1,x-1)/(n-1)!

for n>=2, x=1, 2, ..., n-1 and is zero otherwise. Here E(n, k) is an Eulerian number:

http://en.wikipedia.org/wiki/Eulerian_numbers

However, that may not be too useful here, as I care about sequences.

In sync with the previous few coin questions here, I want to know this: If we flip the coin until the combination THT or TTH shows up, which sequence is more likely to be the end of our coin flipping?

Mise à jour:

I am equally disappointed...from what I've done though I'm not sure that one exists (or at the very least it shouldn't be easy). I have a backwards recursion, but since I need to recurse backwards from infinity, I don't really have anything.

:)

BTW, are the numbers 52500 and 47500 actually the averages you arrived at, or did you round for convenience? It would be remarkable if they actually came out to even hundreds...I suppose I could create my own program, but I'll make you work for your 10 points.

2 réponses

Pertinence
  • Dr D
    Lv 7
    il y a 1 décennie
    Réponse favorite

    While everyone thinks of a theoretical approach, let me just give the results of a monte carlo simulation of this.

    Over 100,000 trials, I'm getting on average that THT ends the sequence 52500, while TTH ends it 47500. The ratio is approximately 1.11.

    *EDIT*

    I'm surprised no one else is answering. I'm really interested to know if an analytical solution exists for this problem.

    *EDIT*

    No I rounded those values. Of course with monte carlo simulations, you'll never get exactly the same answer twice. At least with mine, the best you can do is average over numerous trials. But to 2 decimal places, the ratio is roughly 1.11. If we take that as 10/9, then that gives P(THT) = 10/19 and P(TTH) = 9/19. But it's hard to say for sure those are exact values. I doubt it.

    Here are some results I got. Based on 1,000,000 trials, I'm getting that THT ends the sequence 525,245 times.

    So let p = prob that THT ends the sequence.

    We may say that

    p^ = 0.525245

    p ~ N(p^, p^q^/n)

    A 95% confidence interval for p would be

    0.525245 ± 9.788x10^(-4)

    or (0.524266, 0.526224).

    0.5 is over 50 standard deviations away from 0.525245.

    So I think it is safe to conclude that THT definitely has a higher probability of ending the sequence than TTH.

  • Anonyme
    il y a 5 ans

    After your initial pertabations, it will quickly converge into a normal guasian curve. Remember that the 'normal' standard deviation varies with 1/sqrt(n). Once you get big n's it won't matter. For example, at 1000 flips, we would expect an s.d of 16 or 500 +/- 16. At that point, using your 'fair' coin, if you were one s.d. out, your odds would only be (1-484/1000) or .516. In other words, you are only marginally more likely to flip a head v. a tail. It would barely change your percentage. At 100, the sd would be 5, and if you were one sd out, your precentage using the fair coin would be .55 At 10, the sd would be 1.6 and your percentage using the fair coin at one sd out would be .66 In other words, your coin would be very self correcting initially, but as you go out it would resemble a normal gausian curve. _______________________ Edit: Having pondered this, I think I am wrong. It never converges to the standard gaussian curve. It is narrower. In the above-case of 1000 tries, if the coin flips were off by one sd ~16, your function would change the odds to .516, which means that in another 1000 tries, if the odds stayed the same, the mean would be 516, i.e. your expected answer would center on 1000 instead of 986. You can show this for all number of tries and all deviations. My guess is that it would cause the gausian curve to become uniformily narrower by some factor such 2 or sqr 2, or maybe 3 as suggested by John C, above. I will give it some more thought. _________________________ In the interest of science, I did 250 runs of 1000 flips on an excel spreadsheet. Avg: 500.16 sd: 9.33 variance: 87.05 3 looks like a good number (i.e. 1/3rd variance of a regular coin flip, 1/sqr(3) s.d.) ........................... I find it interesting that a random walk appears to be balanced exactly by a 1/r field such that it (appears to) always be narrower by 1/sqr (3) than an regular distribution. Great question.

Vous avez d’autres questions ? Pour obtenir des réponses, posez vos questions dès maintenant.