Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

Just don't create a file called -rf. :-) -- Larry Wall in <11393@jpl-devvax.JPL.NASA.GOV>


tech / sci.math / daily puzzle: coin tossing

SubjectAuthor
* daily puzzle: coin tossingRichD
+* Re: daily puzzle: coin tossingJames Waldby
|`- Re: daily puzzle: coin tossingRichD
`* Re: daily puzzle: coin tossingChris M. Thomasson
 `- Re: daily puzzle: coin tossingRichD

1
daily puzzle: coin tossing

<8e48ad9b-19ab-463b-9a35-f8d1e41aea93n@googlegroups.com>

  copy mid

https://www.novabbs.com/tech/article-flat.php?id=148209&group=sci.math#148209

  copy link   Newsgroups: sci.math
X-Received: by 2002:ac8:5e0a:0:b0:412:8bb7:25a6 with SMTP id h10-20020ac85e0a000000b004128bb725a6mr101773qtx.4.1694716510794;
Thu, 14 Sep 2023 11:35:10 -0700 (PDT)
X-Received: by 2002:a05:6808:15a3:b0:3a7:78a6:17b8 with SMTP id
t35-20020a05680815a300b003a778a617b8mr2728822oiw.2.1694716510547; Thu, 14 Sep
2023 11:35:10 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!border-2.nntp.ord.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: sci.math
Date: Thu, 14 Sep 2023 11:35:10 -0700 (PDT)
Injection-Info: google-groups.googlegroups.com; posting-host=50.230.131.75; posting-account=x2WXVAkAAACheXC-5ndnEdz_vL9CA75q
NNTP-Posting-Host: 50.230.131.75
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <8e48ad9b-19ab-463b-9a35-f8d1e41aea93n@googlegroups.com>
Subject: daily puzzle: coin tossing
From: r_delane...@yahoo.com (RichD)
Injection-Date: Thu, 14 Sep 2023 18:35:10 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 13
 by: RichD - Thu, 14 Sep 2023 18:35 UTC

This one is hard.

You play a match, consisting of N coin tosses. You've
been suckered, because the coin is loaded, and your
chance of winning, on each toss, is p < .5
To win the match, you must win a majority of tosses.
You lose on a tie. Even money payoff.
You can choose N. It must be even. What number maximizes
your winning chance, as a function of p? (N = 0 is disallowed)
--
Rich

Re: daily puzzle: coin tossing

<uebbci$278o9$1@dont-email.me>

  copy mid

https://www.novabbs.com/tech/article-flat.php?id=148682&group=sci.math#148682

  copy link   Newsgroups: sci.math
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: no...@no.no (James Waldby)
Newsgroups: sci.math
Subject: Re: daily puzzle: coin tossing
Date: Tue, 19 Sep 2023 05:25:38 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 26
Message-ID: <uebbci$278o9$1@dont-email.me>
References: <8e48ad9b-19ab-463b-9a35-f8d1e41aea93n@googlegroups.com>
Injection-Date: Tue, 19 Sep 2023 05:25:38 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="efcb5ca75e48d2c0796d5b8c3fe676f3";
logging-data="2335497"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18a3hNwuow3eXShtWqKTcis"
User-Agent: tin/2.6.2-20220130 ("Convalmore") (Linux/5.15.0-83-generic (x86_64))
Cancel-Lock: sha1:HnC2yL+mH0PHQ2b5seZBIso22xE=
 by: James Waldby - Tue, 19 Sep 2023 05:25 UTC

RichD <r_delaney2001@yahoo.com> wrote:
....
> You play a match, consisting of N coin tosses. [...] your
> chance of winning, on each toss, is p < .5
>
> To win the match, you must win a majority of tosses.
> You lose on a tie. [...]
>
> You can choose N. It must be even. What number maximizes
> your winning chance, as a function of p? (N = 0 is disallowed)

I haven't worked through a sound mathematical approach to this problem,
but computationally it's easy to verify that the solution is to choose
N = 2+2k whenever k/(1+2k) < p <= (1+k)/(3+2k). For any p in (0,1/2)
there is a non-negative value of k satisfying this condition, as p
falls into intervals demarcated by 0/1, 1/3, 2/5, 3/7, 4/9, ..., for
which we choose 2, 4, 6, 8 ...

What makes it easy to verify is that values of the Bernoulli
distribution [Ref 1] are fairly easy to calculate. For a given value
p<0.5, let W_k = probability of a match-win if we choose N=2k, and let
B_k = probability of winning k tosses out of 2k. Then W_k = (1-B_k)/2,
and using k from formula in previous paragraph we can check if W_k is
larger than either of W_(k-1) or W_(k+1). [W_(k-1) not relevant if k=0]

[1] <https://en.wikipedia.org/wiki/Binomial_distribution#Probability_mass_function>

Re: daily puzzle: coin tossing

<uebcfn$27899$1@dont-email.me>

  copy mid

https://www.novabbs.com/tech/article-flat.php?id=148683&group=sci.math#148683

  copy link   Newsgroups: sci.math
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: chris.m....@gmail.com (Chris M. Thomasson)
Newsgroups: sci.math
Subject: Re: daily puzzle: coin tossing
Date: Mon, 18 Sep 2023 22:44:23 -0700
Organization: A noiseless patient Spider
Lines: 19
Message-ID: <uebcfn$27899$1@dont-email.me>
References: <8e48ad9b-19ab-463b-9a35-f8d1e41aea93n@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 19 Sep 2023 05:44:23 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="e823050642b27d6b26a63385ba2f7eca";
logging-data="2335017"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/Gvqd1zOWTEATSMtfpLNW0y2c82j4uBQA="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.15.1
Cancel-Lock: sha1:VRRvhnD/GubWPTt/7qcngBZnUN0=
In-Reply-To: <8e48ad9b-19ab-463b-9a35-f8d1e41aea93n@googlegroups.com>
Content-Language: en-US
 by: Chris M. Thomasson - Tue, 19 Sep 2023 05:44 UTC

On 9/14/2023 11:35 AM, RichD wrote:
> This one is hard.
>
> You play a match, consisting of N coin tosses. You've
> been suckered, because the coin is loaded,

For some reason I am thinking of one of Murphy's Law's that states that
a smith and wesson beats four aces.

and your
> chance of winning, on each toss, is p < .5
>
> To win the match, you must win a majority of tosses.
> You lose on a tie. Even money payoff.
>
> You can choose N. It must be even. What number maximizes
> your winning chance, as a function of p? (N = 0 is disallowed)
>

Re: daily puzzle: coin tossing

<9ee59ab9-ce50-4b14-8716-96b9a41b6024n@googlegroups.com>

  copy mid

https://www.novabbs.com/tech/article-flat.php?id=148711&group=sci.math#148711

  copy link   Newsgroups: sci.math
X-Received: by 2002:a05:622a:1a0b:b0:417:b545:95dd with SMTP id f11-20020a05622a1a0b00b00417b54595ddmr6456qtb.1.1695148220137;
Tue, 19 Sep 2023 11:30:20 -0700 (PDT)
X-Received: by 2002:a05:6870:3a10:b0:1bb:6e8a:d24e with SMTP id
du16-20020a0568703a1000b001bb6e8ad24emr89928oab.4.1695148219811; Tue, 19 Sep
2023 11:30:19 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!border-2.nntp.ord.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: sci.math
Date: Tue, 19 Sep 2023 11:30:19 -0700 (PDT)
In-Reply-To: <uebcfn$27899$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=50.230.131.75; posting-account=x2WXVAkAAACheXC-5ndnEdz_vL9CA75q
NNTP-Posting-Host: 50.230.131.75
References: <8e48ad9b-19ab-463b-9a35-f8d1e41aea93n@googlegroups.com> <uebcfn$27899$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <9ee59ab9-ce50-4b14-8716-96b9a41b6024n@googlegroups.com>
Subject: Re: daily puzzle: coin tossing
From: r_delane...@yahoo.com (RichD)
Injection-Date: Tue, 19 Sep 2023 18:30:20 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 10
 by: RichD - Tue, 19 Sep 2023 18:30 UTC

On September 18, Chris M. Thomasson wrote:
>> You play a match, consisting of N coin tosses. You've
>> been suckered, because the coin is loaded,
>
> For some reason I am thinking of one of Murphy's Law's that states that
> a smith and wesson beats four aces.

https://www.youtube.com/watch?v=773E6GPll3A

--
Rich

Re: daily puzzle: coin tossing

<768cb3aa-d846-4e40-9b33-2771e3e34441n@googlegroups.com>

  copy mid

https://www.novabbs.com/tech/article-flat.php?id=148712&group=sci.math#148712

  copy link   Newsgroups: sci.math
X-Received: by 2002:ac8:7f47:0:b0:40b:2fd7:55a8 with SMTP id g7-20020ac87f47000000b0040b2fd755a8mr5585qtk.8.1695149862086;
Tue, 19 Sep 2023 11:57:42 -0700 (PDT)
X-Received: by 2002:aca:1002:0:b0:3a8:f3e7:d675 with SMTP id
2-20020aca1002000000b003a8f3e7d675mr100449oiq.7.1695149861761; Tue, 19 Sep
2023 11:57:41 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: sci.math
Date: Tue, 19 Sep 2023 11:57:41 -0700 (PDT)
In-Reply-To: <uebbci$278o9$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=50.230.131.75; posting-account=x2WXVAkAAACheXC-5ndnEdz_vL9CA75q
NNTP-Posting-Host: 50.230.131.75
References: <8e48ad9b-19ab-463b-9a35-f8d1e41aea93n@googlegroups.com> <uebbci$278o9$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <768cb3aa-d846-4e40-9b33-2771e3e34441n@googlegroups.com>
Subject: Re: daily puzzle: coin tossing
From: r_delane...@yahoo.com (RichD)
Injection-Date: Tue, 19 Sep 2023 18:57:42 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 3697
 by: RichD - Tue, 19 Sep 2023 18:57 UTC

On September 18, James Waldby wrote:
>> You play a match, consisting of N coin tosses. [...] your
>> chance of winning, on each toss, is p < .5
>> To win the match, you must win a majority of tosses.
>> You lose on a tie. [...]
>> You can choose N. It must be even. What number maximizes
>> your winning chance, as a function of p? (N = 0 is disallowed)
>
> I haven't worked through a sound mathematical approach to this problem,
> but computationally it's easy to verify that the solution is to choose
> N = 2+2k whenever k/(1+2k) < p <= (1+k)/(3+2k). For any p in (0,1/2)
> there is a non-negative value of k satisfying this condition, as p
> falls into intervals demarcated by 0/1, 1/3, 2/5, 3/7, 4/9, ..., for
> which we choose 2, 4, 6, 8 ...
>
> What makes it easy to verify is that values of the Bernoulli
> distribution are fairly easy to calculate. For a given value
> p<0.5, let W_k = probability of a match-win if we choose N=2k, and let
> B_k = probability of winning k tosses out of 2k. Then W_k = (1-B_k)/2,
> and using k from formula in previous paragraph we can check if W_k is
> larger than either of W_(k-1) or W_(k+1). [W_(k-1) not relevant if k=0]
> <https://en.wikipedia.org/wiki/Binomial_distribution#Probability_mass_function>

Well done. I saw this problem long ago, don't recall the exact solution,
but your reasoning looks right. The reference to the binomial distribution
is a telltale.

Intuitively, for p < .5, you want the shortest possible match: N = 2.
But that's simplistic, and incorrect. Which makes the problem challenging.

Consider a match of N tosses. We seek the optimal N, i.e. any deviation
lowers your winning chance W. We have to consider all possible H/T
outcomes, that's where the binomial distribution enters, via the
coefficients; Probability 101. In most cases, the winner wins by more
than 2 tosses. Then lengthening N by 2 doesn't alter the outcome.

There are only two marginal cases:
i) In case of a tie, N/2, you lose. Then if N --> N + 2, and you win both
tosses, that would switch the result.
ii) In the case you win by 2, if N --> N + 2, the opponent might win both
tosses, thus take the match.

For large N, p < .5 obviously disfavors you. But now, look at the binomial
distribution: the middle coefficient representing a tie, is disfavorable.
For small N, this coefficient becomes significant.

So you seek a balance point N between these extremes, which depends
on p. Lots of tedious algebra -

PS Why must N be even?

--
Rich

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor