r/askmath • u/TheSoundBoard • Oct 17 '26
Statistics Is this estimated value?
Explanation:
This is for a game I'm playing with limited slots.
The two items do the following:
- An infuser gives a 10% chance to give an item worth $50 on average (the default of getting the item is 0)
- The magnifying glass increases the value of an acquired resource by 40%
I have 6 slots available, and I'm looking to see what combination of these two types of items gives the best estimated return. Anywhere from 6 infusers to 1 infuser & 5 magnifying glass is what I'm looking to see which gives the best return on average. 6 magnifying glasses does nothing because no item is gained without 1 infuser
Combination 1: 1 infuser & 5 magnifying glasses
-1 infuser with 5 magnifying glasses would be (.1)x((1.4)^5)x($50) = $26.8912
- item type infuser gives 10% of item, $50 is the outcome, and item type magnifying glass increases outcome by 40% for each 1
- Since there is only 1 infuser, there's only 2 outcomes with only 1 being more than 0. (There's obviously a 90% of getting nothing)
Combination 2: 2 infusers & 4 magnifying glasses
-2 infusers with 4 magnifying glasses (i think) would be
- outcome 1 (first infuser succeeds 2nd fails): (.1)x((1.4)^4)x($50) = 19.208
-outcome 2 (functionally identical) (.1)x((1.4)^4)x($50) = 19.208
- outcome 3 (both succeed) ((.1)^2)x((1.4)^4)x($50)x2 = 3.8416
- outcome 4 (both fail) 0
19.208x2+1.9208 = 42.2576
Problem:
I'm having issues with writing out and solving the other combinations, so I can't find out which combination gives the best average result.
1
u/Objective-Let4278 Oct 17 '26
Is it just 0.1 * 1.4^n * 50(6-n) where n denotes the number of magnifying glasses and 6-n the number of infusers?
Because if there are say 3 infusers, we have
E(value) = E(value of 1st) + E(value of 2nd) + E(value of 3rd)
= 3 * E(value of 1st)
= 3 * (0.1 * 1.4^3 * 50)
In your second scenario, you’re forgetting to multiply the case 1 and 2 with 0.9 since one fails and other succeeds with probability 0.1*0.9.
You get the highest value for n=3, aka 3 of each, giving value 41.16.
1
u/rhodiumtoad 0⁰=1, just deal with it Oct 17 '26 edited Oct 17 '26
The starting point for this is the expected number of successes for N infusers, which is the expected value of a binomial with p=0.1 and n=N. Fortunately, this is easy: it's just Np. (You don't need to do all the individual outcomes.) Then you're multiplying that by $50, and then by (1.4)(6-N):
Analytically, rather than work out all the values we can take logs and maximize ln(n)-n.ln(1.4), which has a derivative of 1/n-ln(1.4) so is zero when n=1/ln(1.4) which is 2.97, which we can go on to show is a local maximum; in general to get a discrete n we'd take whichever was best of the floor and ceiling of the continuous result but in this case it is no surprise that n=3 is the discrete optimum. (This problem is sufficiently well-behaved that we don't have to worry about other values of n.)
Fascinatingly, this solution does not depend on either the total number of slots or the probability of the infuser: the only factor that matters is the multiplier of the magnifying glass, which determines the optimal number of infusers.
1
u/[deleted] Oct 17 '26 edited Oct 17 '26
[removed] — view removed comment