more useful options PerlMonks

### Re: Spooky math problem

by polettix (Vicar)
 on Sep 26, 2005 at 14:58 UTC ( #495130=note: print w/replies, xml ) Need Help??

in reply to Spooky math problem

Hi, your link to the puzzle has to be updated, it now points to a nonexistent page.

Nevertheless, I found the solution and also this discussion about the problem, but the solution is flawed IMHO. Apart from the fact that the author is arguing about the phrasing in the original solution, the algebra should be the following (quoted from one of the messages in the thread):

```P(correct guess) =
P(we were shown the higher number H)
* P(we guessed "high" given H)
+ P(we were shown the lower number L)
* P(we guessed "low" given L)

=> (plugging in from the original selection method)

P(correct guess) = (1/2) * (1 - F(H)) + (1/2) * F(L)

=>

P(correct guess) = (1/2) (1 - (F(H) - F(L)))

=> Since F(H) - F(L) > 0 (by assumption)

P(correct guess) = (1/2) (1 - (a positive value))

=>

Therefore,

P(correct guess) < 1/2.
What I find very amusing is that we're using two different values (namely H and L) to feed the F function, but this is not applicable. We have to use the same value - that is the value we figure out in our mind, let's call it y. This leads to:
```P(correct guess) = (1/2) (1 - (F(y) - F(y))) = 1/2
as it should clearly be.

Flavio
perl -ple'\$_=reverse' <<<ti.xittelop@oivalf

Don't fool yourself.

Replies are listed 'Best First'.
Re^2: Spooky math problem
by Anonymous Monk on Mar 25, 2009 at 04:22 UTC
You've got it backwards. It should be
```P(correct guess) = (1/2) * F(H) + (1/2) * (1 - F(L))
```
which does give you a probability > 1/2.

Create A New User
Node Status?
node history
Node Type: note [id://495130]
help
Chatterbox?
 [Cosmic37]: rather than the value of \$mydt which is a date time strong such as 2016-01-01 12:30:56 [Corion]: Cosmic37: No, but maybe \$mydt doesn't contain what you think it does, or it contains characters that are special in a regular expression? Try if( \$line =~ /\Q\$mydt\E/) { ... for a literal match [Cosmic37]: I mean string grrr [Corion]: Maybe add an else branch in which you print what the values of \$line and \$mydt are? [Cosmic37]: ah thank you I will try [Cosmic37]: you are right \$mydt did not contain what I expected... :-D I will now think :-D [Cosmic37]: crunch...grind... whirr...gnashing metal crunching cogs...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (6)
As of 2017-06-29 17:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
Voting Booth?
How many monitors do you use while coding?

Results (673 votes). Check out past polls.