{"id":5821,"date":"2012-11-30T08:53:00","date_gmt":"2012-11-30T07:53:00","guid":{"rendered":"http:\/\/idiolect.org.uk\/notes\/?p=5821"},"modified":"2012-12-06T22:59:20","modified_gmt":"2012-12-06T21:59:20","slug":"bootstrap-update","status":"publish","type":"post","link":"https:\/\/idiolect.org.uk\/notes\/2012\/11\/30\/bootstrap-update\/","title":{"rendered":"Bootstrap update"},"content":{"rendered":"<p><strong>Update: This post used an incorrect implementation of the bootstrap, so the conclusions don&#8217;t hold. See <a href=\"http:\/\/idiolect.org.uk\/notes\/?p=5832\">this correction<\/a><\/strong><\/p>\n<p><a href=\"http:\/\/mikedewar.org\/\">Mike<\/a> suggested that I alter the variance of the underlying distibutions. This makes total sense, since it matches what we are usually trying to do in psychological research &#8211; detect a small difference in a lot of noise. So I made the underlying distibutions look a lot like reaction time distributions, with a 30ms difference between them. The code is<\/p>\n<pre>\r\n    t0=200;\r\n    s1=t0+25*(randn(1,m)+exp(randn(1,m)));\r\n    s2=t0+25*(randn(1,m)+exp(randn(1,m)))+d;\r\n<\/pre>\n<p>Where m is the sample size, and d is either 0 or 30. For a very large sample, the distributions look like this:<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/idiolect.org.uk\/notes\/wp-content\/uploads\/2012\/11\/mc_underlying.png\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"5822\" data-permalink=\"https:\/\/idiolect.org.uk\/notes\/2012\/11\/30\/bootstrap-update\/mc_underlying\/\" data-orig-file=\"https:\/\/i0.wp.com\/idiolect.org.uk\/notes\/wp-content\/uploads\/2012\/11\/mc_underlying.png?fit=1201%2C901&amp;ssl=1\" data-orig-size=\"1201,901\" 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;}\" data-image-title=\"mc_underlying\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/idiolect.org.uk\/notes\/wp-content\/uploads\/2012\/11\/mc_underlying.png?fit=300%2C225&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/idiolect.org.uk\/notes\/wp-content\/uploads\/2012\/11\/mc_underlying.png?fit=580%2C435&amp;ssl=1\" tabindex=\"0\" role=\"button\" src=\"https:\/\/i0.wp.com\/idiolect.org.uk\/notes\/wp-content\/uploads\/2012\/11\/mc_underlying-300x225.png?resize=300%2C225\" alt=\"\" title=\"mc_underlying\" width=\"300\" height=\"225\" class=\"aligncenter size-medium wp-image-5822\" srcset=\"https:\/\/i0.wp.com\/idiolect.org.uk\/notes\/wp-content\/uploads\/2012\/11\/mc_underlying.png?resize=300%2C225&amp;ssl=1 300w, https:\/\/i0.wp.com\/idiolect.org.uk\/notes\/wp-content\/uploads\/2012\/11\/mc_underlying.png?resize=1024%2C768&amp;ssl=1 1024w, https:\/\/i0.wp.com\/idiolect.org.uk\/notes\/wp-content\/uploads\/2012\/11\/mc_underlying.png?w=1201&amp;ssl=1 1201w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>After a discussion with <a href=\"http:\/\/jim-stone.staff.shef.ac.uk\/\">Jim<\/a> I looked at the hit rate and false alarm rate separately. For the simple comparison of means, the false alarm rate stays around 0.5 (as you&#8217;d predict). For the other tests it drops to about 0.05. The simple comparison of means is so sensitive to a true difference, however, that the dprime can still be superior to that of the other tests. Which suggests dprime is not a good summary statistic to me, rather than that we should do testing simply by comparing the sample means.<\/p>\n<p>So I rerun the procedure I <a href=\"http:\/\/idiolect.org.uk\/notes\/?p=5800\">described before<\/a>, but with higher variance on the underlying samples. <\/p>\n<p><a href=\"https:\/\/i0.wp.com\/idiolect.org.uk\/notes\/wp-content\/uploads\/2012\/11\/mc_results_dprime1.png\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"5824\" data-permalink=\"https:\/\/idiolect.org.uk\/notes\/2012\/11\/30\/bootstrap-update\/mc_results_dprime-2\/\" data-orig-file=\"https:\/\/i0.wp.com\/idiolect.org.uk\/notes\/wp-content\/uploads\/2012\/11\/mc_results_dprime1.png?fit=1200%2C901&amp;ssl=1\" data-orig-size=\"1200,901\" 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;}\" data-image-title=\"mc_results_dprime\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/idiolect.org.uk\/notes\/wp-content\/uploads\/2012\/11\/mc_results_dprime1.png?fit=300%2C225&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/idiolect.org.uk\/notes\/wp-content\/uploads\/2012\/11\/mc_results_dprime1.png?fit=580%2C435&amp;ssl=1\" tabindex=\"0\" role=\"button\" src=\"https:\/\/i0.wp.com\/idiolect.org.uk\/notes\/wp-content\/uploads\/2012\/11\/mc_results_dprime1-300x225.png?resize=300%2C225\" alt=\"\" title=\"mc_results_dprime\" width=\"300\" height=\"225\" class=\"aligncenter size-medium wp-image-5824\" srcset=\"https:\/\/i0.wp.com\/idiolect.org.uk\/notes\/wp-content\/uploads\/2012\/11\/mc_results_dprime1.png?resize=300%2C225&amp;ssl=1 300w, https:\/\/i0.wp.com\/idiolect.org.uk\/notes\/wp-content\/uploads\/2012\/11\/mc_results_dprime1.png?resize=1024%2C768&amp;ssl=1 1024w, https:\/\/i0.wp.com\/idiolect.org.uk\/notes\/wp-content\/uploads\/2012\/11\/mc_results_dprime1.png?w=1200&amp;ssl=1 1200w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>The results are very similar. The bootstrap using the mean as the test statistic is worse than the t-test. The bootstrap using the median is clear superior. This surprises me. I had been told that the bootstrap was superior for nonparametric distributions. In this case it seems as if using the mean as a test statistic eliminates the potential superiority of bootstrapping.<\/p>\n<p>This is still a work in progress, so I will investigate further and may have to update this conclusion as the story evolves.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Update: This post used an incorrect implementation of the bootstrap, so the conclusions don&#8217;t hold. See this correction Mike suggested that I alter the variance of the underlying distibutions. This makes total sense, since it matches what we are usually trying to do in psychological research &#8211; detect a small difference in a lot of [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"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":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false},"version":2}},"categories":[5,9],"tags":[],"class_list":["post-5821","post","type-post","status-publish","format-standard","hentry","category-psychology","category-science"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p5KQtW-1vT","jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/idiolect.org.uk\/notes\/wp-json\/wp\/v2\/posts\/5821"}],"collection":[{"href":"https:\/\/idiolect.org.uk\/notes\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/idiolect.org.uk\/notes\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/idiolect.org.uk\/notes\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/idiolect.org.uk\/notes\/wp-json\/wp\/v2\/comments?post=5821"}],"version-history":[{"count":4,"href":"https:\/\/idiolect.org.uk\/notes\/wp-json\/wp\/v2\/posts\/5821\/revisions"}],"predecessor-version":[{"id":5845,"href":"https:\/\/idiolect.org.uk\/notes\/wp-json\/wp\/v2\/posts\/5821\/revisions\/5845"}],"wp:attachment":[{"href":"https:\/\/idiolect.org.uk\/notes\/wp-json\/wp\/v2\/media?parent=5821"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/idiolect.org.uk\/notes\/wp-json\/wp\/v2\/categories?post=5821"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/idiolect.org.uk\/notes\/wp-json\/wp\/v2\/tags?post=5821"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}