Thread: Need Help figuring out a statistics problem

1. Knight-Captain of Obvious
Join Date
Sep 2009
Posts
1,900
I think it would be an interesting tool, but probably best to start a thread just on that so the community can pool it's resources to really making it accurate. With all the variables associated with it I don't think it will be easy to quantify with any form of certainty, but may well be worth checking into further.

2. When I post my EHP thread I'll also post a survivability quotient thing in a separate thread and see what people think, though I personally (like I said) am kind of leaning towards no.

3. Registrant
Join Date
Mar 2010
Posts
31
The code is fairly simple. I will convert it to excel and post the spreadsheet here.

PS: I'm at work, so I'm not sure about exactly WHEN I will have time to code this. Hope quite soon, if nobody comes to bother me =)

4. Registrant
Join Date
Mar 2010
Posts
31
Finished.
Please note that VBA used in Excel is really slow.
I simulated the given numbers, and got 98,51% too.
Enable macros and go.
If you just need to sim a few things this would just work out for you. If you want to make something bigger (like simulating every 0.01 change in avoidance) you could get a program in C. Easy to code, fast to run.

Apparently the gateway here won't let me attach things.
If you don't want to mess with your Excel, PM me with your e-mail and I'll send it to you.
If you know how to add macros to Excel, add the code to your sheet and link a button to them. Cells are:

Number of Hits in a Fight 100
Number of Hits taken before death 5
Avoidance 38,32%
Number of Fights to Run 100.000,00
Fights with at least X hits in a row 98510
% of fights 98,51%

Fights with X hits in a row is filled by macro. % of fights is simple division.
Code:
```Private Function SimpleFight(Avoid As Double) As Boolean
Dim hitCount As Integer
Dim Index As Integer

hitCount = 0

For Index = 1 To Cells(1, 2)
If Rnd > Avoid Then
hitCount = hitCount + 1
Else
hitCount = 0
End If

If hitCount = 5 Then
SimpleFight = True
Exit Function
End If
Next Index
SimpleFight = False
End Function

Private Sub Simulate()
Dim Index As Long

Cells(5, 2) = 0
For Index = 1 To Cells(4, 2)
If SimpleFight(Cells(3, 2)) = True Then
Cells(5, 2) = Cells(5, 2) + 1
End If
Next Index
End Sub

Private Sub CommandButton1_Click()
Simulate
End Sub```

5. Originally Posted by Aggathon
I liked the results because it gave eitrigg's oath a smaller delta SQ from our base test values than essence of gossimir (implying that ~100 stam is > just under 2% dodge).
Well the interesting thing about these probabilities is that there is only a certain range of avoidance that these changes matter. Basically a measure of the curvature in the plots. Basically it's a transition region of survivability. If the extra stamina can almost guarantee an extra hit, from a naive look at the numbers it's great in the 3-7 hit range. At 5 hits an extra hit is like an additional 20% over 2% dodge. However if that extra stamina only gets you that extra hit say about 10-20% of the time, then there are regions where 2% wins out, granting 5-10% advantage over the extra hit.

However, such a statistical analysis washes over details about how the extra hit is acquired in timing, the nature of the HPS coming in, etc. The value in avoidance is much easier to evaluate than health. For example, the health can take you from 5 to 5.2 hits, or it can take you from 4.9 to 5.1 hits, where the latter case the health is much more imortant.

6. Registrant
Join Date
Mar 2010
Posts
31
Originally Posted by BruisedOoze
Well the interesting thing about these probabilities is that there is only a certain range of avoidance that these changes matter. Basically a measure of the curvature in the plots. Basically it's a transition region of survivability. If the extra stamina can almost guarantee an extra hit, from a naive look at the numbers it's great in the 3-7 hit range. At 5 hits an extra hit is like an additional 20% over 2% dodge. However if that extra stamina only gets you that extra hit say about 10-20% of the time, then there are regions where 2% wins out, granting 5-10% advantage over the extra hit.

However, such a statistical analysis washes over details about how the extra hit is acquired in timing, the nature of the HPS coming in, etc. The value in avoidance is much easier to evaluate than health. For example, the health can take you from 5 to 5.2 hits, or it can take you from 4.9 to 5.1 hits, where the latter case the health is much more imortant.
Not really. Don't forget that if health can take you from 5 to 5.2 hits, this means healer needs to heal you for 0.8 hits less between the 5 hits. The extra hp is not completely wasted.

Taking 4.9 hits to die instead of 5.1: If somebody can land a very quick heal, or a tick of HoTs happen between the hits... you got healed for 0.2 hits, you survive 5 hits. If you had hp to survive exact 4 hits, you would not have survived (with the hot/fast heal you would have survived 4.2 hits).

If you put 5 hits on the table, you have quite a lot of room. This reaches a point where you can almost assure that there will be heals coming in - instead of like 2-3 hits gibs.

