PDA

View Full Version : Math equation for variance


kgallowaypa
05-24-2016, 02:55 PM
So I had this random thought the other day while I cam camping Verina Tomb. That specific mob spawns between a random 2-7 day variance. I started thinking if you could mathematically calculate the probability for any mob to spawn within their window but I couldn't create the formula on my own. So here's a thought experiment :)

Lets say a given mob's variance is 16 hours for the pop to occur.
Evenly distributed each hour in the window comes out to a 6.25% chance each hour that the mob could pop.

It is known that if the mob does not spawn by the 15th hour, there is a 100% chance the mob will spawn in the 16th hour...but how would you calculate each change mathematically as the hours progress?

For example, A mob's window is open and 3 hours pass but no pop or event has occurred. I am guessing you just take the remaining hours left and divide by 1. So in this example, on the 3rd hour of the window, the next hour becomes 7.69% , 8.33% on the 4th hour, etc.

Is my math behind this accurate? There is no way you can predict the random variable of when the mob occurs, but this might be a safe bet. Any opinions?

gildor
05-24-2016, 03:07 PM
I dont know anything about the raid scene here, but would have to start with whether or not "Variance" is time before and after a previous kill for mob to pop..

Say its 10 hours..is that a 20 hour window? 10 before previous kill to 10 after?

kgallowaypa
05-24-2016, 03:10 PM
I dont know anything about the raid scene here, but would have to start with whether or not "Variance" is time before and after a previous kill for mob to pop..

Say its 10 hours..is that a 20 hour window? 10 before previous kill to 10 after?

When I think of variance I usually refer to the end result of a +-8 hours, which comes out to 16 hours. Most raid mobs are on a 7 day +-8 hour variance, which comes out to a 16 hour window.

gildor
05-24-2016, 03:25 PM
I would think the only variable that changes is 100% during the last hour if the mob hasnt popped during the hours before...since each hour is its own variable with a yes/no not a % based on number of hours left..

kgallowaypa
05-24-2016, 03:29 PM
That's what I was thinking too, I feel like something is missing in the calculation but I couldn't put my finger on it...AND were doing it by diving by hours of the window, you could get really into it once you start considering the minutes and quartiles of each hour for 15 minute increments.

gildor
05-24-2016, 03:31 PM
is there a certain "tick" the mob can spawn in or is it on the hour during each hour in the variance window? if thats the case the mob could spawn in any 6 second interval during a "tick" right?

kgallowaypa
05-24-2016, 03:44 PM
is there a certain "tick" the mob can spawn in or is it on the hour during each hour in the variance window? if thats the case the mob could spawn in any 6 second interval during a "tick" right?

I think the spawn is based on in-game /time, but if it were based on server-side ticks, then the working variable grows exponentially:

16 hours = 57,600 seconds.

Converted 57,600 seconds into increments of 6 seconds per chance event = 9,600 instances a mob can pop within a 16 hour window.

meanhappyguy
05-24-2016, 05:34 PM
If you take it to the extreme "per tick" limit, and work the opposite way, like cheating on a maze...

With one tick left on a mobs 16 hour window, there is a 100% chance of it spawning on that final tick, if it hasn't spawned yet.

With two ticks left, the mob has a 50% chance to spawn on the second to last tick, and a 50% chance to spawn on the last tick.

With three ticks left, the mob has a 33% chance to spawn on each of the ticks...

With four ticks left... 25%

With five ticks left... 20%

I think this is what you might be getting at? If this is the case, with only a minute left on a 16 hour window, you'd still only be at a 10% chance of the mob spawning on that tick. Any individual tick more than a minute out would be very unlikely to spawn the dragon. Practically, it makes more sense to start camping something closer to the end of its window, but of course then you run the risk of missing an earlier pop. Where that line in the sand is drawn most likely will come down to how important of a target it is, and how much time you're willing to waste in an elf sim :P Sounds like a fun math problem, if you could put some weight on those last two variables.

Victorio
05-24-2016, 05:51 PM
I'm pretty sure when the mob dies there's just a rng to set the exact value of the countdown timer until it repops. GMs can see the value of this timer.
E.g. Repop_timer = 7 days - 8 hours + ran(0 9600)*6 sec

Zaela
05-24-2016, 06:48 PM
Every time point within the window is equally probable.

When possible spawn times within the window have passed, the remaining times are still all equally probable, just with the time that has passed excluded (you could say their probability is redistributed among all remaining times).

1.0 / (TotalTimePointsInWindow - TimePointsThatHavePassed) = ProbabilityPerRemainingTimePoint

No real advantage to looking at it this way.

kgallowaypa
05-25-2016, 09:08 AM
Every time point within the window is equally probable.

When possible spawn times within the window have passed, the remaining times are still all equally probable, just with the time that has passed excluded (you could say their probability is redistributed among all remaining times).

1.0 / (TotalTimePointsInWindow - TimePointsThatHavePassed) = ProbabilityPerRemainingTimePoint

No real advantage to looking at it this way.


I follow you, but it depends on which perspective you look at it from. If "Every time point within the window is equally probable.", then you are looking at the probability when the window is not open.

but this does not logically add up to me:

"When possible spawn times within the window have passed, the remaining times are still all equally probable,".

The chance to reach 100% does not disappear if the time has passed, so either way each event seen as pop=yes // pop=no continuously changes the distribution until the last event.

