haarhaarhaar Posted August 16, 2020 3 hours ago, lenticular said: You need to also include the probability of a miss. The probability of getting exactly 4 hits out of 5, when each has an 87.75% chance is 0.8775^4 * (1-0.8775)^(5-4) * 5choose4. And the probability of at least 4 hits is 0.8775^4 * (1-0.8775)^(5-4) * 5choose4 + 0.8775^5. Basically, you're including all the different ways of getting the result, but not fully accounting for how unlikely each specific outcome is, which is over-inflating your numbers. Thank you so, so much for spotting this! It's really appreciated. Have just put a warning into my previous post. 3 hours ago, Whisky said: I’ve studied statistics and probability a little bit but I’ve never been good with permutations. I prefer to do my calculations with binomial distributions. The file I attached earlier has two tables on the right side of the ‘Main Sheet’, one for Hits, and one for Crits (and one for Crests but that’s not important). The Hits table uses binomial distribution to calculate the probability of Hitting y number of times out of x number of Attacks, and is dependent on the number of Attacks, which for Astra will be 5 so we will only be using the ‘5 Attacks’ column. For the Crits table, the column we use will vary depending on the probability of getting x number of Hits calculated back in the Hits table. The Crits table again uses binomial distribution to calculate the probability of getting y number of Crits out of x number of Hits. We will need to use every column of this table for our calculations. We can multiply across the two tables to get our calculations. For example, there is only one way to get a 3.0x multiplier; by Hitting 4 times with 3 of those being Crits. So I multiply the ‘4 Hits’ underneath of the ‘5 Attacks’ column of the Hits table, with the ‘3 Crits’ underneath the ‘4 Hits’ column in the Crits table. 36.32% * 34.56% = 12.55%. I went through this process for every possible multiplier of Astra with 0x being the minimum and 4.5x being the maximum. Then I Summed all of the results from 3.0x and above. The final calculation for doing at least 3.0x damage with 87.75% true Hit and 60% Crit is 52.77%. Hopefully that helps. Let me know you have any questions. Thanks so much for doing that, and for writing out the correct numbers. Your spreadsheet is really, really helpful for this too - thanks for posting! Quote Share this post Link to post Share on other sites
Owns Posted August 16, 2020 (edited) The way I've been doing these calculations is to look at them in terms of for example P(at least 1 of 2) = 1 - P(not 1 of 2) = 1 - P(0 of 2) since the only way to not get (at least 1 of 2) is if you get (0 of 2). I think this simplifies things quite a bit, and the nice thing about considering "at least" something is that you don't need to consider all permutations, it's automatically in there. Also the fact that we're more interested in getting say "at least 3*damage" than we are in getting "exactly 3*damage" which has a lower probability of happening. In the above equation I too have been using binomial distribution formula to get the P(0 of 2) part. If I'm looking at Astra P(at least 3 of 5), then I'm asking: P(at least 3 of 5) = 1 - P(0 of 5) - P(1 of 5) - P(2 of 5) and so on for cases other than at least 3 of 5, using Binomial distribution functions for all the P(x of y) bits. For anyone interested seeing my formulas, here's a link the google sheet I used to generate my first set of plots (assuming always 100% hit). Scroll down and to the right for the Astra stuff: https://docs.google.com/spreadsheets/d/1w3nEIWF3rA3mYgmLe5iUiPOTgvc9_C-_LNEwsv-15nc/edit?usp=sharing For the case of wanting at least 3*damage, we want to know Astra P(at least 3 crits AND at least 1 normal hit). Correct me if I'm wrong but I think this is the same as saying P(at least 3 of 5 crits AND at least 1 of 2 hits) = P(at least 3 of 5 crits) * P(at least 1 of 2 hits) since in this case, i think the technical term is we are not doing "replacement", meaning there's no overlap between the odds of getting 3 crits and getting the 1 hit. If I got 3 crits out of 5, I only have 2 attempts remaining to get 1 normal hit, or vice versa. If this logic is correct (and i'm not entirely sure it is, but I think so) then for: 4 hours ago, Whisky said: The final calculation for doing at least 3.0x damage with 87.75% true Hit and 60% Crit I'm actually getting 54.1% chance which is slightly higher than @Whisky's value of 52.77%. With this type of calculation our results should be exactly the same. I'm thinking maybe we are putting a multiplier in different spots somewhere, unless you happened to use rounded figures anywhere in your process? The way I'm taking the probability "per crit" while taking into account Hit is I use Crit*True-Hit as the probability. So in this case for the "at least 3 crits part" the odds are 0.8775*0.6=0.5265 is the probability that would go into the Binomial.Dist function. Admittedly I'm not certain that the way I did it is correct but let's look at a simpler case. For the "at least x2.7 damage" case, I think the only possible way to get that with Astra is "at least 3 crits". If so then "at least x2.7 damage = at least 3 of 5 crits" which for 75 Hit (87.75 true) and 60 crit, which I calculate as roughly ~55% (looking it up from the plot in my previous comment, so not an exact figure). This is lower than what you listed (66.95%). Either one of us calculated something wrong, or I'm missing another possible way of getting x2.7 damage with odds that should be added to my value. I don't have the time at the moment to double check everything but I will when I get the chance and will check your excel sheet as well. Edited August 16, 2020 by Owns Quote Share this post Link to post Share on other sites
haarhaarhaar Posted August 16, 2020 1 hour ago, Owns said: Either one of us calculated something wrong, or I'm missing another possible way of getting x2.7 damage with odds that should be added to my value. Did you include the chance of 2 crits and 3 hits? 1 hour ago, Owns said: For the case of wanting at least 3*damage, we want to know Astra P(at least 3 crits AND at least 1 normal hit). Correct me if I'm wrong but I think this is the same as saying P(at least 3 of 5 crits AND at least 1 of 2 hits) = P(at least 3 of 5 crits) * P(at least 1 of 2 hits) since in this case, i think the technical term is we are not doing "replacement", meaning there's no overlap between the odds of getting 3 crits and getting the 1 hit. This makes sense to me, although I'm not feeling super confident in my maths at the moment. Quote Share this post Link to post Share on other sites
Owns Posted August 17, 2020 (edited) 5 hours ago, haarhaarhaar said: Did you include the chance of 2 crits and 3 hits? I did not, so this missing piece automatically means my value should be higher, thanks for pointing this out. My brain's a bit too tired to attempt this tonight though. Calculating things in terms of xdamage is inevitably more complicated because there might be multiple ways to achieve any particular value, but I think you were right to frame things in this way because it is more useful/meaningful and makes direct comparisons to the damage of other classes easier as well. Edited August 17, 2020 by Owns Quote Share this post Link to post Share on other sites
Whisky Posted August 17, 2020 (edited) 7 hours ago, Owns said: Admittedly I'm not certain that the way I did it is correct but let's look at a simpler case. For the "at least x2.7 damage" case, I think the only possible way to get that with Astra is "at least 3 crits". If so then "at least x2.7 damage = at least 3 of 5 crits" which for 75 Hit (87.75 true) and 60 crit, which I calculate as roughly ~55% (looking it up from the plot in my previous comment, so not an exact figure). This is lower than what you listed (66.95%). Either one of us calculated something wrong, or I'm missing another possible way of getting x2.7 damage with odds that should be added to my value. I don't have the time at the moment to double check everything but I will when I get the chance and will check your excel sheet as well. Like Haar said, there is another way to get 2.7x damage; 5 Hits with 2 of them being Crits. 7 hours ago, Owns said: I'm actually getting 54.1% chance which is slightly higher than @Whisky's value of 52.77%. With this type of calculation our results should be exactly the same. I'm thinking maybe we are putting a multiplier in different spots somewhere, unless you happened to use rounded figures anywhere in your process? The way I'm taking the probability "per crit" while taking into account Hit is I use Crit*True-Hit as the probability. So in this case for the "at least 3 crits part" the odds are 0.8775*0.6=0.5265 is the probability that would go into the Binomial.Dist function. 7 hours ago, Owns said: P(at least 3 of 5 crits AND at least 1 of 2 hits) = P(at least 3 of 5 crits) * P(at least 1 of 2 hits) Okay, this one took me a while to figure out but I got it. There are two things to consider. First of all, P(at least 3 of 5 Crits) includes getting 3, 4 or 5 Crits. If you get 4 or 5 Crits, you won't have 2 more Attacks to multiply with and if you get 4 or 5 Crits, you will already be higher than 3.0x damage. Here's the probability for all three, using binomial distribution with 0.5265. P(3 of 5 Crits) = 32.72% P(4 of 5 Crits) = 18.19% P(5 of 5 Crits) = 4.05% The 18.19% and 4.05% will stay as they are because they already put us over 3.0x, we don't multiply them by (1 of 2 Hits) (and we can't because we don't even have 2 more Attacks if we already got 4 or 5 Crits). So the 32.72% is the only part we will multiply by the (1 of 2 Hits) and then we will add the result to the 18.19% and 4.05%. Secondly, you used .8775 to calculate (1 of 2 Hits) however, .8775 is not the probability of getting a normal Hit. It's the probability of getting a normal Hit or a Crit, but Crits have already been accounted for. the 32.72% already accounts for getting 3 Crits. This means that we know that the last 2 Hits are not Crits. They can be either normal Hits or Misses and we need (1 of 2 Hits). Now, this is where it gets complicated. .5265 is the probability of getting a Crit, as you already calculated. .3510 is the probability of getting a normal Hit (.8775 * (1-.60)). .1225 is the probability of getting a Miss (1- .8775) So how do we calculate (1 of 2 Hits) given that those Hits are not Crits? That only leaves .3510 and .1225 which does not add up to 1 and won't work properly for a binomial distribution. So I divided .3510/.1225 = 2.87. So the odds are 2.87:1. So .1225 (Miss) = 1 .3510 (normal Hit) = 2.87 We need to add them both together to get to 100. Right now they only add to 3.87. So how much do we need to multiply them both by to get to 100? Divide 100/3.87 = 25.87. 1 * 25.87 = 25.87 2.87 * 25.87 = 74.13. 25.87 + 74.13 = 100 .2587 + .7413 = 1 Now we have probabilities for getting a normal Hit or a Miss and that add up to 1. This works because the probabilities are proportionally the same as .1225 compared to .3510. Now, using a binomial distribution with .7413 as the probability of getting a normal hit to calculate (at least 1 of 2 Hits) = 93.31%. We can now multiply 32.72% * 93.31% + 18.19% + 4.05% = 52.77% I attached an updated version of my Excel file that shows a much easier way to calculate this over on the right side of the 'Main Sheet' I made some other improvements to the file as well but it is still incomplete. I recommend calculating the probability of each possibility instead of only calculating the (at least x) probabilities. My updated file as probabilities for each damage multiplier of Astra from 0x to 15x (15 Astra Hits is 4.5x normal Hits). Calculating the probability of each multiplier allows us to Sum all of them to make sure that they equal 100% and if you don't get 100% then you know that you made a mistake somewhere. Only calculating (at least x) probabilities will make it harder to double check because there will be overlap and they will not add to 100%.Battle Forecast Calculator.xlsx Edited August 17, 2020 by Whisky Quote Share this post Link to post Share on other sites
Owns Posted August 17, 2020 (edited) Spoiler Okay, this one took me a while to figure out but I got it. There are two things to consider. First of all, P(at least 3 of 5 Crits) includes getting 3, 4 or 5 Crits. If you get 4 or 5 Crits, you won't have 2 more Attacks to multiply with and if you get 4 or 5 Crits, you will already be higher than 3.0x damage. Here's the probability for all three, using binomial distribution with 0.5265. P(3 of 5 Crits) = 32.72% P(4 of 5 Crits) = 18.19% P(5 of 5 Crits) = 4.05% The 18.19% and 4.05% will stay as they are because they already put us over 3.0x, we don't multiply them by (1 of 2 Hits) (and we can't because we don't even have 2 more Attacks if we already got 4 or 5 Crits). So the 32.72% is the only part we will multiply by the (1 of 2 Hits) and then we will add the result to the 18.19% and 4.05%. Secondly, you used .8775 to calculate (1 of 2 Hits) however, .8775 is not the probability of getting a normal Hit. It's the probability of getting a normal Hit or a Crit, but Crits have already been accounted for. the 32.72% already accounts for getting 3 Crits. This means that we know that the last 2 Hits are not Crits. They can be either normal Hits or Misses and we need (1 of 2 Hits). Now, this is where it gets complicated. .5265 is the probability of getting a Crit, as you already calculated. .3510 is the probability of getting a normal Hit (.8775 * (1-.60)). .1225 is the probability of getting a Miss (1- .8775) So how do we calculate (1 of 2 Hits) given that those Hits are not Crits? That only leaves .3510 and .1225 which does not add up to 1 and won't work properly for a binomial distribution. So I divided .3510/.1225 = 2.87. So the odds are 2.87:1. So .1225 (Miss) = 1 .3510 (normal Hit) = 2.87 We need to add them both together to get to 100. Right now they only add to 3.87. So how much do we need to multiply them both by to get to 100? Divide 100/3.87 = 25.87. 1 * 25.87 = 25.87 2.87 * 25.87 = 74.13. 25.87 + 74.13 = 100 .2587 + .7413 = 1 Now we have probabilities for getting a normal Hit or a Miss and that add up to 1. This works because the probabilities are proportionally the same as .1225 compared to .3510. Now, using a binomial distribution with .7413 as the probability of getting a normal hit to calculate (at least 1 of 2 Hits) = 93.31%. We can now multiply 32.72% * 93.31% + 18.19% + 4.05% = 52.77% I attached an updated version of my Excel file that shows a much easier way to calculate this over on the right side of the 'Main Sheet' I made some other improvements to the file as well but it is still incomplete. I recommend calculating the probability of each possibility instead of only calculating the (at least x) probabilities. My updated file as probabilities for each damage multiplier of Astra from 0x to 15x (15 Astra Hits is 4.5x normal Hits). Calculating the probability of each multiplier allows us to Sum all of them to make sure that they equal 100% and if you don't get 100% then you know that you made a mistake somewhere. Only calculating (at least x) probabilities will make it harder to double check because there will be overlap and they will not add to 100%.Battle Forecast Calculator.xlsx Thanks for this @Whisky. With your help I finally figured out the "simpler" way of calculating it by using the complement. What we really want when I was saying before at least 3 crits and 1 hit is that we want all possible ways of getting at least 3 crits and no more than 1 miss. P(at least 3 crits and no more than 1 miss) = P(at least 3 crits) - P(3 crits and 2 misses) where P(3 crits and 2 misses) include all permutations of that. The other oversight I had is that the odds must be considered differently now that we are distinguishing between normal hit and crit (which I wasn't doing the first time), so as you pointed out we use: P(miss) = 1 - Hit = 0.1225 P(hit, no crit) = Hit * (1 - Crit) = 0.8775*(1-0.6) = 0.351 P(crit) = Hit * Crit = 0.5265 From the above formula we already have P(at least 3 crits) calculated from before as 0.549595, but this doesn't care whether the remaining 2 attempts are hit, miss, or crit. What we are looking for now is to exclude getting more than 1 miss, ie. P(3 crits and 2 misses) P(3 crits and 2 misses) = P(3 crits) * P(2 misses) * [permutations (with repeats)] P(3 crits and 2 misses) = 0.5265^3 * 0.1225^2 * [ 5! / (3! * 2!) ] = 0.5265^3 * 0.1225^2 * 10 P(3 crits and 2 misses) = 0.021901 and finally, P(at least 3 crits) - P(3 crits and 2 misses) = 0.549595 - 0.021901 = 0.527693 = 52.77% Okay, I say this is the simpler way but in reality I don't think I would've reached this without you first doing it the more complete way of listing all possibilities and like you say that approach gives the necessary check to see that things sum to 1 so we know we aren't messing up. But I think it's nice to work it out this way as well because it helps build intuition and makes it easier when I need to solve a similar problem. Anyway, thanks again. With this, it's possible for me generate the above contour plots in terms of at least xdamage as opposed to at least ncrits, if I wanted to. Not sure that I will, but if I ever want to, I can. I don't plan on doing so, but I was thinking that if one really wanted to compare all the different classes then one way to analyze them would be to generate an (x,y) plot with damage on 1 axis, probability on the other axis, then for each class have a histogram (dots) of where the class damage is expected to be against all endgame enemy units. Each dot represents one possible outcome against one possible enemy. So you can imagine for each class a circular region on the plot where there's more dots closer to the center and fewer near the edges. In the end basically the class with a circle whose center is higher and more to the right than others is "better" (or at least deals that amount of damage more consistently). The smaller the circle, the more reliable the damage. Along the damage axis, one could add labels of enemy unit names at the damage threshold needed to kill that enemy (taking into account hp and total prot). I might be missing some consideration but I think this would work. Edited August 17, 2020 by Owns Quote Share this post Link to post Share on other sites
starburst Posted August 17, 2020 What an interesting thread, mate! I am not getting deep into numbers, but more into the logic of it, for I have no intention of touching this game again. I congratulate you and thank you at the same time. One thing that I like to mention about critical hits is the the probability of missing a critical hit when doubling of simply attacking multiple times. For example, when an enemy has a 9 % critical hit chance and doubles, the possibility of not landing a critical hit on the first hit is 1-0,09= 0,91, but it is 0,91*0,91= 0,83 in two hits. Thus the problem is actually twice as big, for it has a 1-0,83= 17 % chance of landing at least one critical hit. And in games like Conquest, where HP is low and a single critical hit kills the majority of units, a 17 % chance of getting killed is not something to let go. It is a trick that gets us often, specially when the chance is low. Say, a boss with a 4 % critical hit chance whom you had to hit seven times to kill, it actually had a (1-0,04)^7= 25 % chance of landing a crit on and kill you by the end. Quote Share this post Link to post Share on other sites
haarhaarhaar Posted August 17, 2020 3 hours ago, Owns said: I don't plan on doing so, but I was thinking that if one really wanted to compare all the different classes then one way to analyze them would be to generate an (x,y) plot with damage on 1 axis, probability on the other axis, then for each class have a histogram (dots) of where the class damage is expected to be against all endgame enemy units. Each dot represents one possible outcome against one possible enemy. So you can imagine for each class a circular region on the plot where there's more dots closer to the center and fewer near the edges. In the end basically the class with a circle whose center is higher and more to the right than others is "better" (or at least deals that amount of damage more consistently). The smaller the circle, the more reliable the damage. Along the damage axis, one could add labels of enemy unit names at the damage threshold needed to kill that enemy (taking into account hp and total prot). I might be missing some consideration but I think this would work. Firstly, thanks to you and @Whisky for nailing the numbers on this - it's really interesting in its own right, regardless of how usable SM is or isn't. Also your idea of comparing classes is really cool, although potentially too complicated to do in reality (factoring in crests/skill sets/weapons will quickly make things unwieldy, and in some cases it's quite difficult to divorce those from the class itself). I've occasionally thought about making outcome tables for FE maps (the chance of fulfilling the map objective given auto-battle) but it's way too much effort to even think about at the moment (for a start, I'd have to learn everybody's AI). But in theory I'd come out with a number that basically sums up how suited to a level your army is on paper, which sounds like fun (to me anyway). Quote Share this post Link to post Share on other sites
Whisky Posted August 18, 2020 Just to clarify; the percentages I posted are rounded in order to cleanly post them here but I did not round them when doing the calculations. Also, I uploaded a new updated Excel file with some improvements, although it is still incomplete. Please let me know if anyone has any other suggestions or requests for how I can improve it further. Quote Share this post Link to post Share on other sites
Owns Posted August 19, 2020 (edited) On 8/17/2020 at 4:28 PM, starburst said: What an interesting thread, mate! I am not getting deep into numbers, but more into the logic of it, for I have no intention of touching this game again. I congratulate you and thank you at the same time. One thing that I like to mention about critical hits is the the probability of missing a critical hit when doubling of simply attacking multiple times. For example, when an enemy has a 9 % critical hit chance and doubles, the possibility of not landing a critical hit on the first hit is 1-0,09= 0,91, but it is 0,91*0,91= 0,83 in two hits. Thus the problem is actually twice as big, for it has a 1-0,83= 17 % chance of landing at least one critical hit. And in games like Conquest, where HP is low and a single critical hit kills the majority of units, a 17 % chance of getting killed is not something to let go. It is a trick that gets us often, specially when the chance is low. Say, a boss with a 4 % critical hit chance whom you had to hit seven times to kill, it actually had a (1-0,04)^7= 25 % chance of landing a crit on and kill you by the end. You're looking at it here from the perspective of the receiving end, but yea this exactly the main point of this thread. Crits can be quite deceiving because the odds go up dramatically when you increase the number of chances available! Glad you enjoyed the thread, it's been quite an involved discussion for me! On 8/17/2020 at 5:15 PM, haarhaarhaar said: Firstly, thanks to you and @Whisky for nailing the numbers on this - it's really interesting in its own right, regardless of how usable SM is or isn't. Also your idea of comparing classes is really cool, although potentially too complicated to do in reality (factoring in crests/skill sets/weapons will quickly make things unwieldy, and in some cases it's quite difficult to divorce those from the class itself). I've occasionally thought about making outcome tables for FE maps (the chance of fulfilling the map objective given auto-battle) but it's way too much effort to even think about at the moment (for a start, I'd have to learn everybody's AI). But in theory I'd come out with a number that basically sums up how suited to a level your army is on paper, which sounds like fun (to me anyway). Yea no worries, and thanks to you as well for raising some important points and contributing with good analysis. Apart from yourself and @Whisky I should probably mention @Cysx too who also contributed with some great points and lengthy analysis. Honestly, this thread ended up being much richer than I anticipated thanks to everyone and I ended up learning a lot as well. On 8/14/2020 at 5:52 PM, LoneRecon400 said: Yeah, I'm the person who made both the spreadsheets and the Imgur Gallery. Looking at it, the AM one is actually incomplete so I'll just withhold it for now. The Black Eagles one (which include SS and CF) is pretty in depth and includes all of an enemies stats, how their stats change with different weapons, battalions, and even benchmarks such as how much speed to double or the amount attack to kill with a crit in one hit. Only thing it's missing really is the paralogues from potential recruits. Other than that, it should have everything you need. Well that's a lot of... recon for a... lone person to do! 😄 Anyway, like I said, these tables are pretty much exactly what I need to drive the calculator I'm working on. It's probably unnecessary to have all the stats for every single map in the game since the goal imo is to be able to see how various class/character setups will do against certain enemies. I imagine people will mostly be interested in endgame enemies, like the final 1-3 chapters of each route, and maybe a select few other maps like possibly chapters 12, 13 and paralogues. That said, I'm happy to include any stats that have already been gathered, who knows what kind of analysis someone can do given more information to work with. So if you have any more data you feel comfortable sharing then please don't hold back. What you've already done gathering all this is the majority of the hard work anyway, which I'll just try to make the most of. Very close now to a first working version of the calculator which I'll be starting a new thread thread about when it's ready (possibly this weekend). One thing that would help if you find yourself with some time to spare is adding a "Unit Type" column that says if the unit is cavalry, flying, armored, monster, dragon, etc. If more than one of those I'd have each entry in a separate column. This is so I can added the correct multiplier to the damage calculation if the chosen weapon/art deals effective damage to an enemy. No worries though if you don't want to bother or don't have the time, I'll add them myself when I can, it's a small thing compared to the impressive amount of info you've already listed. Edited August 19, 2020 by Owns Quote Share this post Link to post Share on other sites
Whisky Posted August 19, 2020 (edited) @Owns Are you going to be adding to the file I uploaded? I’m asking because I still plan to add more to to it but it wouldn’t make sense for us to be adding to it separately. I’ll post another update of it once I’ve added enough to it. Was there anything else you wanted me to work on for it? Drop down lists were already added for Weapons and Combat Arts, and the probabilities of dealing any given amount of damage. I plan to add drop down lists for classes, abilities, Battalions, and Equipment. You were going to work on adding drop down lists for the enemies right? Edited August 19, 2020 by Whisky Quote Share this post Link to post Share on other sites
Owns Posted August 19, 2020 10 hours ago, Whisky said: @Owns Are you going to be adding to the file I uploaded? I’m asking because I still plan to add more to to it but it wouldn’t make sense for us to be adding to it separately. I’ll post another update of it once I’ve added enough to it. Was there anything else you wanted me to work on for it? Drop down lists were already added for Weapons and Combat Arts, and the probabilities of dealing any given amount of damage. I plan to add drop down lists for classes, abilities, Battalions, and Equipment. You were going to work on adding drop down lists for the enemies right? No, it's too different from the format I have in mind which I already had most of in place before I even started this thread. That's besides all the UI stuff involving conditional formatting and other things that I don't think can simply be copied over from excel to google sheets which is the platform I'm using. But it's useful for me to compare calculations with in the early phases, though ultimately I compare with in-game battle predictions. I got a couple of good ideas from your sheet too for some things to add to the display for the user so I'll definitely credit you at least. Quote Share this post Link to post Share on other sites