Trying to work on a math game for work! How many "dig sites" to include?

I hope I can explain this somewhat competently. We have several teams, that get ~10 sales a week.

What I'm trying to create is a treasure map game. I have created a treasure map ready for dig sites to be placed on it. I want to bury 5 clues on the map, but have the other dig sites earn dubloons that can be traded in to purchase their missing clues.

The stickler is that the game is supposed to run for ~a week, so I don't want to put 100 possible dig sites on there. SO my math question:

Assuming a team will have 10 "searches", what is the appropriate number of dig sites to place on the map so that a team will (on average) find only find 4 of the clues? They will be able to purchase the last one with dubloons, but assume the dubloon count & clue cost are irrelevant for this question.

I hope that's enough info and that I formulated it in a way that makes sense at all.

edit: if there's a handy dandy formula/way to calculate this, that would be fantastic, because the goal is to continue this with a map that has 6 clues, 7, clues, etc. etc.

Posted Jul 30, 2019, 1:35 AM UTC

06
taggedjc•

(1-X/Y)^(Z) is the chance that with Z attempts you find zero of the X clues hidden among Y sites.

(1-X/Y)^(Z-P)(X/Y)^(P) is the chance that exactly P clues are found.

So you want P=4 to come out to 50%, correct?

And we also know that X is 5 and Z is 10.

So:

(1-5/Y)^(6)(5/Y)^(4) = 0.5

This has no solution.

It actually seems like if you have a minimum of 10 dig sites (due to having at least ten chances) and only five clues, no matter how many dig sites you have, they won't be likely to find even four of the clues. And obviously the more non-clue dig sites you add, the less and less likely they are to find clues.

1
Knightmare4469OP•

Thanks for responding firstly!

Second, I never took any statistics type courses so this is way out of my league, but it seems to me there should be SOME way to determine this, let me go through my reasoning & if you can point out any errors I'll be happy to learn.

After some more thought I realized this is essentially a combinations problem.

with 10 dig sites, there is only 1 combination with 10 searches, so the odds of getting 5/5 are 100%

with 11 dig sites, there are 11 combinations. 5 of those combinations are 4/5 clues, 6 are 5/5 clues.

with 12 dig sites, there are 66 combinations (what a jump). 35 of those combinations, they get 4 out of 5, 21 combinations they get 5 out of 5, and the other 10 they only get 3/5. so 56/66 of the time they get 4+ clues, or 85% of the time.

So clearly 12 is to low.

The problem arises as soon as you go above 12 objects, the numbers get unrealistically big to manually count. At 20 objects there would be 184,756 combinations, so there must be some way ( I think ) to not do it manually. Basically in The set of A-B-C-D-E-F-G-H-I-J-K-L-M-N-O-P-Q-R-S-T, how many unique combinations contain at least 4 of the following: A-B-C-D-E, and how more importantly how do you derive that without spending 2 years writing it out

1
taggedjc•

Ah, you are right. I was using a geometric distribution when it should be a hypergeometric distribution since it isn't with-replacement.

1
Knightmare4469OP•

I know some of these words....

but seriously, thank you for responding, and continuing to follow up with your other response!

1
taggedjc•

I've redone my math here with something that actually makes sense for what's happening. Don't know what I was thinking last time. I guess I was just thinking of randomized trials rather than choosing things...

L = Total number of locations

N = Number of clues

S = Number of searches

The chance of getting exactly Z clues would be the following:

(N choose Z)((L-N) choose (S-Z))/(L choose S)

So you want N to be 5, Z to be 4, and S to be 10, and then want L to be whatever makes that formula as close to 50% as possible.

So that's:

(5 choose 4)((L-5) choose 6))/(L choose 10)

or visualized on this desmos graph.

So, you want the total number of sites to be 13.

1
Knightmare4469OP•

You rock! Out of curiosity is there is a name for whatever principle/theorem/idea you used to do this?

And I think I totally got it now, as to how to change the values on your formula. If theoretically there were 9 clues and we wanted them to get 7, it would be

(9 choose 7)((L-9) choose 1))/(L choose 10) ?

Or

https://www.desmos.com/calculator/gbsdvpeqxa

? Amusingly enough 13 searches is still the right #?

edit: is there a way for me to marked it Solved or anything?

1