Sunday 3 March 2013

Science applied to fictional turrets

This weekend, I randomly found myself reading this blog entry by Azual Skoll at The Altruist espousing what the author claimed was a "scientific" refutation of the claims made here by Ripard Teg. It's very easy for people to (whether by innocent error or malicious intent) to make flawed analysis of things, and because we live in a world where people are not expected to have a sound understanding of probability and statistics, there is often not the scrutiny applied to these analyses that there otherwise should be, and when I ready Azual's entry, my "bad science" alarm went off immediately at the lack of any words like "likelihood" or "expectation value" so I decided to check for myself.

Before I make my criticism, I want to make something very clear: there is much that is laudable about Azual's post: there is a clear statement of methodology and the construction of hypotheses designed to test a premise that are clear, cogent, and repeatable. All of the basic foundations of his analysis are present and correct. Azual's post is not bad science by any measure that you see around you in the real world. No person reading his post should ever for one moment think "this is a bad way of doing things". It isn't. His opinions are clearly separated from the data which he collects and analyses and at no time does he try and state that one is the other. This is rarely found in today's world, and should be held up as a good example of others. It was, for me, lacking one crucial ingredient, and this will hopefully become clear as I fill in the approach I took in checking the analysis

Theoretical Analysis

There is a glaring preface I need to make to this. I have approached this purely from a mathematical treatment. I haven't even logged into Eve in order to test these numbers - this is a spherical cow analysis designed to isolate the important behaviour without extraneous variables. Weaknesses in the analysis can therefore come from three sources:
  1. Mathematical error - It's been a long time since I left university. Even if I did spend 9 years of my life there in labs and in front of analyses, I'm rusty. Even if I wasn't, don't take what I say as gospel. That's bad science. Check for yourself.
  2. Exclusion of "real world" considerations that have material bearing on the behaviour of the model - as the people who pioneered QED found out: your theory may produce some of the most precise agreement with experimental measurements that has ever been, but if it claims that all of your particles have zero mass when they clearly don't, then there's something missing
  3. I got a formula wrong in my spreadsheet. Never discount human error.
I also have a pre-conceived opinion that larger guns do disproportionately well against smaller targets (especially as compared to missiles) and whilst I have tried to keep this analysis free from bias, such things can always colour the approach I take.

Expectation values and DPS

What I found missing from Azual's analysis was any discussion of expected DPS. Firing guns at someone is a probabilistic event which I am modelling as a single event independent of gun grouping. As per evelopedia I am defining the applied DPS, based on a base DPS Do as follows


