Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Community > MacNN Lounge > Expectancy Question

Expectancy Question
Thread Tools
Professional Poster
Join Date: Dec 2000
Location: Chicago, Illinois
Status: Offline
Reply With Quote
Oct 1, 2005, 04:33 PM
 
So here's a homework problem I can't seem to get a "nice" answer to. I need to calculate the expected (average) number of balls needed to be thrown into b bins so as to get a bin with 2 balls. The formulation I got (which matches my brute force evaluation of the average) looks like this:

H(i) is the probability of getting the 2-ball condition on the ith throw - no 2-ball condition can have occurred on the previous i-1 throws.

M(i) is the probability of not getting the 2-ball condition on the ith throw.

_____H(i)_________________M(i)
1____0___________________1
i_____(i-1)xM(i-1)/b______M(i-1) - H(i)

And so my expectancy function is:

E[X] = sum from i=1 to b+1 of i*H(i)

This works, but it doesn't have a nice, easy form that I can develop. Another technique I wanted to try (but isn't giving me the right answer) looks like this:

The probability that the first i-1 throws do not result in a double balled bin is b/b * (b-1)/b * (b-2)/b * ... * (b-(i-2)) / b = 1/(b-i+1)!

The probability that the ith throw will land in one of the i-1 bins that already have a ball is (i-1)/b. Therefore, my expectancy function would be:

E[X] = sum from i=1 to b of i*(i-1) / (b*(b-1+i)!)


Any suggestions?
     
Grizzled Veteran
Join Date: Jun 2002
Location: Probably some pub in Reykjavik
Status: Offline
Reply With Quote
Oct 1, 2005, 06:20 PM
 
It will require a lot of balls to answer that question.
     
Addicted to MacNN
Join Date: Jul 2005
Location: Cooperstown '09
Status: Offline
Reply With Quote
Oct 1, 2005, 07:06 PM
 
Ummmm....
     
Addicted to MacNN
Join Date: Oct 2001
Location: BFE
Status: Offline
Reply With Quote
Oct 1, 2005, 07:27 PM
 
I remember doing this in college, but now, 13 years later, I have yet to come up with a reason to use such formulas in real life.

I wish i could help you, but I also forgot how to.

I'm a bird. I am the 1% (of pets).
     
Professional Poster
Join Date: Sep 2005
Location: Rochester, NY
Status: Offline
Reply With Quote
Oct 1, 2005, 07:46 PM
 
My expectancy equation of being able to help you is:

E[x] = 0 (for all real values of x).

I can picture the problem in my head, but the math just ain't coming.

I might be able to give you an imaginary answer, if you like!
     
Professional Poster
Join Date: Dec 2000
Location: Chicago, Illinois
Status: Offline
Reply With Quote
Oct 1, 2005, 08:12 PM
 
I actually know the output values of the function (by brute force solving the recurrence), but I don't know of a non-recursive way to state the solution function.

Bins: 1 Avg: 2.0 Formula : 2.0
Bins: 2 Avg: 2.499 Formula : 2.5
Bins: 3 Avg: 2.894 Formula : 2.888888888888889
Bins: 4 Avg: 3.194 Formula : 3.21875
Bins: 5 Avg: 3.523 Formula : 3.5104
Bins: 6 Avg: 3.744 Formula : 3.774691358024691
Bins: 7 Avg: 3.975 Formula : 4.018138700711439
Bins: 8 Avg: 4.245 Formula : 4.245018005371094
Bins: 9 Avg: 4.456 Formula : 4.458315744885656
Bins: 10 Avg: 4.605 Formula : 4.660215680000001
Bins: 11 Avg: 4.869 Formula : 4.852372050737358
Bins: 12 Avg: 5.058 Formula : 5.036073675098951
Bins: 13 Avg: 5.187 Formula : 5.212347912952521
Bins: 14 Avg: 5.301 Formula : 5.382029424383519
Bins: 15 Avg: 5.445 Formula : 5.545807285147228
Bins: 16 Avg: 5.712 Formula : 5.704258247072678
Bins: 17 Avg: 5.918 Formula : 5.857870820801627
Bins: 18 Avg: 5.985 Formula : 6.007063098992892
Bins: 19 Avg: 6.073 Formula : 6.15219620095745
Bins: 20 Avg: 6.186 Formula : 6.293584586000901
Avg is my brute force calculation, while formula is the output of the recursive model (seems close enough for me). Maybe there's a math program that can take input values and create a pretty good guess for the function? (unfortunately, there are infinitely many functions with match outputs, so I'm not holding my breath).
     
