{"id":1524,"date":"2023-06-22T02:40:19","date_gmt":"2023-06-22T02:40:19","guid":{"rendered":"https:\/\/content.one.lumenlearning.com\/introstatstest\/chapter\/simulation-based-hypothesis-test-for-a-population-proportion-learn-it-2\/"},"modified":"2025-05-17T02:56:22","modified_gmt":"2025-05-17T02:56:22","slug":"simulation-based-hypothesis-test-for-a-population-proportion-learn-it-2","status":"publish","type":"chapter","link":"https:\/\/content.one.lumenlearning.com\/introstatstest\/chapter\/simulation-based-hypothesis-test-for-a-population-proportion-learn-it-2\/","title":{"raw":"Simulation-Based Hypothesis Test for a Population Proportion \u2013 Learn it 2","rendered":"Simulation-Based Hypothesis Test for a Population Proportion \u2013 Learn it 2"},"content":{"raw":"<section class=\"textbox learningGoals\">\r\n<ul>\r\n\t<li><span data-sheets-value=\"{&quot;1&quot;:2,&quot;2&quot;:&quot;Complete a simulation-based hypothesis test involving a single proportion&quot;}\" data-sheets-userformat=\"{&quot;2&quot;:6913,&quot;3&quot;:{&quot;1&quot;:0},&quot;11&quot;:4,&quot;12&quot;:0,&quot;14&quot;:{&quot;1&quot;:2,&quot;2&quot;:0},&quot;15&quot;:&quot;Calibri&quot;}\">Complete a simulation-based hypothesis test involving a single proportion<\/span><\/li>\r\n<\/ul>\r\n<\/section>\r\n<h2>Simulation-Based Hypothesis Test<\/h2>\r\n<p>Step 1 of any hypothesis test is to write out the null and alternative hypotheses.<\/p>\r\n<section class=\"textbox recall\">The <strong>null hypothesis<\/strong>, [latex] H_{0} [\/latex], is what we assume to be true to begin with. It is often a statement of no change from the previous value or from what is expected.\r\n\r\n<ul>\r\n\t<li style=\"font-weight: 400;\" aria-level=\"4\">The null hypothesis, [latex] H_{0} [\/latex], is always given in the form: [latex] p = \\text{null value} [\/latex].<\/li>\r\n<\/ul>\r\n<p>The <strong>alternative hypothesis<\/strong>, [latex] H_{A} [\/latex], is what we consider to be plausible if the null hypothesis is false. Often, it is a change from the null hypothesis that we would like to test the accuracy of.<\/p>\r\n<ul>\r\n\t<li style=\"font-weight: 400;\" aria-level=\"4\">The alternative hypothesis, [latex] H_{A} [\/latex], is always given as an inequality: [latex] p &gt; \\text{null value}, p &lt; \\text{null value}[\/latex], or [latex] p \\neq \\text{null value}[\/latex].<\/li>\r\n<\/ul>\r\n<\/section>\r\n<section class=\"textbox tryIt\">[ohm2_question hide_question_numbers=1]3799[\/ohm2_question]<\/section>\r\n<p>In order to conduct a hypothesis test, we have to check the assumptions\/conditions for the hypothesis test (Step 2). However, in a simulation-based hypothesis testing, it allows us to conduct the hypothesis test with very few assumptions and have an intuitive result that can be easily interpreted.<\/p>\r\n<p>Because we are using a simulation, we also no longer need to calculate the test statistics and use our simulated data set to calculate the proportion of the simulated distribution above a certain value as the estimated P-value. We can then use the P-value to determine the strength of evidence the data provide against the null hypothesis.<\/p>\r\n<section class=\"textbox interact\">Let's use a coin to simulate sampling [latex]16[\/latex] questions and counting the number of those questions with \u201cfalse\u201d as the correct answer in the statistical tool below.<br \/>\r\n<strong>Step 1: <\/strong>Set the Population Proportion to [latex]0.5[\/latex]. This represents the probability that a coin lands on \u201cheads.\u201d<br \/>\r\n<strong>Step 2: <\/strong>Set the Sample Size to [latex]16[\/latex]. This is the number of times we would like to flip the coin.<br \/>\r\n<strong style=\"font-size: 1rem; orphans: 1; text-align: initial; background-color: initial; word-spacing: normal;\">Step 3:<\/strong><span style=\"font-size: 1rem; orphans: 1; text-align: initial; background-color: initial; word-spacing: normal;\"> Under \u201cSelect how many samples you want to simulate drawing from the population,\u201d select \u201c[latex]1[\/latex]\u201d or \"[latex]1000[\/latex]\" accordingly and click \u201cDraw Sample(s).\u201d<br \/>\r\n<\/span><strong style=\"font-size: 1rem; orphans: 1; text-align: initial; background-color: initial; word-spacing: normal;\">Step 4: <\/strong><span style=\"font-size: 1rem; orphans: 1; text-align: initial; background-color: initial; word-spacing: normal;\">Select \u201cShow Distribution of Successes.\u201d The \u201cSampling Distribution of Number of Successes\u201d shown at the bottom of the page displays how the number of true\/false questions with \u201cfalse\u201d as the correct answer varies across the simulated trials of selecting [latex]16[\/latex] questions.<br \/>\r\n<\/span><strong style=\"font-size: 1rem; orphans: 1; text-align: initial; background-color: initial; word-spacing: normal;\">Step 5:<\/strong><span style=\"font-size: 1rem; orphans: 1; text-align: initial; background-color: initial; word-spacing: normal;\"> Use the \u201cFind Probability for Samp. Dist.\u201d option in the tool to count the proportion of simulated samples to find the P-value.<\/span><\/section>\r\n<p><iframe src=\"https:\/\/lumen-learning.shinyapps.io\/sampdist_prop\" width=\"100%\" height=\"1075\" frameborder=\"no\"><\/iframe><br \/>\r\n[<a href=\"https:\/\/lumen-learning.shinyapps.io\/sampdist_prop\" target=\"_blank\" rel=\"noopener\">Trouble viewing? Click to open in a new tab.<\/a>]<\/p>\r\n<section class=\"textbox tryIt\">[ohm2_question hide_question_numbers=1]3123[\/ohm2_question]<\/section>","rendered":"<section class=\"textbox learningGoals\">\n<ul>\n<li><span data-sheets-value=\"{&quot;1&quot;:2,&quot;2&quot;:&quot;Complete a simulation-based hypothesis test involving a single proportion&quot;}\" data-sheets-userformat=\"{&quot;2&quot;:6913,&quot;3&quot;:{&quot;1&quot;:0},&quot;11&quot;:4,&quot;12&quot;:0,&quot;14&quot;:{&quot;1&quot;:2,&quot;2&quot;:0},&quot;15&quot;:&quot;Calibri&quot;}\">Complete a simulation-based hypothesis test involving a single proportion<\/span><\/li>\n<\/ul>\n<\/section>\n<h2>Simulation-Based Hypothesis Test<\/h2>\n<p>Step 1 of any hypothesis test is to write out the null and alternative hypotheses.<\/p>\n<section class=\"textbox recall\">The <strong>null hypothesis<\/strong>, [latex]H_{0}[\/latex], is what we assume to be true to begin with. It is often a statement of no change from the previous value or from what is expected.<\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"4\">The null hypothesis, [latex]H_{0}[\/latex], is always given in the form: [latex]p = \\text{null value}[\/latex].<\/li>\n<\/ul>\n<p>The <strong>alternative hypothesis<\/strong>, [latex]H_{A}[\/latex], is what we consider to be plausible if the null hypothesis is false. Often, it is a change from the null hypothesis that we would like to test the accuracy of.<\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"4\">The alternative hypothesis, [latex]H_{A}[\/latex], is always given as an inequality: [latex]p > \\text{null value}, p < \\text{null value}[\/latex], or [latex]p \\neq \\text{null value}[\/latex].<\/li>\n<\/ul>\n<\/section>\n<section class=\"textbox tryIt\"><iframe loading=\"lazy\" id=\"ohm3799\" class=\"resizable\" src=\"https:\/\/ohm.one.lumenlearning.com\/multiembedq.php?id=3799&theme=lumen&iframe_resize_id=ohm3799&source=tnh\" width=\"100%\" height=\"150\"><\/iframe><\/section>\n<p>In order to conduct a hypothesis test, we have to check the assumptions\/conditions for the hypothesis test (Step 2). However, in a simulation-based hypothesis testing, it allows us to conduct the hypothesis test with very few assumptions and have an intuitive result that can be easily interpreted.<\/p>\n<p>Because we are using a simulation, we also no longer need to calculate the test statistics and use our simulated data set to calculate the proportion of the simulated distribution above a certain value as the estimated P-value. We can then use the P-value to determine the strength of evidence the data provide against the null hypothesis.<\/p>\n<section class=\"textbox interact\">Let&#8217;s use a coin to simulate sampling [latex]16[\/latex] questions and counting the number of those questions with \u201cfalse\u201d as the correct answer in the statistical tool below.<br \/>\n<strong>Step 1: <\/strong>Set the Population Proportion to [latex]0.5[\/latex]. This represents the probability that a coin lands on \u201cheads.\u201d<br \/>\n<strong>Step 2: <\/strong>Set the Sample Size to [latex]16[\/latex]. This is the number of times we would like to flip the coin.<br \/>\n<strong style=\"font-size: 1rem; orphans: 1; text-align: initial; background-color: initial; word-spacing: normal;\">Step 3:<\/strong><span style=\"font-size: 1rem; orphans: 1; text-align: initial; background-color: initial; word-spacing: normal;\"> Under \u201cSelect how many samples you want to simulate drawing from the population,\u201d select \u201c[latex]1[\/latex]\u201d or &#8220;[latex]1000[\/latex]&#8221; accordingly and click \u201cDraw Sample(s).\u201d<br \/>\n<\/span><strong style=\"font-size: 1rem; orphans: 1; text-align: initial; background-color: initial; word-spacing: normal;\">Step 4: <\/strong><span style=\"font-size: 1rem; orphans: 1; text-align: initial; background-color: initial; word-spacing: normal;\">Select \u201cShow Distribution of Successes.\u201d The \u201cSampling Distribution of Number of Successes\u201d shown at the bottom of the page displays how the number of true\/false questions with \u201cfalse\u201d as the correct answer varies across the simulated trials of selecting [latex]16[\/latex] questions.<br \/>\n<\/span><strong style=\"font-size: 1rem; orphans: 1; text-align: initial; background-color: initial; word-spacing: normal;\">Step 5:<\/strong><span style=\"font-size: 1rem; orphans: 1; text-align: initial; background-color: initial; word-spacing: normal;\"> Use the \u201cFind Probability for Samp. Dist.\u201d option in the tool to count the proportion of simulated samples to find the P-value.<\/span><\/section>\n<p><iframe loading=\"lazy\" src=\"https:\/\/lumen-learning.shinyapps.io\/sampdist_prop\" width=\"100%\" height=\"1075\" frameborder=\"no\"><\/iframe><br \/>\n[<a href=\"https:\/\/lumen-learning.shinyapps.io\/sampdist_prop\" target=\"_blank\" rel=\"noopener\">Trouble viewing? Click to open in a new tab.<\/a>]<\/p>\n<section class=\"textbox tryIt\"><iframe loading=\"lazy\" id=\"ohm3123\" class=\"resizable\" src=\"https:\/\/ohm.one.lumenlearning.com\/multiembedq.php?id=3123&theme=lumen&iframe_resize_id=ohm3123&source=tnh\" width=\"100%\" height=\"150\"><\/iframe><\/section>\n","protected":false},"author":8,"menu_order":20,"template":"","meta":{"_candela_citation":"[]","pb_show_title":"on","pb_short_title":"","pb_subtitle":"","pb_authors":[],"pb_section_license":""},"chapter-type":[],"contributor":[],"license":[],"part":1502,"module-header":"learn_it","content_attributions":[],"internal_book_links":[],"video_content":null,"cc_video_embed_content":{"cc_scripts":"","media_targets":[]},"try_it_collection":null,"_links":{"self":[{"href":"https:\/\/content.one.lumenlearning.com\/introstatstest\/wp-json\/pressbooks\/v2\/chapters\/1524"}],"collection":[{"href":"https:\/\/content.one.lumenlearning.com\/introstatstest\/wp-json\/pressbooks\/v2\/chapters"}],"about":[{"href":"https:\/\/content.one.lumenlearning.com\/introstatstest\/wp-json\/wp\/v2\/types\/chapter"}],"author":[{"embeddable":true,"href":"https:\/\/content.one.lumenlearning.com\/introstatstest\/wp-json\/wp\/v2\/users\/8"}],"version-history":[{"count":6,"href":"https:\/\/content.one.lumenlearning.com\/introstatstest\/wp-json\/pressbooks\/v2\/chapters\/1524\/revisions"}],"predecessor-version":[{"id":6932,"href":"https:\/\/content.one.lumenlearning.com\/introstatstest\/wp-json\/pressbooks\/v2\/chapters\/1524\/revisions\/6932"}],"part":[{"href":"https:\/\/content.one.lumenlearning.com\/introstatstest\/wp-json\/pressbooks\/v2\/parts\/1502"}],"metadata":[{"href":"https:\/\/content.one.lumenlearning.com\/introstatstest\/wp-json\/pressbooks\/v2\/chapters\/1524\/metadata\/"}],"wp:attachment":[{"href":"https:\/\/content.one.lumenlearning.com\/introstatstest\/wp-json\/wp\/v2\/media?parent=1524"}],"wp:term":[{"taxonomy":"chapter-type","embeddable":true,"href":"https:\/\/content.one.lumenlearning.com\/introstatstest\/wp-json\/pressbooks\/v2\/chapter-type?post=1524"},{"taxonomy":"contributor","embeddable":true,"href":"https:\/\/content.one.lumenlearning.com\/introstatstest\/wp-json\/wp\/v2\/contributor?post=1524"},{"taxonomy":"license","embeddable":true,"href":"https:\/\/content.one.lumenlearning.com\/introstatstest\/wp-json\/wp\/v2\/license?post=1524"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}