{"id":1957,"date":"2024-01-02T18:27:24","date_gmt":"2024-01-02T23:27:24","guid":{"rendered":"https:\/\/david.bookstaber.com\/Interests\/?p=1957"},"modified":"2024-01-02T18:27:24","modified_gmt":"2024-01-02T23:27:24","slug":"statistical-inference-example-testing-22lr-ammunition","status":"publish","type":"post","link":"https:\/\/david.bookstaber.com\/Interests\/2024\/01\/statistical-inference-example-testing-22lr-ammunition\/","title":{"rendered":"Statistical Inference Example: Testing .22LR Ammunition"},"content":{"rendered":"\n<p>Competitive shooters work hard to find the ammunition that delivers the highest precision in their guns.  This isn&#8217;t always straightforward: Even among premium ammunition lines any particular barrel can show a preference for one load that produces poor results in others.  Using <a rel=\"noreferrer noopener\" href=\"https:\/\/david.bookstaber.com\/Interests\/2023\/12\/checking-probability-and-statistics-via-simulation\/\" target=\"_blank\">the latest statistical techniques<\/a>, I plugged in some of the data I collected during <a rel=\"noreferrer noopener\" href=\"https:\/\/david.bookstaber.com\/Interests\/2015\/09\/1022-precision-rematch\/\" target=\"_blank\">this test of .22LR rifles<\/a>.  Shown here are the recorded groups of two types of ammunition \u2013 <em>SK Plus <\/em>and <em>SK Match <\/em>\u2013 shot through my KIDD 10\/22.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"430\" data-attachment-id=\"1958\" data-permalink=\"https:\/\/david.bookstaber.com\/Interests\/2024\/01\/statistical-inference-example-testing-22lr-ammunition\/sksampletargets\/\" data-orig-file=\"https:\/\/david.bookstaber.com\/Interests\/wp-content\/uploads\/2024\/01\/SKsampleTargets.png\" data-orig-size=\"1366,574\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Test Targets\" data-image-description=\"&lt;p&gt;Test targets of SK Match and Plus .22LR, from David Bookstaber&lt;\/p&gt;\n\" data-image-caption=\"\" data-large-file=\"https:\/\/david.bookstaber.com\/Interests\/wp-content\/uploads\/2024\/01\/SKsampleTargets-1024x430.png\" src=\"https:\/\/david.bookstaber.com\/Interests\/wp-content\/uploads\/2024\/01\/SKsampleTargets-1024x430.png\" alt=\"\" class=\"wp-image-1958\" srcset=\"https:\/\/david.bookstaber.com\/Interests\/wp-content\/uploads\/2024\/01\/SKsampleTargets-1024x430.png 1024w, https:\/\/david.bookstaber.com\/Interests\/wp-content\/uploads\/2024\/01\/SKsampleTargets-300x126.png 300w, https:\/\/david.bookstaber.com\/Interests\/wp-content\/uploads\/2024\/01\/SKsampleTargets-150x63.png 150w, https:\/\/david.bookstaber.com\/Interests\/wp-content\/uploads\/2024\/01\/SKsampleTargets-768x323.png 768w, https:\/\/david.bookstaber.com\/Interests\/wp-content\/uploads\/2024\/01\/SKsampleTargets-624x262.png 624w, https:\/\/david.bookstaber.com\/Interests\/wp-content\/uploads\/2024\/01\/SKsampleTargets.png 1366w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\">Aggregated test targets shot through KIDD 10\/22 at 50 yards.  The SK Plus points are labelled in the order they were shot.<\/figcaption><\/figure>\n\n\n\n<p><em>Match <\/em>is SK&#8217;s higher-end ammunition, so our expectation going into the test is that it will produce higher precision than <em>Plus<\/em>.  The purpose of the analysis here is to see how well a controlled test sustains that hypothesis.<\/p>\n\n\n\n<p>I like to call this the <em>Not So Fast!<\/em> example.  Remember that shooters never have enough time or ammunition, so they prefer to draw conclusions as fast as possible when running A\/B tests like this.  So imagine you have first fired the 25 round group of <em>Match <\/em>shown on the left.  Running the calculations, you find its estimated sigma is 0.16&#8243; at 50 yards with a 90% confidence interval of [0.13&#8243;, 0.19&#8243;].<\/p>\n\n\n\n<p>Now we want to see how <em>SK Plus <\/em>stacks up.  In the following table I show how the statistics evolve with each shot of <em>Plus<\/em>:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"880\" height=\"1024\" data-attachment-id=\"1960\" data-permalink=\"https:\/\/david.bookstaber.com\/Interests\/2024\/01\/statistical-inference-example-testing-22lr-ammunition\/skstatisticsexample-1\/\" data-orig-file=\"https:\/\/david.bookstaber.com\/Interests\/wp-content\/uploads\/2024\/01\/SKstatisticsExample-1.png\" data-orig-size=\"1048,1220\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"SKstatisticsExample-1\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/david.bookstaber.com\/Interests\/wp-content\/uploads\/2024\/01\/SKstatisticsExample-1-880x1024.png\" src=\"https:\/\/david.bookstaber.com\/Interests\/wp-content\/uploads\/2024\/01\/SKstatisticsExample-1-880x1024.png\" alt=\"\" class=\"wp-image-1960\" srcset=\"https:\/\/david.bookstaber.com\/Interests\/wp-content\/uploads\/2024\/01\/SKstatisticsExample-1-880x1024.png 880w, https:\/\/david.bookstaber.com\/Interests\/wp-content\/uploads\/2024\/01\/SKstatisticsExample-1-258x300.png 258w, https:\/\/david.bookstaber.com\/Interests\/wp-content\/uploads\/2024\/01\/SKstatisticsExample-1-129x150.png 129w, https:\/\/david.bookstaber.com\/Interests\/wp-content\/uploads\/2024\/01\/SKstatisticsExample-1-768x894.png 768w, https:\/\/david.bookstaber.com\/Interests\/wp-content\/uploads\/2024\/01\/SKstatisticsExample-1-624x726.png 624w, https:\/\/david.bookstaber.com\/Interests\/wp-content\/uploads\/2024\/01\/SKstatisticsExample-1.png 1048w\" sizes=\"auto, (max-width: 880px) 100vw, 880px\" \/><figcaption class=\"wp-element-caption\">Running statistics after each shot of <em>SK Plus<\/em>, compared to the complete target data of <em>SK Match<\/em><\/figcaption><\/figure>\n\n\n\n<p>The first few shots aren&#8217;t very good: by the third shot of <em>Plus <\/em>we estimate it is only half as accurate as <em>Match<\/em>: Sigma A\/B = 0.50.  (That&#8217;s the middle columns in the table: &#8220;Effect Size,&#8221; which is the ratio of the estimated sigma of the two ammo types.)  But three shots is a terribly small sample, which is reflected in the very wide 90% confidence interval on that estimated Effect Size: [0.33, 1.27].<\/p>\n\n\n\n<p>So we keep shooting, and <em>Plus <\/em>starts to look better.  After 10 shots our estimate of its dispersion (a.k.a. <em>sigma<\/em>, which is the left three columns) has gone from over 0.3&#8243; to barely over 0.2&#8243;.  But compared to our data on <em>Match <\/em>it&#8217;s still not looking good: by the 11th shot the 90% confidence interval on Effect Size no longer contains 1.0, which means that with 90% probability it falls short of the precision of <em>Match<\/em>.  This is also reflected in the p-value (right-most column), which collapses to single digits at this point.<\/p>\n\n\n\n<p>But wait!  We planned to shoot 30 rounds, so let&#8217;s finish the test.  By the time we&#8217;ve fired 20 rounds of <em>Plus <\/em>we are not as confident that it is so inferior to <em>Match<\/em>.  By the end of the test our best guess is that, in this gun, <em>Match <\/em>will produce groups only 15% tighter than <em>Plus<\/em> (that&#8217;s 1\/0.87).  And the probability of these aggregated data if there were no difference between the two (i.e., under the null hypothesis, which is the p-value) has jumped to 33%.<\/p>\n\n\n\n<p>What&#8217;s the point?<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>This example shows that small samples can suggest things that are far from the truth.  We drew the worst samples of <em>Plus <\/em>right at the start of the test.<\/li>\n\n\n\n<li>By running a more statistically significant test, we have learned that when <em>Match <\/em>is scarce or expensive, we probably don&#8217;t give up much performance by instead shooting <em>Plus <\/em>through this rifle.<\/li>\n<\/ol>\n\n\n\n<p><a href=\"https:\/\/david.bookstaber.com\/Interests\/img\/InferenceExamples.xlsx\">Excel file with the complete data and analysis is here<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Competitive shooters work hard to find the ammunition that delivers the highest precision in their guns. This isn&#8217;t always straightforward: Even among premium ammunition lines any particular barrel can show a preference for one load that produces poor results in others. Using the latest statistical techniques, I plugged in some of the data I collected [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":1958,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[133,122],"tags":[134],"class_list":["post-1957","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ballistics","category-precision","tag-statistics"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/david.bookstaber.com\/Interests\/wp-content\/uploads\/2024\/01\/SKsampleTargets.png","jetpack_shortlink":"https:\/\/wp.me\/po3d1-vz","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/david.bookstaber.com\/Interests\/wp-json\/wp\/v2\/posts\/1957","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/david.bookstaber.com\/Interests\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/david.bookstaber.com\/Interests\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/david.bookstaber.com\/Interests\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/david.bookstaber.com\/Interests\/wp-json\/wp\/v2\/comments?post=1957"}],"version-history":[{"count":1,"href":"https:\/\/david.bookstaber.com\/Interests\/wp-json\/wp\/v2\/posts\/1957\/revisions"}],"predecessor-version":[{"id":1961,"href":"https:\/\/david.bookstaber.com\/Interests\/wp-json\/wp\/v2\/posts\/1957\/revisions\/1961"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/david.bookstaber.com\/Interests\/wp-json\/wp\/v2\/media\/1958"}],"wp:attachment":[{"href":"https:\/\/david.bookstaber.com\/Interests\/wp-json\/wp\/v2\/media?parent=1957"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/david.bookstaber.com\/Interests\/wp-json\/wp\/v2\/categories?post=1957"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/david.bookstaber.com\/Interests\/wp-json\/wp\/v2\/tags?post=1957"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}