Addicted to MacNN
Join Date: Oct 2002
Location: Boston, MA
Status: Offline
Reply With Quote
Oct 2, 2005, 06:14 PM
 
Your title through me all off, I took the expectancy literally. As I thought it was referring to pregnancy.

"Never give in, never give in, never, never, never, never - in nothing, great or small, large or petty - never give in except to convictions of honor and good sense." Winston Churchill
     
Professional Poster
Join Date: Dec 2000
Location: Chicago, Illinois
Status: Offline
Reply With Quote
Oct 2, 2005, 08:01 PM
 
I hope I'm not pregnant!
     
Baninated
Join Date: Jun 2000
Location: Cambridge, Chicago, Jerusalem (school/home/heart)
Status: Offline
Reply With Quote
Oct 2, 2005, 10:05 PM
 
Or how often you have to urinate.
     
Mac Elite
Join Date: Jan 2004
Location: Berkeley, CA
Status: Offline
Reply With Quote
Oct 3, 2005, 12:31 PM
 
5.6
"Give me a lever long enough and a fulcrum on which to place it, and I shall move the world." -Archimedes
     
Posting Junkie
Join Date: Mar 2004
Location: MacNN database error. Please refresh your browser.
Status: Offline
Reply With Quote
Oct 3, 2005, 01:37 PM
 
0. It's rigged like at state fairs.

This is a computer-generated message and needs no signature.
     
Addicted to MacNN
Join Date: Mar 2001
Location: USA
Status: Offline
Reply With Quote
Oct 3, 2005, 01:46 PM
 
..dp..
"Everything's so clear to me now: I'm the keeper of the cheese and you're the lemon merchant. Get it? And he knows it.
That's why he's gonna kill us. So we got to beat it. Yeah. Before he let's loose the marmosets on us."
my bandmy web sitemy guitar effectsmy photosfacebookbrightpoint
     
Addicted to MacNN
Join Date: Mar 2001
Location: USA
Status: Offline
Reply With Quote
Oct 3, 2005, 01:46 PM
 
I didn't expect this, either.

/still got nothin'
//maybe I should just go home
"Everything's so clear to me now: I'm the keeper of the cheese and you're the lemon merchant. Get it? And he knows it.
That's why he's gonna kill us. So we got to beat it. Yeah. Before he let's loose the marmosets on us."
my bandmy web sitemy guitar effectsmy photosfacebookbrightpoint
     
Professional Poster
Join Date: Apr 2001
Location: Capital city of the Empire State.
Status: Offline
Reply With Quote
Oct 3, 2005, 05:05 PM
 
The answer is 42.
/mal
"I sentence you to be hanged by the neck until you cheer up."
MacBook Pro 15"/2.4 GHz Intel Core 2 Duo/4 GB DDR2 SDRAM/200 GB Hitachi HD/8x SuperDrive/Mac OS X 10.6.1
     
Addicted to MacNN
Join Date: Jul 2002
Location: Minnesota - Twins Territory
Status: Offline
Reply With Quote
Oct 3, 2005, 05:44 PM
 
true...no false...true...false false FALSE

"I'm for anything that gets you through the night, be it prayer, tranquilizers, or a bottle of Jack Daniel's."
     
Professional Poster
Join Date: Jun 2005
Location: Yamanashi, Japan
Status: Offline
Reply With Quote
Oct 3, 2005, 08:50 PM
 
The answer is 5! 5 Balls Ha ha ha!
     
dav
Mac Elite
Join Date: Dec 2000
Location: sic semper tyrannis
Status: Offline
Reply With Quote
Oct 4, 2005, 07:14 AM
 
what do you mean - an african or a european swallow?
one post closer to five stars
     
Baninated
Join Date: Apr 2001
Location: Dead whale
Status: Offline
Reply With Quote
Oct 4, 2005, 08:19 AM
 
I was expecting a baby. Nuts.. Still my anwser is "7h to the Nth root of the Gamma corn"
     
Grizzled Veteran
Join Date: Feb 2004
Location: The O.C.
Status: Offline
Reply With Quote
Oct 4, 2005, 11:06 AM
 
Originally Posted by wdlove
Your title through me all off, I took the expectancy literally. As I thought it was referring to pregnancy.
there's women in here?

MacBook 2.4GHz Intel Core 2 Duo | Clamshell iBook G3 366MHz | 22" Cinema Display | iPod Mini | iPod shuffle | AirPort Express | Mighty Mouse
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 06:22 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2