{"id":23,"date":"2012-01-11T09:14:00","date_gmt":"2012-01-11T15:14:00","guid":{"rendered":"http:\/\/linesoftangency.wordpress.com\/2012\/01\/11\/check-one-two"},"modified":"2012-01-11T09:14:00","modified_gmt":"2012-01-11T15:14:00","slug":"check-one-two","status":"publish","type":"post","link":"http:\/\/blog.chrislusto.com\/?p=23","title":{"rendered":"Check, One, Two"},"content":{"rendered":"<div id=\"attachment_77\" style=\"width: 310px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/blog.chrislusto.com\/wp-content\/uploads\/2012\/01\/gftms2.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-77\" class=\"size-medium wp-image-77\" title=\"GFTMS\" src=\"http:\/\/blog.chrislusto.com\/wp-content\/uploads\/2012\/01\/gftms2.jpg?w=300\" alt=\"\" width=\"300\" height=\"225\" srcset=\"http:\/\/blog.chrislusto.com\/wp-content\/uploads\/2012\/01\/gftms2.jpg 320w, http:\/\/blog.chrislusto.com\/wp-content\/uploads\/2012\/01\/gftms2-300x225.jpg 300w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><p id=\"caption-attachment-77\" class=\"wp-caption-text\">Myself and (then) SSgt Clark doing some math in Fallujah, Iraq<\/p><\/div>\n<p style=\"text-align:justify;\">I used to be an artillery officer in the Marine Corps, and it's sometimes fun to bring mathematical details of my former life into the classroom.\u00a0 Not only is there some useful and interesting math to be found there, but it also buys me the occasional attention of the <em>Call of Duty<\/em> crowd.\u00a0 Here is a simple application of <a href=\"http:\/\/bit.ly\/x7g2LZ\">Bayes' Theorem<\/a> to artillery safety.<\/p>\n<div style=\"text-align:justify;\"><!--more--><\/div>\n<p style=\"text-align:justify;\">For about two years I was a Fire Direction Officer (FDO).\u00a0 My job was to run the team of Marines who receive targeting data and subsequently calculate technical firing solutions to send to the individual artillery pieces.\u00a0 As you might imagine, getting good at this requires a lot of training.\u00a0 And, as you might also imagine, safety is a nontrivial aspect of any sort of training that involves 100-lb. exploding bullets on an 11-mile flight.<\/p>\n<div style=\"text-align:justify;\"><\/div>\n<p style=\"text-align:justify;\">Before any exercise, there are days of prep work to maximize the probability that everything goes smoothly and safely, but there inevitably comes the supremely intense interval between the time the very first round leaves the muzzle and the time it (fingers crossed) hits the target.\u00a0 To give you an idea of just <em>how<\/em> intense this interval is, FDOs only half-jokingly call the button that transmits data to the gun line the \"go-to-jail button.\"<\/p>\n<div style=\"text-align:justify;\"><\/div>\n<p style=\"text-align:justify;\">One of our standard safety procedures involves the firing of two \"check rounds.\"\u00a0 The observer selects a target near the center of the impact area.\u00a0 Then the check rounds are fired, one at a time, while the observer verifies that they impact reasonably near (more on this later) the correct grid coordinates.\u00a0 If the rounds do, in fact, land in the vicinity of the target, we assume that the guns are laid correctly and our computational tools are functioning properly, the FDO resumes breathing, and we begin processing missions for the exercise.\u00a0 But on what basis can we justify making this assumption?<\/p>\n<div style=\"text-align:justify;\"><\/div>\n<p style=\"text-align:justify;\">Notice that what we're essentially doing is evaluating the posterior probability that the guns are laid correctly given the evidence provided by the check rounds.\u00a0 This is where Bayes' Theorem comes in.\u00a0 For the rest of this example, let<strong> H<\/strong> be the event \"<strong>everything is set and functioning properly<\/strong>,\" and let <strong>E<\/strong> be the event \"<strong>the check rounds impact near the target<\/strong>.\"<\/p>\n<p>Bayes' Theorem tells us that:<\/p>\n<p style=\"text-align:center;\">$latex P(H|E)=frac{P(E|H)P(H)}{P(E)}&amp;s=2$<\/p>\n<p>If we partition the denominator and rewrite it according to the <a title=\"Law of Total Probability\" href=\"http:\/\/en.wikipedia.org\/wiki\/Law_of_total_probability\" target=\"_blank\">Law of Total Probability<\/a>, we end up with:<\/p>\n<p style=\"text-align:center;\">$latex P(H|E)= frac{P(E|H)P(H)}{P(E|H)P(H) + P(E| neg H)P( neg H)}&amp;s=2$<\/p>\n<div style=\"text-align:justify;\"><\/div>\n<p>Now we'll evaluate the individual elements, but for the time being notice that the posterior probability approaches 1 as the second term in the denominator approaches 0.<\/p>\n<div style=\"text-align:justify;\"><\/div>\n<p><strong>P(E|H): How likely is the check round evidence if the safety hypothesis is true?<\/strong><\/p>\n<p style=\"text-align:justify;\">Each family of propellant charges and projectiles that we use comes with an experimental measure of spread called \"probable error\" that is roughly analogous, but not identical, to standard deviation.\u00a0 Actually, it comes with <em>two<\/em> measures of spread, one along the direction parallel to the line of fire (\"probable error in range\"), and one along the direction perpendicular to the line of fire (\"probable error in deflection\").\u00a0 I don't know exactly why the military eschews standard deviation in favor of probable error, though perhaps it's slightly more intuitive.\u00a0 By definition, 50% of rounds land within one probable error of the mean point of impact, so it's equally likely that any particular round lands inside or outside of this interval.\u00a0 (Compare this to the <a href=\"http:\/\/bit.ly\/yroXnf\">empirical rule<\/a> based on standard deviation.)<\/p>\n<div id=\"attachment_78\" style=\"width: 562px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/blog.chrislusto.com\/wp-content\/uploads\/2012\/01\/pe.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-78\" class=\"size-full wp-image-78\" title=\"PE\" src=\"http:\/\/blog.chrislusto.com\/wp-content\/uploads\/2012\/01\/pe.png\" alt=\"\" width=\"552\" height=\"301\" srcset=\"http:\/\/blog.chrislusto.com\/wp-content\/uploads\/2012\/01\/pe.png 552w, http:\/\/blog.chrislusto.com\/wp-content\/uploads\/2012\/01\/pe-300x163.png 300w\" sizes=\"auto, (max-width: 552px) 100vw, 552px\" \/><\/a><p id=\"caption-attachment-78\" class=\"wp-caption-text\">Notice that the tails are truncated. Any round outside of \u00b1 4 PE is considered &quot;erratic&quot; (not properly ballistic) and thus unhelpful in terms of ballistic computation, so it&#039;s ignored.<\/p><\/div>\n<p style=\"text-align:justify;\">So, when we say that a check round lands \"near\" the target, what we really mean is that it lands within 4 probable errors in range and 4 probable errors in deflection.\u00a0 Looking at the distribution above, P(E|H) = 1.\u00a0 Of course, this isn't actually true.\u00a0 There are always lurking potential errors that we can neither detect nor control (they get lumped into an aggregated disturbance term called \"position constants\"), but, if we are accurately aiming at the mean point of impact (target), the probability of observing a round within 4 probable errors is extremely high.\u00a0 And, without wearing ourselves out untangling the relationship between the two trials, the likelihood of observing <em>two<\/em> rounds within those range and deflection limits is still very high.<\/p>\n<div style=\"text-align:justify;\"><\/div>\n<p style=\"text-align:justify;\"><strong>P(H): What is the prior probability of everything being set up properly?<\/strong><\/p>\n<p style=\"text-align:justify;\">You should not be surprised to learn that the Marine Corps is big on procedures, especially when explosions are involved. \u00a0<strong> <\/strong>I mentioned before that artillery exercises involve days of preparation, a large portion of which is devoted to safety.\u00a0 During that time, a lot of things happen.\u00a0 The databases for two fire direction computers are built independently by two safety certified Marines.\u00a0 The safety information is also computed by hand, again twice, again independently.\u00a0 Then firing data is generated for some hypothetical missions.\u00a0 The primary and backup computers must agree within zero tolerance, and must also agree with the manual computations within formally defined limits.<\/p>\n<div style=\"text-align:justify;\"><\/div>\n<p style=\"text-align:justify;\">Once we actually get to the firing position, the guns are laid in place using a combination of GPS data, inertial navigation systems, and both primary and secondary manual survey devices.\u00a0 The azimuth of fire is transmitted to the guns, who then must read back <em>another<\/em> azimuth based on a second aiming point (the details of which aren't known to the gunners) to avoid the possibility of Marines parroting back the correct azimuth instead of actually verifying it.\u00a0 Current meteorological data is checked for suspicious fluctuations before being input into the two computers separately, line by line, and read back for accuracy.\u00a0 We make corrections for 11 specific known conditions, including muzzle velocity, rotation of the Earth, variation in altitude, propellant temperature, and the inherent right-hand drift a round experiences because of the barrel's rifling.\u00a0 During the actual processing of missions, basically everything is said, heard, and done twice, digit-by-digit.<\/p>\n<div style=\"text-align:justify;\"><\/div>\n<p style=\"text-align:justify;\">All of this is a long way of saying that the prior, P(H), is also very close to 1.<\/p>\n<div style=\"text-align:justify;\"><\/div>\n<p style=\"text-align:justify;\"><strong>P(E|\u00acH): What is the likelihood of the check round evidence if we're <em>not<\/em> set up safely?<\/strong><\/p>\n<p style=\"text-align:justify;\">The last several paragraphs were intended to give you the (correct) impression that coaxing artillery rounds into landing close enough to a given spot to blow it up is extremely difficult and sensitive to lots of variables.\u00a0 I think I'm still understating my case.\u00a0 Given all the ways that things can go wrong, even when we work really hard to get it right, it seems to me (and to the Marine Corps as a whole, since they endorse this line of reasoning) that it would require an extremely intricate cosmic conspiracy to get two consecutive artillery rounds to land near our target <em>if we weren't actually aiming there in the first place!<\/em>\u00a0 Let's go out on a limb and say this value is close to zero.<\/p>\n<div style=\"text-align:justify;\"><\/div>\n<p style=\"text-align:justify;\"><strong>P(\u00acH): What is the probability we're <em>not<\/em> set up safely?<\/strong><\/p>\n<p style=\"text-align:justify;\">Since I've already established (I think) that we spend an awful lot of time and energy to get P(H) close to 1, it follows that P(\u00acH) must be close to 0.\u00a0 It's probably larger than P(E|\u00acH), but still pretty small.<\/p>\n<div style=\"text-align:justify;\"><\/div>\n<p style=\"text-align:justify;\"><strong>Conclusion:<\/strong><\/p>\n<p style=\"text-align:justify;\">Since P(\u00acH) is small, and P(E|\u00acH) is even smaller, their product contributes very little to the denominator.\u00a0 As noted above, this implies that the posterior probability of interest is close to 1.\u00a0 In other words, check rounds near the target offer very strong evidence that we've managed not to screw anything up too badly in the run-up to our training.\u00a0 We can--and sometimes do--measure the actual errors in range and deflection to increase our precision as we fire more missions and accumulate more data, but Bayes' Theorem tells us that the check round heuristic is a justifiable shortcut.<\/p>\n<div style=\"text-align:justify;\"><\/div>\n<p style=\"text-align:justify;\">Of course, the go-to-jail button is always there, smiling its bright red smile, occasionally whispering, \"But are you <em>sure<\/em>?\"<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I used to be an artillery officer in the Marine Corps, and it's sometimes fun to bring mathematical details of my former life into the classroom.\u00a0 Not only is there some useful and interesting math to be found there, but it also buys me the occasional attention of the Call of Duty crowd.\u00a0 Here is [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[7,8,31,32,46],"class_list":["post-23","post","type-post","status-publish","format-standard","hentry","category-math-musing","tag-artillery","tag-bayes-theorem","tag-marine-corps","tag-math","tag-probability"],"_links":{"self":[{"href":"http:\/\/blog.chrislusto.com\/index.php?rest_route=\/wp\/v2\/posts\/23","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/blog.chrislusto.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/blog.chrislusto.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/blog.chrislusto.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/blog.chrislusto.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=23"}],"version-history":[{"count":0,"href":"http:\/\/blog.chrislusto.com\/index.php?rest_route=\/wp\/v2\/posts\/23\/revisions"}],"wp:attachment":[{"href":"http:\/\/blog.chrislusto.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=23"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/blog.chrislusto.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=23"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/blog.chrislusto.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=23"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}