And of course there is no way to beat the RNG, but statistically I heard from a friend that if you wanted to camp something, it would benefit you to sock the mob when the window is around 25% chance in the last few hours if it has not popped because the chance becomes greater as the window closes, versus camping the entire 16 hour. Sure you could get lucky and get a pop on the first TICK...but statistics aside and probability of that event occurring is a huge outlier and a very unusual occurrence, even in RNG world.

If you wanted to take this further, maybe someone could do a series of /random 100 and see if there is a correlation between the quartile ranges 1-24,25-49,50-74, and 75-100. If its a true RNG, there should be no correlation and no bell-curve distribution but who knows, this is a old game.

Raev
05-25-2016, 10:33 AM
So in this example, on the 3rd hour of the window, the next hour becomes 7.69% , 8.33% on the 4th hour, etc.

Yes. It's called conditional probability.

Personally I think we should have exponential windows, where the probability of a spawn on every tick is the same.

Zaela
05-25-2016, 11:37 AM
The chance to reach 100% does not disappear if the time has passed, so either way each event seen as pop=yes // pop=no continuously changes the distribution until the last event.

I don't follow you. If I understand what you said here, I don't see how it disagrees with anything I said (or the ultra-simple equation there).

I'm not a math person and might just be embarrassing myself, but...

The probabilities of each as-yet-possible time always add up to 100%. That's pretty clear in the equation you quoted there -- we divide 1.0 (100%) by the remaining possible times. If you agree that every time point is equally probable at all, then the way I see it, you should agree that they are equally probable from every reference point before the actual event.

When 3 out of 16 possible hours have passed, each of the remaining 13 hours has a ~7.69% chance. When 4 out of 16 have passed, each of the remaining 12 hours has a ~8.33% chance. All of the remaining hours are equally probable at each point you stop to look at it, whenever that may be. They aren't literally becoming more likely over time -- we're just narrowing the window by excluding times where it could have happened, but didn't. It's true that after the 3rd hour passes, the 4th hour has an 8.33% chance... but so does the 5th, 6th, 7th, 8th, 9th... We can't pick out one specific hour and say 'aha, this is the most likely one now', so the information is no advantage. The "failed" probabilities of past times are distributed among all remaining times equally.

As someone said, there is almost certainly only one dice roll. The first 25% is as likely as the last 25%, going into it. And it may be an old game, but that's no reason for the server not to use a quality PRNG (they aren't hard to find code for these days).

And I may not be able to back it up, but personally I'm sceptical of the "wait til near the end" comments. I would look at it the other way around. It's a zero-sum game. The first 50% and the last 50% are equally likely... but if it does happen during the first 50%, then, from that vantage point, there's 0 remaining chance that it will happen during the last 50%. The likelihood that you'll get screwed by an early spawn increases the longer you wait to camp. Of course, if it does spawn before you even bother to show up, then you're not likely to wait around for the remains of the now-irrelevant window... but you won't get the loot either. If you only show up during the last 25%, then you won't have to wait long at worst... but there will also be a 75% chance that there will be nothing to wait for by that point, assuming you have competition.

kgallowaypa
05-25-2016, 12:46 PM
I don't follow you. If I understand what you said here, I don't see how it disagrees with anything I said (or the ultra-simple equation there).

I'm not a math person and might just be embarrassing myself, but...

The probabilities of each as-yet-possible time always add up to 100%. That's pretty clear in the equation you quoted there -- we divide 1.0 (100%) by the remaining possible times. If you agree that every time point is equally probable at all, then the way I see it, you should agree that they are equally probable from every reference point before the actual event.

When 3 out of 16 possible hours have passed, each of the remaining 13 hours has a ~7.69% chance. When 4 out of 16 have passed, each of the remaining 12 hours has a ~8.33% chance. All of the remaining hours are equally probable at each point you stop to look at it, whenever that may be. They aren't literally becoming more likely over time -- we're just narrowing the window by excluding times where it could have happened, but didn't. It's true that after the 3rd hour passes, the 4th hour has an 8.33% chance... but so does the 5th, 6th, 7th, 8th, 9th... We can't pick out one specific hour and say 'aha, this is the most likely one now', so the information is no advantage. The "failed" probabilities of past times are distributed among all remaining times equally.

As someone said, there is almost certainly only one dice roll. The first 25% is as likely as the last 25%, going into it. And it may be an old game, but that's no reason for the server not to use a quality PRNG (they aren't hard to find code for these days).

And I may not be able to back it up, but personally I'm sceptical of the "wait til near the end" comments. I would look at it the other way around. It's a zero-sum game. The first 50% and the last 50% are equally likely... but if it does happen during the first 50%, then, from that vantage point, there's 0 remaining chance that it will happen during the last 50%. The likelihood that you'll get screwed by an early spawn increases the longer you wait to camp. Of course, if it does spawn before you even bother to show up, then you're not likely to wait around for the remains of the now-irrelevant window... but you won't get the loot either. If you only show up during the last 25%, then you won't have to wait long at worst... but there will also be a 75% chance that there will be nothing to wait for by that point, assuming you have competition.

Now I understand, excellent post :) was a fun thought experiment, so at the end of the day, praise the RNG gods and sock the window to its fullest and grow a neckbeard.

fauxreigner
05-25-2016, 05:03 PM
I did not read the thread, because I am lazy. My apologies if this was addressed earlier.

I think you might be interested in a random process called the Poisson Process. It can be used to model random events such as time between radioactive emissions, customer arrivals at stores, or monster spawns in MMORPGs.

Here's a link to some math: http://www.math.uah.edu/stat/poisson/index.html