where x is a random number generated in the range [0,1[
Pcrit is the probability of a wrecking shot
Phit is the probability of the shot hitting.
Note that this is explicitly for the condition


 The opposite case I'll mention later. The question then becomes, given the model defined above, what is the expectation value of D that we can expect? I'm going to define this as the sum of two sub-terms, W (for wrecking) and S (for standard), and talk about each one separately.

Random numbers and binning

I'm going to assume that the random number generator is perfect in terms of quality, but that it distributes numbers in bins of width k and treat this as a finite discrete series of data rather than a continuum. This simply is an acknowledgement that numbers are generated to a finite number of decimal places, and the change this makes when comparing to a continuous distribution. If we convert the second case (S) where the random number lies in the "normal hit" range, then we note the following:
  • First value of x: Pcrit + k
  • Last value of x: Phit
  • for each bin, i

where Nb is the number of bins in the range we care about. This allows us to derive the expectation value term S.
which if we expand out Nb
Finally, in the limit that k tends to 0 (which is almost true) we can write S as:





The derivation of W in the same condition is trivial, and not included here. We will merely  state it as





allowing us to state the expectation value for the DPS as follows


This gives us a baseline estimate for comparison of different turret types for instances where the probability to hit is greater than the wrecking hit chance. In the case where this is not true, it is trivial to see that S=0 and W only applies (up to the point where x=Phit and is 0 otherwise).

Evaluation

Having constructed a workable formula, let's apply the situation as tested by Azual

it should be noted that I got the raw DPS figures from pyfa and the fits provided in Ripard's post. Everything else was sourced from Azual's analysis. The actual value of the DPS figure is less important than the values relative to one another (because of resists etc that will change the applied DPS).
At first blush, this seems like a solid confirmation of Azual's analysis. Everything is as you would expect. What caught my eye, though, is that Azual made the choice to substitute the Uranium in Ripard's fit for Iron. Without wanting to put words in Ripard's mouth, a reason to choose Uranium is that the optimal range is the same as a Ferox with spike. Of course this might not have any effect, but this needs to be established.


As you can see the picture is quite different. The larger guns are performing significantly better against a small mwd target (even with tracking computers) than the large guns at the 60-90km range, but the signature of an mwd cormorant is large, so this is not unexpected. The results at 300m/s (and 90 sig radius) are as follows

Iron Naga - 300m/s
Uranium Naga - 300m/s
Again, the naga massively outperforms the non-TC'd ferox when equivalent range ammo is loaded.

Conclusion to the analysis

From this short analysis, it would seem to be the case that the increase in DPS afforded by using shorter range ammunition much more than compensates for the loss in DPS caused by the difference in sig radius in the absence of tracking computers. Elimination of tracking as a factor shows that even for a good percentage of the stated engagement envelope, the increased DPS matters more than the difference in sig radius. Further extensions to the analysis would be to examine how the dps profiles change with further changes in ammo type as the range decreases.

Conclusion to the criticism

As I took great pains to point out at the start, there was nothing WRONG with the analysis Azual performed, but it lacked a theoretical underpinning to establish the validity of some of the choices made, and in the case of ammunition choice, this would have had an affect, though not on all of his conclusions, and as it's a quiet sunday evening, I'm indulging my pedantry :)

Monday 24 September 2012

Can we have democracy without informed consent

Someone on the BBC comments section made me make a blog. It was either that or rage at the 400 character message limit and craft a reply that didn't really have much to do with the discussion at hand. Essentially, in a comment on a blog by Nick Robinson, the following comment was posted.
These LibDems think they have a natural right to power. The 57 are holding the country to ransom. Their leaders are a typical Oxbridge elite who see their way as the only way & democracy as for the plebs. We don't want this govt, we want a General Election NOW!
-- nickthesocialist
I'm all for ranting invective, but certain key things bug me - and one of those is when people use phrases like "Oxbridge elite" in a context clearly designed to be spoken in the same tone of voice (and for pretty much the same reasons) as a 70's skinhead saying the words "dirty foreigner". The following reply thus issued forth from my mighty internet steed.
> Rails against lack of democratic spirit in the political elite
> Demands that a democratic election be set aside

Doublethink at its finest!

We the people chose this government (really, we did - there was no rational democratic choice to make a coalition with labour at the time and a minority government wasn't in the national interest) so we get to live with it, for better or worse.
-- me
Which, in turn yielded the following response:
Whisper it quietly Bob: "no informed consent from votes without reasonable public understanding of facts and principles, and without reasonable debate reflecting the full range of views having support in reason and / or in numbers"

The 'reasonable' will prevail when we have adult understanding and settlement on Equal Democracy

Until equal, 'free' - obliged - 'to calculate'
-- All for All
This reply gave me pause. My instant reaction was to think "yes and whilst we're at it I'd like a million pounds and an indestructible robot body please", but then I thought to question why it was that I thought such a thing, and was this utopian ideal of a perfectly informed electorate ever plausible?

Informed consent would appear to be, on first examination, a perfectly reasonable pre-condition for consideration of a true democracy. It is, after all, the basis of our contract of care with doctors (and other healthcare providers), so why should we not apply it to the contract we make with the various charlatans and megalomaniacs who enjoin us to gift them sway over us for 5 year increments? There comes with this, however, a realisation that there is a limit as to just how informed we can be. If a doctor tells me that I need a radiation treatment, then it is entirely possible given how I chose to while away my undergraduate years that I could tell him in more detail and with more understanding the workings of whichever device it was that he had concluded was to be the delivery system of choice for the treatment he had selected. How that treatment interacts with my body, and why that treatment would be most effective in dealing with whichever ailment my non-indestructible non-robot body had saddled me with would in all but the most trivial of cases be a complete mystery to me. The consent I am giving is therefore not in any measure informed. It is instead founded on a trust held between myself and my doctor.

To first order, it would appear that the same principle applies within the political arena; it is equivalently true that many of the minutiae of government are opaque to those of us who may only devote enough time to gain a casual understanding of the issues. By applying the same "redefinition" of "informed" it might be argued that this would be sufficient to produce an ideal democracy. The fallacy of this position of course lies in the lack of the same covenant of trust we grant to doctors. Politicians, in common with Wizards, are noted for their deep and pervading willingness to sell their own grandmothers for more power. Most, it should be noted, have (or start out with) noble intentions - lofty ideals and a zeal to help their fellow man - but they have all of them arrived at the conclusion that whether their goal be noble or nefarious, the way to achieve this is power, thus disqualifying them from receiving any form of trust from us to them. If we are to consent to giving a party (or an individual politician) power, then where possible it should be with as much information and oversight as possible - informed in the literal sense of the word, as opposed to the fig leaf we apply in matters of health. Without it, the statement
no informed consent from votes without reasonable public understanding of facts and principles, and without reasonable debate reflecting the full range of views having support in reason and / or in numbers
is unarguably true, but is that really a reasonable statement to make? My argument is that it is not, for one very simple reason: individual choice. It is the right of the individual to be exactly as informed or as ill-informed as they wish to be, and this need not even be a binary state. Whilst there are undoubtedly many people who remain blissfully unaware of the political events of any given week, there are others still who choose to spend their limited time following only a subset of these issues to range of understanding. It is therefore unreasonable to state voter understanding as a pre-requisite for a true democratic mandate.

As an addendum: does the unreasonableness of the goal mean that we should not strive to achieve it anyway? Clearly not. This is one of those many instances in life where the journey is more important than the destination. It does not change the fact, however, that you cannot appeal to some utopian ideal of democratic mandate to invalidate an unwanted result. The result was what it was for better or for worse, and it remains hypocritical of the original poster to assert that the "Oxbridge elite" were not interested in democracy, before calling for the setting aside of what is by any reasonable measure a democratic result.

Addendum to the addendum: I deliberately choose to accept without qualification the axiom that first past the post produces a democratic result in an election. There's a proper argument to be had about that, but it would cloud this particular issue.