Help Probability Question

Killswitch

FH is my second home
Joined
Jan 29, 2004
Messages
1,584
I can't do it, please help me!

I have 7 buttons in a booth. People enter the booth one at a time and press one button. How do I work out how many people I need to express a percentage confidence that all seven buttons will have been pressed?

Obviously the minimum number of people is 7 and I would reach 100% probability that all seven buttons were pressed after an infinite number of people had entered the booth. But let's say I just wanted to be 95% sure that all seven buttons had been pressed?

I've been reading and thinking back to school and I just can't do it!
 

Killswitch

FH is my second home
Joined
Jan 29, 2004
Messages
1,584
I can't do it, please help me!

I have 7 buttons in a booth. People enter the booth one at a time and press one button. How do I work out how many people I need to express a percentage confidence that all seven buttons will have been pressed?

Obviously the minimum number of people is 7 and I would reach 100% probability that all seven buttons were pressed after an infinite number of people had entered the booth. But let's say I just wanted to be 95% sure that all seven buttons had been pressed?

I've been reading and thinking back to school and I just can't do it!

Another equally good way to approach this would be;

"There are 7 buttons and 10 people, what is the probability that after all 10 people have pushed a random button that all 7 buttons have been pressed?"
 

Tom

I am a FH squatter
Joined
Dec 22, 2003
Messages
17,361
I don't know but that italicised Commodore logo is for some reason very annoying.
 

noblok

Part of the furniture
Joined
Jan 2, 2005
Messages
1,371
It's been a long time since I've done any real math, so I may be completely wrong, but I believe for 10 attempts it's the following:

(7!*7³ + 7!*7²*6 + 7!*7*6² + 7!*6³)/7¹⁰ = 0.01971571

Explanation:
1. Odds of getting it right in seven tries: 7!/7⁷ (7/7*6/7*5/7*4/7*3/7*2/7*1/7)

2. If you add another try:
- The ones which had seven different numbers before are still correct
- The ones which had exactly six different numbers have a 1/7 chance of becoming correct
--- The odds of having exactly six different numbers in seven tries are 7/7*6/7*5/7*4/7*3/7*2/7*6/7
--- Multiplied by 1/7 this becomes (7!*6)/7⁸
- Add the two together and you get 7!/7⁷ + (7!*6)/7⁸ or (7!*7 + 7!*6)/7⁸

3. Repeat above steps.

I have no idea how to work in the other direction, though (i.e. from a fixed probability to the number of attempts required).
 

Chilly

Balls of steel
Joined
Dec 22, 2003
Messages
9,047
Are you taking into account how the people will be biased? Are you assuming a pure RNG?
 

Killswitch

FH is my second home
Joined
Jan 29, 2004
Messages
1,584
It's not really to do with people but L2-hashed load-balancing across a LAG! As such the selection isn't random but based on this formula;

(SRC_MAC_ADDRESS Xor DST_MAC_ADDRESS) % NUM_OF_MEMBER_TRUNKS

We have 4 content servers load-balanced inbound by ldirector using Direct Return. All four servers have their gateway as a subinterface of a 7-port LAG on our Juniper MX80. The servers themselves are connected to an Intel switch. Because the Intel switch uses the above braindead algorithm for hashing, each server will choose a single cable from the LAG and use it forever. Multiple servers could choose the same cable. The current situation is that we have one cable in the LAG at nearly 100% capacity, 2 at 50% capacity and 4 completely idle.

I'm trying to work out how many content servers I'd need to guarantee (with 95% confidence for example) that all seven uplinks are being utilized as this is likely to give the best possible balancing of overall load across the LAG.

So essentially in the metaphor above, the people can be assumed to have no bias and to act as a perfect RNG. The MAC addresses of the content servers were randomly generated when they were created (Virtual Machines) and the MAC address of the gateway is fixed. New content servers will get new, random MAC addresses (well, the last 36 bits will be random) so it should be as close to a perfect RNG as makes no difference.
 

Chilly

Balls of steel
Joined
Dec 22, 2003
Messages
9,047
It's not really to do with people but L2-hashed load-balancing across a LAG! As such the selection isn't random but based on this formula;

(SRC_MAC_ADDRESS Xor DST_MAC_ADDRESS) % NUM_OF_MEMBER_TRUNKS

We have 4 content servers load-balanced inbound by ldirector using Direct Return. All four servers have their gateway as a subinterface of a 7-port LAG on our Juniper MX80. The servers themselves are connected to an Intel switch. Because the Intel switch uses the above braindead algorithm for hashing, each server will choose a single cable from the LAG and use it forever. Multiple servers could choose the same cable. The current situation is that we have one cable in the LAG at nearly 100% capacity, 2 at 50% capacity and 4 completely idle.

I'm trying to work out how many content servers I'd need to guarantee (with 95% confidence for example) that all seven uplinks are being utilized as this is likely to give the best possible balancing of overall load across the LAG.

So essentially in the metaphor above, the people can be assumed to have no bias and to act as a perfect RNG. The MAC addresses of the content servers were randomly generated when they were created (Virtual Machines) and the MAC address of the gateway is fixed. New content servers will get new, random MAC addresses (well, the last 36 bits will be random) so it should be as close to a perfect RNG as makes no difference.

cables.png

x axis is number of nodes
 

Nate

FH is my second home
Joined
Mar 13, 2004
Messages
7,454
tumblr_lfgcg5qzsl1qbvc38o1_400.jpg


I suggest you make the buttons stay in once they've been pressed.

Send the cheque in the post ;)
 

ileks

Part of the furniture
Joined
Jul 26, 2007
Messages
2,293
This made my head hurt :( Then again I'm utterly terrible at anything to do with probability/combinatorics.

I think it's a multinomial distribution type problem, but I have no idea how to calculate the minimum number of people for a probability greater than or equal to 0.95.
 

Killswitch

FH is my second home
Joined
Jan 29, 2004
Messages
1,584
This made my head hurt :( Then again I'm utterly terrible at anything to do with probability/combinatorics.

I think it's a multinomial distribution type problem, but I have no idea how to calculate the minimum number of people for a probability greater than or equal to 0.95.

I'm more than happy to use "between 20 and 40" in my arguments with Intel :)
 

Users who are viewing this thread

Top Bottom