7. Ya, your caveat there is the problem, and why I'm leaning against a survivability quotient. All of this assumes a perfect continuous system, however it is not, it is a random discrete system. The granularity of healing and the stochastic nature of incoming damage make it damned near impossible to model precisely.

Edit: but also I COMPLETELY agree with enricobr.

8. After trying to read that code and failing, I decided to build my own simulator, and I got to the 98.5% number mentioned earlier as well.

I still have no clue where the error in my math and logic is, and that bugs me to no small extent.
I used Euphoria as the language, and my program is ugly as hell.
Code:
```atom hitcount, hitchance, random, bingo, bingocounter, runs, total

bingo=0
hitchance = 617
bingocounter = 0
runs = 1000000

for bigcount = 1 to runs do
bingo = 0
hitcount = 0
for count = 1 to 100 do
random = rand(1000)
if hitchance >= random
then hitcount = hitcount+1
else hitcount = 0
end if

if hitcount = 5
then bingo = 1
end if
end for

if bingo = 1
then bingocounter = bingocounter+1
end if

end for
total = bingocounter/runs
print (1, total)```

9. Originally Posted by enricobr
Taking 4.9 hits to die instead of 5.1: If somebody can land a very quick heal, or a tick of HoTs happen between the hits... you got healed for 0.2 hits, you survive 5 hits. If you had hp to survive exact 4 hits, you would not have survived (with the hot/fast heal you would have survived 4.2 hits).
But the hits in the probability analysis are assumed naively to include the heals. You can't assume heals will take you from 4.9 to 5.1, otherwise you would've assumed you could survive 5.1 hits to begin with. When you're assuming a value on the number of hits you can take you take the ceiling value for best case scenario, because it was assumed and given that 5 hits in a row was the doomsday scenario no matter how contrived the circumstances, which is the big reason for my caveat.

10. Originally Posted by Martie

I still have no clue where the error in my math and logic is, and that bugs me to no small extent.
Your logic works only if you take P_N to be additive rather than multiplicative, where P_1 is the probability you get the required situation on the first event, P_2 the second etc. Look at it with coins and we'll use the condition that we're looking for two heads in a row. The odds we get it on the first event is P_1 1/4 (HH). On the second event is P_2=1/8 (THH). On the third event it's also P_3=1/8 (HTHH +TTHH [1/16+1/16]). On the 4th event is 1/16 (TTTHH+THTHH [1/32+1/32]). So with 5 flips the odds of getting two heads in a row is 9/16 (P1+P2+P3+P4=1/4 +2 1/8 +1/16) for example.

The problem is is that as N starts getting larger P_N gets much more difficult to calculate analytically.

11. has a life
Join Date
Apr 2010
Posts
41
You actually can include heals in max number of hits a tank can survive. All you need to do is calculate how much healing your healers do between two boss strikes on average and deduct that number from each strike before you calculate that critical number of hits. That would solve the problem and let you use the same model.
Last edited by Winterburn; 05-03-2010 at 04:42 PM.

12. Established Registrant
Join Date
Sep 2009
Posts
721
You can do that - but it doesn't account for other factors such as dealing with how long it takes to heal up to full, what the HPS of the tank healers actually is, etc. But it's probably better than nothing.

It was nice to also see some confirmation of what TBC was like towards the end - where having upwards of 75% avoidance meant ridiculous survivability regardless of your health total.

13. Originally Posted by BruisedOoze
But the hits in the probability analysis are assumed naively to include the heals. You can't assume heals will take you from 4.9 to 5.1, otherwise you would've assumed you could survive 5.1 hits to begin with. When you're assuming a value on the number of hits you can take you take the ceiling value for best case scenario, because it was assumed and given that 5 hits in a row was the doomsday scenario no matter how contrived the circumstances, which is the big reason for my caveat.
There's a ton of possible situations, and honestly, by the time you take five hits in a row without healing, you are screwed anyway.
However, the line of thought isn't invalid - even bumping your health from 4.7 to 4.9 hits can save you, and thus the idea of "hp increases must come at whole hit numbers or they are pointless" is a bit silly.

14. Originally Posted by Martie
There's a ton of possible situations, and honestly, by the time you take five hits in a row without healing, you are screwed anyway.
However, the line of thought isn't invalid - even bumping your health from 4.7 to 4.9 hits can save you, and thus the idea of "hp increases must come at whole hit numbers or they are pointless" is a bit silly.
No, the point wasn't that hp increases are pointless in general. It was that as soon as you deal with situations where there is a distinction between 4.7 and 4.9 hits, then using Bernouilli trials to help measure the benefit of health and avoidance becomes tenuous. And using this model as is is a bit silly, because it deals with integer values for hits.

