Forum Discussion
9 years ago
I don't think I understand your terminology.
A trial = a sim? Or 100 sims? Given what you have said so far, it seems like a trial is 100 sims, and you simply look at what is the maximum loss-run (which would be the longest series of sims within a single trial without a win?)
Monte Carlo doesn't seem like a particularly useful approach to determine this, because repeating 100-sim trials and recording the maximum is going to trend towards 100 as you repeat more and more trials. Such an empirical approach seems useful to find the average (or expected) length of a dry streak.
Anyway, the way I was doing it (and it may be wrong, I admit) is:
Assume you have a drop rate of p, then it's pretty trivial to compute the probability of getting a streak of at least X losses, it's:
Now assume X <= 100, and a single trial is 100 sims. Then the probability of encountering a streak of at least length X losses in that trial depends on the number of sequences of length X you can get. In a trial of length 100, that is (100 - X). Now, the chance of none of those trials being a sequence of all losses is
So the chance of getting a streak, is simply the opposite, all written out in the original probabilities:
Fill in a droprate p=0.2 and a streak of X=15, and we get the abovementioned 95% probability of a trial of 100 containing a dry streak of 15 sims.
Note that in the earlier post, I was working the other way round: X was the trial size, and not the streak size.
The problem is that in reality, we do not run "trials" of 100 sims. We simply sim a lot until we get all the salvage we need. Thus we actually have:
Where T is the variable trial size. What would be more useful than a trial size of 100, is to compute the average number of sims you need to get a full gear and use that as your trial size. But you'd still only have an average run. If you have "bad luck" then your piece of gear will take more sims than the average trial, and incidentally also increase the probability of a long streak of losses. However, given a drop rate p, and a number N of salvages you need, the formula becomes:
And (I think) that to compute the largest X within a 95 confidence interval, you simply have to do:
And compute X given p, and N. For stun guns (N=50 and assume p=0.2):
I don't know how to solve this exactly, but we want integers anyway, so then it's pretty easy to numerically find the largest integer X for which this holds:
Which is X=19. So on an average farm for stun guns, you can expect with 95% confidence a streak of at least 19 sims with no salvage dropping. That is pretty fucking horrible. I should know, I'm in it! :P
Oh, I figured I should add the plot:
https://www.wolframalpha.com/input/?i=plot+Y%3D+(1+-+(0.8)%5EX)%5E(250+-+X)+for+X+from+0+to+50
On the Y-axis, the inverted chance and on the X-axis the streak length.
A trial = a sim? Or 100 sims? Given what you have said so far, it seems like a trial is 100 sims, and you simply look at what is the maximum loss-run (which would be the longest series of sims within a single trial without a win?)
Monte Carlo doesn't seem like a particularly useful approach to determine this, because repeating 100-sim trials and recording the maximum is going to trend towards 100 as you repeat more and more trials. Such an empirical approach seems useful to find the average (or expected) length of a dry streak.
Anyway, the way I was doing it (and it may be wrong, I admit) is:
Assume you have a drop rate of p, then it's pretty trivial to compute the probability of getting a streak of at least X losses, it's:
P = (1 - p)^X
Now assume X <= 100, and a single trial is 100 sims. Then the probability of encountering a streak of at least length X losses in that trial depends on the number of sequences of length X you can get. In a trial of length 100, that is (100 - X). Now, the chance of none of those trials being a sequence of all losses is
(1 - P)^(100 - X)
So the chance of getting a streak, is simply the opposite, all written out in the original probabilities:
1 - (1 - (1 - p)^X)^(100 - X)
Fill in a droprate p=0.2 and a streak of X=15, and we get the abovementioned 95% probability of a trial of 100 containing a dry streak of 15 sims.
Note that in the earlier post, I was working the other way round: X was the trial size, and not the streak size.
The problem is that in reality, we do not run "trials" of 100 sims. We simply sim a lot until we get all the salvage we need. Thus we actually have:
1 - (1 - (1 - p)^X)^(T - X)
Where T is the variable trial size. What would be more useful than a trial size of 100, is to compute the average number of sims you need to get a full gear and use that as your trial size. But you'd still only have an average run. If you have "bad luck" then your piece of gear will take more sims than the average trial, and incidentally also increase the probability of a long streak of losses. However, given a drop rate p, and a number N of salvages you need, the formula becomes:
1 - (1 - (1 - p)^X)^((N/p) - X)
And (I think) that to compute the largest X within a 95 confidence interval, you simply have to do:
0.95 <= 1 - (1 - (1 - p)^X)^((N/p) - X)
And compute X given p, and N. For stun guns (N=50 and assume p=0.2):
0.05 >= (1 - (0.8)^X)^(250 - X)
I don't know how to solve this exactly, but we want integers anyway, so then it's pretty easy to numerically find the largest integer X for which this holds:
0.05 > (1 - (0.8)^X)^(250 - X)
Which is X=19. So on an average farm for stun guns, you can expect with 95% confidence a streak of at least 19 sims with no salvage dropping. That is pretty fucking horrible. I should know, I'm in it! :P
Oh, I figured I should add the plot:
https://www.wolframalpha.com/input/?i=plot+Y%3D+(1+-+(0.8)%5EX)%5E(250+-+X)+for+X+from+0+to+50
On the Y-axis, the inverted chance and on the X-axis the streak length.
About SWGOH General Discussion
Discuss and share your feedback on Star Wars: Galaxy of Heroes with fellow players.80,110 PostsLatest Activity: 4 hours ago
Recent Discussions
- 4 hours ago
- 7 hours ago
- 7 hours ago
- 9 hours ago
- 9 hours ago