Latest Diablo 3 News
DiabloWiki Updates
Support the site! Become a Diablo: IncGamers PAL - Remove ads and more!

How to calculate the odds of double damage when combining C-Strike and D-strike?

Discussion in 'Theorycrafting and Statistics' started by Krim, Feb 4, 2008. | Replies: 8 | Views: 1701

  1. Krim

    Krim Banned

    Joined:
    Dec 19, 2006
    Messages:
    154
    Likes Received:
    0
    Trophy Points:
    0
    How to calculate the odds of double damage when combining C-Strike and D-strike?

    Hi all, I'm pretty certain it wouldn't take long to find the formula, but really isn't what I'm interested in. I'm interested in how you find the formula.

    I'd like to try to show how I'd calculate it, yet the results I get doesn't seem to match the correct formula, and if possible, I'd like to know why, and how to calculate to correct formula for odds of double damage when both critical strike (now cs) and deadly strike (now ds) is applied.

    How I'd think it should be calculated:
    Well first of, I see three possibilities, either the game checks if both cs and ds trigger, or it first checks cs, if trigger ds = 0, if not, it checks ds, or vice versa.

    If we set %Cs = 1 / n and %Ds = 1 / m, then I get the following formulas:
    First assumption, the game checks both independently, so what can happen is:
    There can be a trigger of cs only, ds only, and both of them. Given it's cs only, then this can happen 1 times m (I've taken double trigger with) given it's ds only then it can happen 1 time (n - 1) (I'm making sure not to take double trigger with twice). Then there can be a nontrigger for each (m - 1) and that's (n - 1) times, so the formula should be, using the possible triggers divide by the total:
    (m + n - 1) / (n + m - 1 + (n - 1)(m - 1)) = (m + n - 1)/(n * m) =

    %Cs + %Ds - %Cs * %Ds

    Funny enough, this is actually the formula for direct chance adding, P(A + B|I) = P(A|I) + P(B|I) - P(AB|I), where P(AB|I) = P(A|I)P(B|I)
    so I'm pretty certain that this isn't correct.

    Second, if the game first checks for Cs, if trigger %Ds equals zero, if not, it checks for Ds.
    Then Cs will trigger 1 time, and (n - 1) times it won't where Ds will come into play, so when Cs doesn't trigger there'll be (n - 1) ways there still can be double damage. The total amount of possibilities should be, for in case of a trigger n, and then I guess you'd take into consideration that it might not trigger, which will happen (n - 1) times, with for each (m - 1) possibilites, so I get a formula like this:
    (1 + n - 1) / (n + (n - 1)(m - 1)) = n / (n * m - m + 1) =

    %Ds / (1 - %Cs + %Cs * %Ds)

    This formula looks quite weird, and I'm pretty certain it's wrong for calculating the chance of doubling your damage.

    Third, given the damage consider Ds first, and if trigger sets %Cs = 0, then the formula should just be reversed, giving:

    %Cs / (1 - %Ds + %Cs * %Ds)


    So please note, I don't ask for someone to give me the correct formula, what I'm asking for is
    1) What am I doing wrong in my calculations?
    2) How do you deduce the correct formula?

    Thank you.

    Regards Krim
  2. helvete

    helvete IncGamers Member

    Joined:
    Jul 17, 2004
    Messages:
    5,540
    Likes Received:
    10
    Trophy Points:
    467
    Re: How to calculate the odds of double damage when combining C-Strike and D-strike?

    One is checked first, if (and only if) that fails, the other is checked. It's that simple.
  3. RTB

    RTB IncGamers Member

    Joined:
    Jun 21, 2003
    Messages:
    5,112
    Likes Received:
    1
    Trophy Points:
    120
    Re: How to calculate the odds of double damage when combining C-Strike and D-strike?

    In other words:
    total_chance = 1 - (1 - CS_amaskill)*(1 - CS_mastery)*(1 - DS_item)
  4. Krim

    Krim Banned

    Joined:
    Dec 19, 2006
    Messages:
    154
    Likes Received:
    0
    Trophy Points:
    0
    Re: How to calculate the odds of double damage when combining C-Strike and D-strike?

    Thank you for your answers.

    However, unfortunately, it doesn't get me very far.

    I did in my opening post, assume in one instance (or actually two) that the game checks first one, and only if it fails it checks the other one, which I ment by setting the percentage for the other to zero, giving the first one didn't fail.

    So following my opening post, the formulas I deduce are, given either CS is first checked:
    %Ds / (1 - %Cs + %Cs * %Ds)

    And given DS is first checked:
    %Cs / (1 - %Ds + %Cs * %Ds)

    Comparing to RTB's formula which I'm confident is correct:
    1 - (1 - CS_amaskill)*(1 - CS_mastery)*(1 - DS_item)

    Then it seems like I've made some kind of error. I'd really appreciate it, if someone would take the time to explain to me my error, and in what way I should have "thought".

    Thank you.

    Regards Krim.

    Edit: Just to make it clear what I do, I use the formula that the chance of something happen, is the amount of possible outcomes that it can happen divided with the total amount of outcomes.
    In the case where the games skips a test, I set the possible amount of succes at 1, for skipping the test, added with n - 1, for not skipping the test, since then there'll be n - 1 possible ways of it to still succes. Then I divide with the total amount, which I guess should be n, giving the test it skipeed, added with (n - 1) * (m -1) given the test isn't skipped. I hope it maybe makes it more clear to where my mistake might be. Thank you.
    Last edited: Feb 4, 2008
  5. RTB

    RTB IncGamers Member

    Joined:
    Jun 21, 2003
    Messages:
    5,112
    Likes Received:
    1
    Trophy Points:
    120
    Re: How to calculate the odds of double damage when combining C-Strike and D-strike?

    I'm sure one can think of more complex formulae to calculate the chance for double dmg, but it's not really needed.
    The formula I posted works like this:
    you work out each chance not triggering, multiply those by eachother, so that you have the chance of not getting double dmg, then doing one minus that chance, so you get the total chance for double dmg.

    Simplifying the formula (the CS chances for the amazon skill and assassin/barb masteries still don't stack), you could change it to:
    total_chance = CS + (1-CS)*DS
    Which translates to the base CS chance, and added to that the chance that CS doesn't happen multiplied with the chance that DS happens.

    DS in any case happens last, even though it's a trivial difference since 1.10, because it's not possible to gain 100% CS anymore.

    I think this is a case where you tried to find a solution that is more complex than the situation requires.
  6. Krim

    Krim Banned

    Joined:
    Dec 19, 2006
    Messages:
    154
    Likes Received:
    0
    Trophy Points:
    0
    Re: How to calculate the odds of double damage when combining C-Strike and D-strike?

    Thanks, I do understand your formula now, it's a pretty smart way to think about it. I didn't think that there could be numerous ways of achieving a formula for one thing, in my class we've only learned it the way I posted. It's logical that your formula must be correct, I think, wether mine is, I still have my doubts, especially about the scaling factor in the denominator. I must say, it was really a good idea to calculate the chance of it, not to happen, and then just take one minus it. However there's something I'm still not quite certain about, unless the scaling factor is one, how can you be certain that (1 - ds)(1 - cs) is the chance of a non-trigger? I'd have thought it would be (1 - ds)(1 - cs) / (total possible amount of chances of non-trigger, and trigger).

    Regards Krim.
  7. muzzz

    muzzz IncGamers Member

    Joined:
    Apr 10, 2006
    Messages:
    2,422
    Likes Received:
    0
    Trophy Points:
    165
    Re: How to calculate the odds of double damage when combining C-Strike and D-strike?

    It either triggers double damage, or it doesn't. Since there's no third option, the sum of both chances is always 1 (or 100%, whichever you prefer).



  8. Krim

    Krim Banned

    Joined:
    Dec 19, 2006
    Messages:
    154
    Likes Received:
    0
    Trophy Points:
    0
    Re: How to calculate the odds of double damage when combining C-Strike and D-strike?

    Oh yes, that makes sense, thank you. I guess from now on I'll try to find the simplest way to deduce a formula before I start deducing it, so I think there isn't much more in this thread other than to say:

    Thank you all for your help, both to Helvete, RTB, and Muzzz, let's just say I kind of made a real life "level up" in statistics, hehe :laugh:

    Kind Regards

    Edit: I mean it makes sense to me, because both CS, and DS are already in percentage, so in this way the scaling factor is already included so the denominator equals one, just to be clear, in what I think is the correct way of understanding it.



  9. Lazy BerZerker

    Lazy BerZerker Banned

    Joined:
    Feb 10, 2012
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    0
    Re: How to calculate the odds of double damage when combining C-Strike and D-strike?

    Your first formula is correct. The second one is incorrect, a hint is that reversing the order of CS and DS changes the result:
    You have great confidence, success / (success + failure) is a nice way to make math intuitive. With the same terminology, when CS triggers, you only run over n attempts, as CS chance equals 1 / n. When CS does not trigger, you run over n * m attempts. The main error is thus you combine two fractions with different denominators. Fixing this error, we first go with CS trigger or CS does not trigger, over n runs which gives 1 / (1 + n - 1) [Success / (Sucess + Failure)] So far so good. Given CS does not trigger, we now run over m more attempts, but only on those instances where CS did not trigger. Therefore the fraction has to be split up into Success for CS = 1 / n and Failure for CS = (n - 1) / n, and given Failure we have to run over m more instances with 1 success and m - 1 failures: (n - 1) * 1 / (n * 1 + n * (m - 1)) [Which is CS Failure * DS Success / (DS Success + DS Failure)]. Finally this gives 1 / n + (n - 1) / (n + n * (m - 1)) and comparing it to your formula (1 + n - 1) / (n + (n - 1)(m - 1) ), it's easy to see the main error. First that initial 1 (success of CS) is only run over n attempts. Secondly when taking double failure (n - 1)(m - 1) into account, the best way I can explain it is that it's important to remember that the Failure of CS is run over all n attempts. If that's not done, the non-trigger of CS is ommitted, i.e. it's the same as (n - 1) / n = 1. Look at CS Failure * DS Success / (DS Success + DS Failure). The second part is basically % DS = 1 / m, and by setting CS Failure = (n - 1) / n to (n - 1) / (n - 1), combined with not taking into account the extra m runs, the second formula in the quote shows: ((n - 1) / (n - 1)) * 1 / (1 + m - 1) = (n - 1) / (n - 1 + (n - 1)(m - 1)), and not taking the extra runs into account: (1 + n - 1) / (1 + n - 1 + (n - 1)(m - 1)), which is the second formula. With the two mistakes more or less solved, to continue with the correct formula: 1 / n + (n - 1)/(n + n * (m - 1)) = 1 / n + (n - 1) / (n *m) = 1 / n + (1 - 1 / n) * 1 / m = %cs + (1 - %cs) * %ds = %cs + %ds - %cs * %ds, which so happens to be your first formula, which is the correct one. Your logic was sound, but you overlooked some easy to overlook stuff. Easier ways apart from not writing %cs = 1 / n, etc. is to say either cs or not cs and ds: %cs + (1 - %cs) * %ds. Which is the same as either ds or not ds and cs. Or to say not cs and not ds: (1 - %cs)(1 - %ds) = %cs + %ds - %cs * %ds

Share This Page