<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>p-values &#8211; Spencer Greenberg</title>
	<atom:link href="https://www.spencergreenberg.com/tag/p-values/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.spencergreenberg.com</link>
	<description></description>
	<lastBuildDate>Mon, 03 Apr 2023 01:47:24 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.1</generator>

<image>
	<url>https://i0.wp.com/www.spencergreenberg.com/wp-content/uploads/2024/05/cropped-icon.png?fit=32%2C32&#038;ssl=1</url>
	<title>p-values &#8211; Spencer Greenberg</title>
	<link>https://www.spencergreenberg.com</link>
	<width>32</width>
	<height>32</height>
</image> 
<site xmlns="com-wordpress:feed-additions:1">23753251</site>	<item>
		<title>Demystifying p-values</title>
		<link>https://www.spencergreenberg.com/2022/12/demystifying-p-values/</link>
					<comments>https://www.spencergreenberg.com/2022/12/demystifying-p-values/#comments</comments>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Sat, 31 Dec 2022 20:40:00 +0000</pubDate>
				<category><![CDATA[Essays]]></category>
		<category><![CDATA[alpha]]></category>
		<category><![CDATA[alternative hypothesis]]></category>
		<category><![CDATA[Bayesianism]]></category>
		<category><![CDATA[false positives]]></category>
		<category><![CDATA[frequentism]]></category>
		<category><![CDATA[garden of forking paths]]></category>
		<category><![CDATA[multiple hypothesis testing]]></category>
		<category><![CDATA[null hypothesis]]></category>
		<category><![CDATA[null hypothesis significance testing]]></category>
		<category><![CDATA[p-hacking]]></category>
		<category><![CDATA[p-values]]></category>
		<category><![CDATA[probability]]></category>
		<category><![CDATA[publication bias]]></category>
		<category><![CDATA[random chance]]></category>
		<category><![CDATA[replication crisis]]></category>
		<category><![CDATA[statistical significance]]></category>
		<category><![CDATA[statistics]]></category>
		<category><![CDATA[underpowered]]></category>
		<guid isPermaLink="false">https://www.spencergreenberg.com/?p=3382</guid>

					<description><![CDATA[There is a tremendous amount of confusion around what a p-value actually is, despite their widespread use in science. Here is my attempt to explain the concept of p-values concisely and clearly (including why they are useful and what often goes wrong with them). — What&#8217;s a p-value? — If you run a study, then [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">There is a tremendous amount of confusion around what a p-value actually is, despite their widespread use in science. Here is my attempt to explain the concept of p-values concisely and clearly (including why they are useful and what often goes wrong with them).</p>



<p class="wp-block-paragraph"><strong>— What&#8217;s a p-value? —</strong></p>



<p class="wp-block-paragraph">If you run a study, then (all else equal, aside from rare edge cases) the lower the p-value, the lower the chance that your results are due to random chance or luck.</p>



<p class="wp-block-paragraph">More precisely: a p-value is the probability you&#8217;d get a result at least as extreme as what you got IF there were actually no effect (or if some other pre-specified &#8220;null hypothesis&#8221; is true).</p>



<p class="wp-block-paragraph">So it&#8217;s a probability calculated based on assuming that there is no effect (or assuming that a pre-specified &#8220;null hypothesis&#8221; is true). Here the phrase &#8220;no effect&#8221; would mean, in the case of a study on a new medicine, that the medicine doesn&#8217;t do anything.</p>



<p class="wp-block-paragraph">To put it in terms of coin flips: suppose you&#8217;re trying to decide if a coin is fair (i.e., if it has an equal chance of landing on heads and tails &#8211; so that&#8217;s your &#8220;null hypothesis&#8221; in this context). You flip the coin 100 times and get 60 heads. You calculate the p-value (p=0.06).</p>



<p class="wp-block-paragraph">This p-value tells you there&#8217;s a 6% chance you&#8217;d get 60 or more heads OR 60 or more tails out of 100 flips if the coin were actually fair.</p>



<p class="wp-block-paragraph">What makes p-values useful is that when they are high, you usually can&#8217;t rule out your effect being due to random chance or luck. And, when they are very low, random chance is (in most cases) unlikely to be the explanation for your result.</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<p class="wp-block-paragraph"><strong>— What&#8217;s the problem with p-values? —</strong></p>



<p class="wp-block-paragraph">In social science, p&lt;0.05 is often used as the cutoff for a &#8220;successful&#8221; result (i.e., they treat the effect as real and potentially publishable). This is an arbitrary cutoff; there&#8217;s nothing special about 0.05. The phrase &#8220;statistically significant&#8221; is defined simply to mean that p&lt;0.05.</p>



<p class="wp-block-paragraph">There are many ways that p-values get commonly misused, creating lots of problems. For instance:</p>



<p class="wp-block-paragraph">• p-values often get misinterpreted as the probability that an effect is not real (recall: p-values are actually the probability of getting a result this extreme if there is no effect, which is not the same thing)</p>



<p class="wp-block-paragraph">• If you see one study where the main finding&#8217;s p-value is, say, 0.05, and another study where the main finding&#8217;s p-value is, say, 0.01, it&#8217;s tempting to conclude that the finding of the 2nd study is much less likely to be the result of chance (e.g., 1/5th as likely) than the 1st study&#8217;s finding. Unfortunately, we can&#8217;t draw this conclusion. The probability that a study&#8217;s finding is the result of chance is not the same as the p-value, and in fact, it can&#8217;t even be calculated just by knowing the p-value.</p>



<p class="wp-block-paragraph">• Because a p-value threshold is often used for a result to be publishable (p&lt;0.05 in social science), researchers sometimes engage in fishy methods to get their p-values below the threshold. This is known as &#8220;p-hacking.:</p>



<p class="wp-block-paragraph">• A result&#8217;s p-value (or &#8220;statistical significance&#8221;) is sometimes focused on instead of focusing on other factors that are also important. For instance, a result may have a low p-value but be such a weak effect that it&#8217;s totally useless or uninteresting.</p>



<p class="wp-block-paragraph">• While a low p-value helps you rule out the possibility that your effect is merely due to random chance, unfortunately, that&#8217;s all it helps you with. But researchers sometimes act as though it tells them more than that. Even an extremely low p-value doesn&#8217;t mean an effect is &#8220;real&#8221; or that the effect means what you think. Low p-values can result from a variety of causes, including mistakes in experimental design or confounds.</p>



<p class="wp-block-paragraph">Here&#8217;s another way to think about what a p-value is and isn&#8217;t that some people find helpful: a p-value does not tell you the probability that your result is due to chance. It tells you how consistent your results are with being due to chance. (I&#8217;m paraphrasing from <a href="https://statmodeling.stat.columbia.edu/2013/03/12/misunderstanding-the-p-value/#comment-143473">here</a>.) So, the lower the p-value, the less consistent your results are with them being due to chance.</p>



<p class="wp-block-paragraph">It&#8217;s interesting to note that, empirically, results with lower p-values are more likely to be genuine effects (i.e., not false positives). I looked at results for 325 psychology study replications, and when the original study p-value was at most 0.01, about 72% replicated. When p&gt;0.01, only 48% did.</p>



<p class="wp-block-paragraph">Ultimately, p-values are a useful (though often abused) statistical tool.</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<p class="wp-block-paragraph"><strong>— BONUS APPENDIX: what&#8217;s the chance of a hypothesis being &#8220;true&#8221; if p&lt;0.05?  —</strong></p>



<p class="wp-block-paragraph">One annoying thing about p-values is that they don&#8217;t answer the question we are usually interested in. Usually, we want to know something like &#8220;What&#8217;s the probability that my hypothesis is true?&#8221; or &#8220;What&#8217;s the probability that the effect of this drug is bigger than X?&#8221; but p-values don&#8217;t tell us those things.</p>



<p class="wp-block-paragraph">However, we can put a different spin on p-values to get them to answer questions that are closer to what we&#8217;re really interested in. Let&#8217;s think of p-values as giving us a decision procedure (in an overly simplified world where you either &#8220;believe&#8221; in an effect or you fail to believe in it).&nbsp;</p>



<p class="wp-block-paragraph">Suppose you test 100 totally separate, previously unexplored hypotheses about humans, and suppose that you commit to &#8220;believe&#8221; a hypothesis is true if and only if you get p&lt;0.05 (and otherwise, you don&#8217;t believe it).</p>



<p class="wp-block-paragraph">I think it&#8217;s realistic that in a social science context, most hypotheses studied will be false since discovering novel, publishable hypotheses about humans is hard. So let&#8217;s suppose that 80% of the hypotheses you test are *not* true.&nbsp;</p>



<p class="wp-block-paragraph">Finally, suppose that you use a large enough number of participants in your studies so that if you are testing for the presence of a real effect, there is an 80% chance you&#8217;ll be able to find it (this 80% figure is a common recommendation for &#8220;statistical power&#8221;).&nbsp;</p>



<p class="wp-block-paragraph">Under these assumptions, if you test 100 hypotheses, then you will end up believing in 20 hypotheses, and 80% of those you believe will be true (with the other 20% being false positives). That means that of the results you believe in, 80% will be correct! Of course, this assumes no mistakes are made in the process of designing the experiment, running the statistics, and so on.</p>



<p class="wp-block-paragraph">Here&#8217;s how the math works out if you&#8217;re curious:</p>



<p class="wp-block-paragraph">• Out of the 100 hypotheses, 20 will be true, and of those, you&#8217;ll believe 16 = 0.80 * 20 (these are the true positives) and fail to believe 4 (these are the false negatives).</p>



<p class="wp-block-paragraph">• Out of the 100 hypotheses, 80 will be false, and of those, you&#8217;ll believe 4 = 0.05 * 80 (these are the false positives), and you&#8217;ll reject 76 (these are the true negatives).</p>



<p class="wp-block-paragraph">Of course, if the numbers here had been different, the conclusions would be different as well. For instance, imagine if you started with 2000 hypotheses, and this time, imagine that only 1% of them were true. If the power was still 80%, then:</p>



<p class="wp-block-paragraph">&nbsp;• Out of the 2000 hypotheses, 20 of them would be true, and of those, you&#8217;d believe 16 (0.80 * 20) of them (these are true positives) and fail to believe 4 of them (these are false negatives).</p>



<p class="wp-block-paragraph">• Out of the 2000 hypotheses, 1980 would be false, and of those, you&#8217;d believe 99 (0.05*1980) of them (these are false positives), and you&#8217;d reject the other 1881 of them (these are true negatives).</p>



<p class="wp-block-paragraph">• So, altogether, you&#8217;d believe 115 (16 + 99) hypotheses, of which only 16 would&#8217;ve actually been true, so of the results you believe in, less than 14% would be correct!&nbsp;</p>



<p class="wp-block-paragraph">From analyses like these, we can see that the probability that a specific hypothesis is true, given that we&#8217;ve found p&lt;0.05, depends on a variety of factors, including the sample size, the true effect size, the base rate probability that a new hypothesis tested by that researcher is true, the probability of errors being made in the experimental design or statistical analysis, and so on.</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<p class="wp-block-paragraph">In real life:</p>



<p class="wp-block-paragraph">(1) Studies often don&#8217;t use large enough numbers of participants (and so are underpowered).</p>



<p class="wp-block-paragraph">(2) Researchers sometimes engage in p-hacking to artificially lower their p-values to help their papers get published.</p>



<p class="wp-block-paragraph">(3) Researchers often don&#8217;t carefully track how many hypotheses they&#8217;ve really tested.</p>



<p class="wp-block-paragraph">(4) The decision procedure described above is often not adhered to so strictly (e.g., a result of p=0.08 might be treated as suggestive evidence for the hypothesis, and hence the hypothesis is not rejected).</p>



<p class="wp-block-paragraph">(5) Real hypotheses often have auxiliary assumptions beyond what the p-value accounts for (such as an assumption that there is a lack of confounders, a lack of serious errors in the experimental setup, and so on).</p>



<p class="wp-block-paragraph">I personally don&#8217;t like thinking in terms of this decision procedure for p-values because I believe that modeling hypotheses as &#8220;true&#8221; or &#8220;false&#8221; is not a good approach to thinking clearly. This is because I believe it&#8217;s usually much better to think in terms of probabilities rather than a &#8220;true&#8221;/&#8221;false&#8221; dichotomy when trying to understand the answers to complex questions.</p>



<p class="wp-block-paragraph">Some people have argued that we should switch to a Bayesian approach to hypothesis testing since such an approach avoids many of the issues of p-values (including avoiding the problematic &#8220;true&#8221;/&#8221;false&#8221; dichotomy). But it also introduces other challenges, such as how to come up with an appropriate &#8220;prior&#8221; (which represents one&#8217;s belief about the probability of the hypothesis having different strengths of effects prior to seeing the study results).</p>



<p class="wp-block-paragraph"></p>



<p class="wp-block-paragraph"><em>This piece was first written on December 31, 2022, and first appeared on this site on April 2, 2023.</em></p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<p class="wp-block-paragraph"><a href="https://www.guidedtrack.com/programs/4zle8q9/run?essaySpecifier=%3A+Demystifying%20p-values" target="_blank" rel="noreferrer noopener">If you read this line, please do us a favor and click here to answer one quick question.</a></p>



<p class="wp-block-paragraph"></p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.spencergreenberg.com/2022/12/demystifying-p-values/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">3382</post-id>	</item>
		<item>
		<title>Testing Too Many Hypotheses</title>
		<link>https://www.spencergreenberg.com/2011/10/testing-too-many-hypotheses/</link>
					<comments>https://www.spencergreenberg.com/2011/10/testing-too-many-hypotheses/#comments</comments>
		
		<dc:creator><![CDATA[Spencer]]></dc:creator>
		<pubDate>Mon, 10 Oct 2011 17:16:40 +0000</pubDate>
				<category><![CDATA[Essays]]></category>
		<category><![CDATA[experiments]]></category>
		<category><![CDATA[hypotheses]]></category>
		<category><![CDATA[hypothesis test]]></category>
		<category><![CDATA[p-values]]></category>
		<category><![CDATA[probability]]></category>
		<category><![CDATA[science]]></category>
		<category><![CDATA[statistics]]></category>
		<category><![CDATA[test]]></category>
		<guid isPermaLink="false">http://www.spencergreenberg.com/?p=249</guid>

					<description><![CDATA[For each dataset, there is a limit to what we can use that dataset to test. Using the standard p-value based methods of science, the more hypotheses we check against the data, the more likely it will be that some of these checks give inaccurate conclusions. And this presents a big problem for the way [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>For each dataset, there is a limit to what we can use that dataset to test. Using the standard <a href="http://en.wikipedia.org/wiki/P-value">p-value based methods</a> of science, the more hypotheses we check against the data, the more likely it will be that some of these checks give inaccurate conclusions. And this presents a big problem for the way science is practiced.</p>
<p>Let&#8217;s take an example to illustrate the principle. Suppose that you have information about 1000 people selected at random from the U.S. adult population. Your dataset includes these people&#8217;s heights, weights, ages, shoe sizes, and so forth. Now, if your goal is to know the mean height of all people in America, you can produce an estimate of this quantity by averaging the heights of the 1000 people you have information about. Despite the fact that your sample contains just 1000 people, rather than the full set of 230,000,000 or so American adults of interest, your estimate will, with high probability, be within a couple of inches of the total population mean height. This is due to the fact that the 1000 people were sampled at random (so we shouldn&#8217;t expect our sample to differ from the entire population in a systematic way) and because the standard deviation of heights is not very large (if there were tremendous outliers in the data, such as 500 foot tall giants, we would need more samples to get an accurate estimate). This idea is made precise by the central limit theorem. It tells us how likely the true entire population mean is to fall different distances from our sample estimate, and says that the error of our estimate decreases like one over the square root of the size of our sample.</p>
<p>The same technique could work to approximate the mean weight of adult Americans, or age, or shoe size, or number of children. And in each case, the estimate would, with high probability, be quite accurate. We could even, if we liked, estimate all these quantities simultaneously if we collected all of this information about each of our 1000 people. But the more quantities we estimate, the greater the chance that at least one estimate is quite inaccurate. Since each estimate has some chance of being bad, if we make a sufficiently large number of estimates we should expect to get unlucky at some point and end up with one or more bad ones. So, if we aren&#8217;t just estimating mean height, but rather the mean of 50 different traits, we cannot claim that all 50 of these estimate are likely to be good. We should expect that some of them will be inaccurate, though we don&#8217;t know which ones.</p>
<p>This is where problems arise. Suppose that you are a researcher who is trying to find interesting differences between, say, southerners and northerners in the United States. Your dataset of 1000 adults contains 500 people from each group. What do you do? Well, it might seem reasonable to go ahead and compute the mean value of many different traits, and look at how these means differ between the two groups, to see if you can find any large differences that seem interesting. For instance, you may compute the average salary of each group, and see if they deviate from each other by a large enough amount to be deemed statistically significant. If they don&#8217;t, you can try another trait like IQ, or number of children, and repeat the process. If you try enough different traits, hopefully you&#8217;ll eventually find an intriguingly large difference between the groups.</p>
<p>The trouble is, we know that if you estimate a large number of quantities, some of them will be inaccurate, and so some of the apparent differences between your two groups may just be due to these inaccuracies. If you test enough traits, you will eventually find differences between the populations that look significant, even though it is just the result of chance.</p>
<p>In fact, even if northerners and southerners had no systematic differences between them, there would still be apparent differences that arose just from the particular sample of 1000 people you happened to have data on. For example, in your dataset, it just might happen that the northerners have lower numbers of children than southerners, even if this isn&#8217;t true for the underlying populations of all northerners and southerners. If you were to publish this finding, without making mention of the number of hypotheses you tested before finding it, it may seem that you had produced a meaningful result. In fact, the assessment of this result should take into account the number of hypotheses (e.g. northerners have smaller shoe sizes than southerners, northerners have greater salaries than southerners, etc.) that you tested before you discovered this one (and the <a href="http://en.wikipedia.org/wiki/Multiple_comparisons">p-values can be modified to include this information</a>). The most significant seeming deviation between the groups found after testing 100 different hypotheses is very likely greatly inflated by chance. Whereas if you had only tested a small number of hypotheses against your data, and found a strong result, this would likely be a meaningful finding.</p>
<p>As a general rule, the greater the number of data points you have, the larger the number of quantities you can accurately estimate from your dataset. On a set of just 10 points, you may not even be able to get an accurate estimate of the mean value of a single trait (unless the trait had very slow standard deviation). Whereas on a dataset of a billion points, you probably could estimate dozens of quantities accurately.</p>
<p>Unfortunately, when you&#8217;re reading a paper, there is no way to tell how many hypotheses the researcher tested on his dataset unless he chooses to publish it. And there is a strong incentive to obscure this information. If a researcher releases the fact that he tested 20 hypotheses before finding 1 which was statistically significant, readers may discredit the result, or reviewers may reject it for publication. And if the researcher spent a lot of time and money collecting his dataset, it would feel like a waste to give up on the data just because his first five hypotheses tested on it don&#8217;t pan out. It might take a lot of restraint to not just keep testing hypothesis after hypothesis until he finds something publishable.</p>
<p>But even if researchers were excessively careful, that wouldn&#8217;t fully resolve the problem. When a hypothesis is confirmed by a dataset, we must consider whether it is truly a confirmation of the hypothesis being tested, or a result of the fact that 20 researchers tested 20 false hypotheses, and this one of the 20 happened to seem true by chance. That is, if enough hypotheses are tested over all, we may find a large number of false hypotheses among them that just happen to seem true.</p>
<p>What makes this problem more pernicious is that when a hypothesis fails to pan out, the result is often not published. This is due to the fact that hypothesis disconfirmations (e.g. &#8220;no association was found between cabbage eating and longevity&#8221;) are generally less interesting and harder to publish than confirmations (e.g. &#8220;an association was found between cabbage eating and longevity&#8221;). But since most new hypotheses in science turn out to be false, we should expect the number of negative results to be very large (except in situations where previously well validated results are being confirmed). Hence, the number of published test results will be much less than the number of total tests conducted, with test failures substantially underreported. So there is no good way to tell how many times a hypotheses failed to be confirmed by tests before one researcher finally ran one that seemed to confirm it. And if a very large number of false hypotheses are tested, but mostly just the ones that turn out to look true are published, you could end up with a field&#8217;s journals being flooded with false but seemingly verified hypotheses. In exploratory fields where almost all hypotheses are false, and where disconfirmations of a hypothesis are almost never published, you might even get into a situation where <a href="http://www.plosmedicine.org/article/info:doi/10.1371/journal.pmed.0020124">most published research findings are false</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.spencergreenberg.com/2011/10/testing-too-many-hypotheses/feed/</wfw:commentRss>
			<slash:comments>6</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">249</post-id>	</item>
	</channel>
</rss>