15. Registrant
Join Date
Mar 2010
Posts
31
I believe that discussing the math here is nice. It might change the way we see things, specially with Cata coming. If the boss takes 8 hits to down us there (for example, on a heavy aoe fight), knowing that 80% of the time the tank could survive 4 hits in a row can help the healers.
Nevertheless, this game is not at all about math. Math is a tool to help you try to identify and evaluate your character, the human factor when you get into raiding is the most important.
It is funny, because I am in no way in a top raiding guild. Yet, I just came across this http://www.wow.com/2010/05/03/scatte...-best-hunters/ today, and they state something I really think. It is now about the glyphs, the gear, the rotation. Most of those can be spreadsheet and just found out the optimum way. The difference between the best players and the good players lie in knowing how to use your whole arsenal and how to strategize for the boss.

Yet, I love discussing math and WoW-related things, and this topic is awesome. Specially coming Cata, when we have lower avoidance and higher health pools to be able to take more hits in. I can even foresee self-healing (enraged regeneration, frenzied regen, DK self healing) + cooldowns helping a lot when the healer dies and people are just missing a few % of the boss.

16. Originally Posted by BruisedOoze
No, the point wasn't that hp increases are pointless in general. It was that as soon as you deal with situations where there is a distinction between 4.7 and 4.9 hits, then using Bernouilli trials to help measure the benefit of health and avoidance becomes tenuous. And using this model as is is a bit silly, because it deals with integer values for hits.
But when considering totems, ret paladins, shadow priests, judgement of light, and god-forbid some actual hots, any situation in which you disregard small amounts of healing is irrelevant - that was the point. Even without "real" heals, you are bound to get some bits of health back.

17. Established Registrant
Join Date
Sep 2009
Posts
721
Right, but at that point the breakpoints of 'how many hits can I take in a row' are kind of silly. Yes, you'll likely be taking some passive heals in that time - but it's also likely that you'll be getting some actual direct heals in that time too. That's the sort of thing that a simulator is for.

This is a good talking point - how avoidance helps strings of attacks - and how it's so weak early on in avoiding it, but so great later. It's excellent for showcasing EHP, especially at the lower levels of avoidance we're seeing. But don't mistake it for a simulation or something close to it.

18. Originally Posted by Martie
even bumping your health from 4.7 to 4.9 hits can save you,
Bernouilli trials deal with integer numbers. Such as 1,2,3,4,5 etc. Is 4.7 or 4.9 an integer? No. Is the difference an integer? No. Can the Bernouilli trials by itself used to evaluate these differences? No it can't. So

then using Bernouilli trials to measure the benefit of health and avoidance becomes tenuous.

19. Originally Posted by BruisedOoze
Bernouilli trials deal with integer numbers. Such as 1,2,3,4,5 etc. Is 4.7 or 4.9 an integer? No. Is the difference an integer? No. Can the Bernouilli trials by itself used to evaluate these differences? No it can't. So
I think you misunderstand what he is saying. You can use the bernoulli trials to find the integer values, because that is the actual raw number of actual swings you can take. However, what he's saying (I think) is that the benefit of the non integer value closest to it, even if it is a fraction, is still beneficial to increasing survivability. It's still widening the buffer because even a small heal not equal to current HPS on the tank (or small cooldown, etc.) can push you over into the next swing cycle and give you that many more seconds to live or be healed back to full.

At least that's how I would interpret it, and I think it's a valid argument.

20. Originally Posted by BruisedOoze
Bernouilli trials deal with integer numbers. Such as 1,2,3,4,5 etc. Is 4.7 or 4.9 an integer? No. Is the difference an integer? No. Can the Bernouilli trials by itself used to evaluate these differences? No it can't. So
Wikipedia tells me Bernouilli trials deals with booleans, I have no clue how you want to apply them here.

My entire point was that there is a line of though that tells people "calculate the amount of hits you can take without dying," which is rather limited, and old-fashioned. There are so many different forms of healing going on in a well-balanced raid that even without direct healing, you are bound to take some healing, even if the actual amount varies. Thus, when calculating the amount of blows you can take you should build in some amount of uncertainty.
For example, if you are at 4.1 hits health, you won't survive 5 hits. When at 4.6 hits health, you probably won't survive 5 hits. When at 4.9 hits health, you probably will survive five hits, and when above 5 hits health, you are guaranteed to survive unless a DK casts hysteria on you.

I should add that, though I understand the value of the "live X hits" idea in some situations, I've always opposed applying the theory on everything, and the more I've raided, the more that opposition grows. In ICC, Marrowgar, Gunship, Saurfang, Festergut, Putricide and Sindragosa all have changing boss damage as their core mechanics. Most heavy hitters, especially when progressing, two- or threehit tanks, making the idea of "surviving without healing" to be a pipe dream. There are very few bosses that don't do all kinds of nasty stuff with tanks, most bosses that only melee either do insignificant melee damage, or they are heavy hitters.
Last edited by Martie; 05-05-2010 at 01:36 AM.