Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
| From | James Waldby <j-waldby@no.no> |
|---|---|
| Newsgroups | sci.math |
| Subject | Re: daily problem |
| Date | 2021-12-20 05:15 +0000 |
| Organization | self |
| Message-ID | <spp3h1$3jv$1@dont-email.me> (permalink) |
| References | <2e959655-3fd4-4261-ba4c-064478b186b6n@googlegroups.com> <spdh20$s5f$2@gioia.aioe.org> <16c1ec66a46acf9f$1$3042852$802601b3@news.usenetexpress.com> |
Diego Garcia <dg@chaos.info> wrote:
> On Wed, 15 Dec 2021 13:52:30 -0600, Serg io wrote:
>> 1
> Yes. 1 is the correct answer.
>
> Breaking the rod into two pieces is equivalent to picking a point at random
> along its length.
>
> The density function is uniform, and the expectation value of a uniform
> distribution, with length = 1, is 1/2.
>
> Thus, the ratio 1/2 / 1/2 = 1.
>
> Someone should do a computer simulation to verify this.
Computer simulation (below) indicates that the previously-mentioned
2(log(2)-1/2), or about 0.38629436, is plausible. Actually, a simple
calculation proves that the expected value of the ratio of the shorter
length to the longer (when a rod of given length breaks at a uniformly
random point) is less than 1. For this proof, let X denote a random
variate uniformly distributed on (0,1); let F(X) = ratio of min part
length to max part length = min(X,1-X)/max(X,1-X); and let
???{a,b}(F(x)) represent the integral of F over interval [a, b]. (Note,
we use ???{a,b}(F(x)) = ???{a,c}(F(x)) + ???{c,b}(F(x)) in following.)
Now E(F(X)) = ???{0,1}(F(X)) = ???{0,1/3}(F(X)) + ???{1/3,2/3}(F(X)) +
???{2/3,1}(F(X)) < 1/3 * (1/2 + 1 + 1/2) = 2/3 < 1, completing proof
that the expected value of the ratio is less than 1.
The inequality arises because F(X) < 1/2 in the outer thirds of (0,1),
and F(X) < 1 in the inner third. One can extend this technique
further, eg we can break the integral up across 9 intervals and note
that 1/9*(1/8+2/7+3/6+4/5+1+4/5+3/6+2/7+1/8) < 0.4912698413 < 1/2.
Anyhow, the simple calculation shows E(F(X)) < 2/3, and a slightly
longer calculation shows it's less than 1/2. To get the earlier-
mentioned correct answer, we need to evaluate ???{0,1}(F(X)), which
equals ???{0,1/2}(F(X)) + ???{1/2,1}(F(X)). The first of those is
???{0,1/2}(X/(1-X)) which by change of variables U = 1-X is equal to
???{1/2,1}((1-U)/U) = ???{1/2,1}((1-X)/X) = ???{1/2,1}(F(X)) =
(ln(1)-ln(1/2)) - 1/2 = ln(2)-1/2, whence E(F(X)) = 2(log(2)-1/2).
Here's some computer code (in Julia language) to try to estimate the
expected value of F via a Monte-Carlo-like method:
F(X) = min(X,1-X)/max(X,1-X)
expectF(tries) = sum(F(rand()) for i in 1:tries)/tries
Here are some example executions of function expectF (in Julia REPL):
julia> expectF(1000000)
0.3864327640365364
julia> expectF(10000000)
0.38632295692699936
julia> expectF(10000000)
0.3864170969570848
julia> 2log(2)-1
0.3862943611198906
Here's basically the same code in Python, plus one execution:
from random import random
def F(X): return min(X,1-X)/max(X,1-X)
def expectF(T): return sum(F(random()) for i in range(T))/T
In [5]: expectF(1000000)
Out[5]: 0.38630706073483484
Back to sci.math | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
daily problem RichD <r_delaney2001@yahoo.com> - 2021-12-14 19:52 -0800
Re: daily problem Mike Terry <news.dead.person.stones@darjeeling.plus.com> - 2021-12-15 18:19 +0000
Re: daily problem RichD <r_delaney2001@yahoo.com> - 2021-12-15 17:38 -0800
Re: daily problem Mike Terry <news.dead.person.stones@darjeeling.plus.com> - 2021-12-16 02:47 +0000
Re: daily problem Julio Di Egidio <julio@diegidio.name> - 2021-12-16 00:10 -0800
Re: daily problem Mike Terry <news.dead.person.stones@darjeeling.plus.com> - 2021-12-16 14:22 +0000
Re: daily problem RichD <r_delaney2001@yahoo.com> - 2021-12-16 17:00 -0800
Re: daily problem Julio Di Egidio <julio@diegidio.name> - 2021-12-17 00:16 -0800
Re: daily problem FromTheRafters <erratic@nomail.afraid.org> - 2021-12-17 06:06 -0500
Re: daily problem Julio Di Egidio <julio@diegidio.name> - 2021-12-17 09:35 -0800
Re: daily problem Mike Terry <news.dead.person.stones@darjeeling.plus.com> - 2021-12-17 17:39 +0000
Re: daily problem Julio Di Egidio <julio@diegidio.name> - 2021-12-18 09:05 -0800
Re: daily problem Jim Burns <james.g.burns@att.net> - 2021-12-18 15:00 -0500
Re: daily problem Julio Di Egidio <julio@diegidio.name> - 2021-12-18 13:47 -0800
Re: daily problem Jim Burns <james.g.burns@att.net> - 2021-12-18 21:23 -0500
Re: daily problem duncan smith <duncan@invalid.invalid> - 2021-12-16 19:49 +0000
Re: daily problem Mike Terry <news.dead.person.stones@darjeeling.plus.com> - 2021-12-17 18:02 +0000
Re: daily problem Julio Di Egidio <julio@diegidio.name> - 2021-12-15 10:30 -0800
Re: daily problem FromTheRafters <erratic@nomail.afraid.org> - 2021-12-15 14:30 -0500
Re: daily problem Julio Di Egidio <julio@diegidio.name> - 2021-12-15 11:41 -0800
Re: daily problem Archimedes Plutonium <plutonium.archimedes@gmail.com> - 2021-12-18 13:57 -0800
Re: daily problem Archimedes Plutonium <plutonium.archimedes@gmail.com> - 2021-12-18 14:03 -0800
Re: daily problem Julio Di Egidio <julio@diegidio.name> - 2021-12-18 14:06 -0800
Re: daily problem Archimedes Plutonium <plutonium.archimedes@gmail.com> - 2021-12-18 16:27 -0800
Re: daily problem Archimedes Plutonium <plutonium.archimedes@gmail.com> - 2021-12-18 18:45 -0800
Re: daily problem RichD <r_delaney2001@yahoo.com> - 2021-12-19 16:03 -0800
Re: daily problem Archimedes Plutonium <plutonium.archimedes@gmail.com> - 2021-12-19 16:15 -0800
Re: daily problem RichD <r_delaney2001@yahoo.com> - 2021-12-15 17:54 -0800
Re: daily problem Serg io <invalid@invalid.com> - 2021-12-18 23:11 -0600
Re: daily problem Archimedes Plutonium <plutonium.archimedes@gmail.com> - 2021-12-18 21:29 -0800
Re: daily problem Serg io <invalid@invalid.com> - 2021-12-15 13:52 -0600
Re: daily problem Diego Garcia <dg@chaos.info> - 2021-12-18 18:21 +0000
Re: daily problem James Waldby <j-waldby@no.no> - 2021-12-20 05:15 +0000
Re: daily problem Archimedes Plutonium <plutonium.archimedes@gmail.com> - 2021-12-19 21:40 -0800
Re: daily problem Diego Garcia <dg@chaos.info> - 2021-12-21 10:36 +0000
Re: daily problem Julio Di Egidio <julio@diegidio.name> - 2021-12-21 09:58 -0800
Re: daily problem Alan Mackenzie <acm@muc.de> - 2021-12-15 21:16 +0000
Re: daily problem Serg io <invalid@invalid.com> - 2021-12-15 15:31 -0600
Re: daily problem Mike Terry <news.dead.person.stones@darjeeling.plus.com> - 2021-12-15 21:47 +0000
Re: daily problem RichD <r_delaney2001@yahoo.com> - 2021-12-15 17:46 -0800
Re: daily problem RichD <r_delaney2001@yahoo.com> - 2021-12-15 17:57 -0800
Re: daily problem Archimedes Plutonium <plutonium.archimedes@gmail.com> - 2021-12-19 13:53 -0800
Re: daily problem Archimedes Plutonium <plutonium.archimedes@gmail.com> - 2021-12-19 14:02 -0800
csiph-web