Beefy Boxes and Bandwidth Generously Provided by pair Networks Bob
Just another Perl shrine
 
PerlMonks  

Re^2: Average random depth formula required

by palkia (Scribe)
on May 01, 2012 at 22:43 UTC ( #968343=note: print w/ replies, xml ) Need Help??


in reply to Re: Average random depth formula required
in thread Average random depth formula required

Thx
This is pretty much how I figured the "$splt = 1" case
(although ∑a^k is a / (1 - a) not 1 / (1 - a) as k starts at 1 since $chance=0 causes the return of "zero" value !)
but how can it be implemented to solve for "$splt = 2" ?
Yeah I know "sum over value times odds" but it seems like that approach goes requires some very complicated combinatorial problem solving.
if(you see something I'm missing){please share ^^}

bry: while checking for "$splt=2", I discovered the value of "1" is returned when "$chance" is about 0.35793
for which I can't find any special properties
(maybe that exp(0.35793^0.35793) ~ 2, but not counting on it being the actual exact value ^^)


Comment on Re^2: Average random depth formula required
Re^3: Average random depth formula required
by SuicideJunkie (Priest) on May 02, 2012 at 13:22 UTC

    A chance of 0 means your average depth is going to be zero. If you are counting the number of coin flips instead of the number of wins, then you need to add one to the result ;)

    That odd number should probably be 1/e = ~0.367879441

      Right you are, I do count the "wins" ^^.

      1/e is a nice guess (theorized it myself in some point),
      but the number I mentioned is very accurate (just doesn't include many digits so..).
      bty, 1/e returns an average of about 1.08 +- 0.0001, while the mentioned number gives an average of about 1 +- 0.0001.

      Any idea how to solve this thing ?

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://968343]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (17)
As of 2013-05-21 11:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best material for plates (tableware) is:









    Results (431 votes), past polls