<p><div><div><div><div data-width="100" data-show-faces="false" data-send="true" data-layout="button_count" data-height="21" data-href="https://www.r-bloggers.com/two-meanings-of-priors-part-ii-quantifying-uncertainty-about-model-parameters/"></div></div><div></div></div><div></div></div>
<div>
(This article was first published on <strong><a href="http://www.nicebread.de/two-meanings-of-priors-2/"> R – Nicebread</a></strong>, and kindly contributed to <a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers)</a> </div>
<p><em>by Angelika Stefan &amp; Felix Schönbrodt</em></p>
<p>This is the second part of “Two meanings of priors”. The <a target="_blank" rel="nofollow" href="http://www.nicebread.de/two-meanings-of-priors-1/"> first part </a> explained a first meaning – “priors as subjective probabilities of models”. While the first meaning of priors refers to a global appraisal of existing hypotheses, the second meaning of priors refers to specific assumptions which are needed in the process of hypothesis building. The two kinds of priors have in common that they are both specified before concrete data are available. However, as it will hopefully become evident from the following blog post, they differ significantly from each other and should be distinguished clearly during data analysis.</p>
<h2>The second meaning of priors: Prior distribution for parameters</h2>
<p>In order to know how well evidence supports a hypothesis compared to another hypothesis, one must know the concrete specifications of each hypothesis. For example, in the tea tasting experiment, each hypothesis was characterized by a specific probability (e.g., the success rate of exactly 0.5 in H<sub>Fisher </sub>of the <a target="_blank" rel="nofollow" href="http://www.nicebread.de/two-meanings-of-priors-1/">previous blog post</a>). What might sound trivial at first – deciding on the concrete specifications of a hypothesis – is in fact one of the major challenges when doing Bayesian statistics. Scientific theories are often imprecise, resulting in more than one plausible way to derive a hypothesis. With deciding upon one specific hypothesis, often new auxiliary assumptions are made. <strong>These assumptions, which are needed in order to specify a hypothesis adequately, are called “priors” as well.</strong> They influence the formulation and interpretation of the likelihood (which gives you the plausibility of data under a specific hypothesis). We will illustrate this in an example.</p>
<h3>How much money do we spend for lunch?</h3>
<div class="wp-caption"><a target="_blank" rel="nofollow" href="https://i0.wp.com/www.nicebread.de/WP/wp-content/uploads/2016/11/Bildschirmfoto-2016-12-13-um-05.40.55.jpg"><img sizes="(max-width: 500px) 100vw, 500px" class="wp-image-1153" src="https://i0.wp.com/www.nicebread.de/WP/wp-content/uploads/2016/11/Bildschirmfoto-2016-12-13-um-05.40.55.jpg?resize=456%2C288" data-recalc-dims="1"></a>
<p class="wp-caption-text">Fig. 2: A typical lunch in Germany: Schweinshaxe, Brezn and 0.5 liter of beer.</p>
</div>
<p>A food company conducts market research in a large German city. They know from a recent representative enquiry by the German Federal Statistical Office that Germans spend on average 4.50 € for their lunch (standard deviation: 0.60 €). Now they want to know if the inhabitants of one specific city spend more money for their lunch compared to the German average. They expect lunch expenses to be especially high in this city because of the generally high living costs. In a traditional testing procedure in inferential statistics the food company would formulate two hypotheses to test their assumption: a null and an alternative hypothesis: H<sub>0</sub>: µ ≤ 4.50 and H<sub>1</sub>: µ > 4.50.</p>
<p>In Bayesian hypothesis testing, the formulation of the hypotheses has to be more precise than this. We need precise hypotheses as a basis for the likelihood functions which assign probability values to possible states of reality. The traditional formulation, µ > 4.50, is too vague for that purpose: Is any lunch cost above 4.50€ a priori equally likely? Is it plausible that a lunch costs 1,000,000€ on average? Probably not. Not every state of reality is, a priori, equally plausible. “Models connect theory to data“ (Rouder, Morey, &amp; Wagenmakers, 2016), and a model that predicts everything predicts nothing.</p>
<p>As Bayesian statisticians we therefore must ask ourselves: Which values are more plausible given that our hypotheses are true? Of course, our knowledge differs from case to case in this point. Sometimes, we may be able to commit to a very small range of plausible values or even to a single value (in this case, we would call the respecting hypothesis a “point hypothesis”). Theories in physics sometimes predict a single state of reality: “If this theory is true, then the mass of a Chicks boson is exactly 1.52324E-16 gr”.</p>
<p> </p>
<div class="wp-caption"><a target="_blank" rel="nofollow" href="https://i0.wp.com/www.nicebread.de/WP/wp-content/uploads/2017/01/Point-Hypotheses-Dirac.jpg"><img sizes="(max-width: 300px) 100vw, 300px" alt="" class="wp-image-1213" src="https://i2.wp.com/www.nicebread.de/WP/wp-content/uploads/2017/01/Point-Hypotheses-Dirac-300x220.jpg?resize=300%2C220" data-recalc-dims="1"></a>
<p class="wp-caption-text">Point hypotheses in the food company example</p>
</div>
<p>More often, however, our knowledge about plausible values under a certain theory might be less precise, leading to a wider range of plausible values. Hence, the prior in the second sense defines the probability of a parameter value given a hypothesis, <em>p</em>(θ | H1).</p>
<p>Let us come back to the food company example. Their null hypothesis might be that there is no difference between the city in the focus of their research project and the German average. Hence, the null hypothesis predicts an average lunch cost of 4.50€. With the alternative hypothesis, it becomes slightly more complex. They assume that average lunch expenses in the city should be higher than the German average, so the most plausible value under the alternative hypothesis should be higher than 4.5. However, they may deem it very improbable that the mean lunch expenses are more than two standard deviations higher than the German average (so, for example, it should be very improbable that someone spends more than, say, 10 EUR for lunch even in the expensive city). With this knowledge, they can put most plausibility on values in a range from 4.5 to 5.7 (4.5 + 2 standard deviations). They could further specify their hypothesis by claiming that the most plausible value should be 5.1, i.e., one standard deviation higher than the German average. The elements of these verbal descriptions of the alternative hypothesis can be summarized in a truncated normal distribution that is centered over 5.1 and truncated at 4.5 (as the directional hypothesis does not predict values in the opposite direction).</p>
<p> </p>
<div class="wp-caption"><a target="_blank" rel="nofollow" href="https://i1.wp.com/www.nicebread.de/WP/wp-content/uploads/2016/11/FoodCompany_Hypothesis.jpeg"><img sizes="(max-width: 300px) 100vw, 300px" alt="" class="wp-image-1126" src="https://i0.wp.com/www.nicebread.de/WP/wp-content/uploads/2016/11/FoodCompany_Hypothesis-300x192.jpeg?resize=300%2C192" data-recalc-dims="1"></a>
<p class="wp-caption-text">Truncated normal distribution centered over 5.1 and truncated at 4.5</p>
</div>
<p>With this model specification, the researchers would place 13% of the probability mass on values larger than 2SD of the general population (i.e., > 5.7).</p>
<p>Making it even more complex, they could quantify their uncertainty about the most plausible value (i.e., the maximum of the density distribution) by assigning another distribution to it. For example, they could build a normal distribution around it, with a mean of 5.1 and a standard deviation of 0.3. This would imply that in their opinion, 5.1 is the “most plausible most plausible value” but that values between 4.8 and 5.4 are also potential candidates for the most plausible value.</p>
<h3>Why making it complicated if it’s so simple in traditional hypothesis testing?</h3>
<p>What you can notice in the example about the development of hypotheses is that the market researchers have to make auxiliary assumptions on top of their original hypothesis (which was H1: µ > 4.5). If possible, these prior plausibilities should be informed by theory or by previous empirical data. Specifying alternative hypothesis in this way may seem to be an unnecessary burden compared to traditional hypothesis testing where these extra assumptions seemingly are not necessary. Except that they are necessary. Without going into detail in this blog post, we recommend to read Rouder et al.’s (2016a) “Is there a free lunch in inference?“, with the bottom line that principled and rational inference needs specified alternative hypotheses. (For example, in Neyman-Pearson testing, you also need to specify a precise alternative hypothesis that refers to the “smallest effect size of interest”)</p>
<p>Furthermore, readers might object: “Researchers rarely have enough background knowledge to specify models that predict data“. Rouder et al. (2016b) argue that this critique is overstated, as (1) with proper <a target="_blank" rel="nofollow" href="http://journals.plos.org/plosone/article?id=10.1371/journal.pone.0120981">elicitation</a>, researchers often know much more than they initially think, (2) default models can be a starting point if really no information is available, and (3) several models can be explored without penalty.</p>
<h2>Do the two kinds of priors depend on each other in some way?</h2>
<p>A question that may come to your mind soon after you understood the difference between the two kinds of priors is: If they both are called “priors”, do they depend on each other in some way? Does the formulation of your “personal prior plausibility of a hypothesis” (like the skeptical observer’s prior on Mrs. Bristol’s tea tasting abilities) influence the specification of your model (like the hypothesis specification in the second example) or vice versa?</p>
<p>The straightforward answer to this question is “no, they don’t”. This can be easily illustrated in a case where the prior conviction of a researcher runs against the hypothesis he or she wants to test. The food company in the second example has sophisticatedly determined the likelihood of the two hypotheses (H0 and H1), which they want to pit against each other. They are probably considerably convinced that the specification of the alternative hypothesis describes reality better than the specification of the null hypothesis. In a simplified form, their prior odds (i.e., priors in the first sense) can be described as a ratio like 10:1. This would mean that they deem the alternative hypothesis ten times as likely as the null hypothesis. However, another food company, may have prior odds of 3:5 while conducting the same test (i.e., using the same prior plausibilities of model parameters). This shows that priors in the first sense are independent of priors in the second sense. Priors in the first sense change with different personal convictions while priors in the second sense remain constant. Similarly, prior beliefs can change after seeing the data – the formulation of the model (i.e., what a theory predicts) stays the same. (As long as the theory, from which the model specification is derived, does not change. In an estimation context, the model parameters are updated by the data.)</p>
<h3>Summary of both blog posts</h3>
<p>The term “prior” has two meanings in the context of Bayesian hypothesis testing. The first one, usually applied in Bayes factor analysis, is equivalent to a prior subjective probability of a hypothesis (“how plausible do you deem a hypothesis compared to another hypothesis before seeing the data”). The second meaning refers to the assumptions made in the specification of the model of the hypotheses which are needed to derive the likelihood function. These two meanings of the term “prior” have to be distinguished clearly during data analysis, especially as they do not depend on each other in any way. Some researchers (e.g., Dienes, 2016) therefore suggest to call only priors in the first sense “priors” and speak about “specification of the model” when referring to the second meaning.</p>
<p><a target="_blank" rel="nofollow" href="http://www.nicebread.de/two-meanings-of-priors-1/">Read the first part of this blog post: Priors as the plausibility of models</a></p>
<h3>References</h3>
<p>Dienes, Z. (2011). Bayesian versus orthodox statistics: Which side are you on?. <em>Perspectives On Psychological Science</em>, 6(3), 274-290. <a target="_blank" rel="nofollow" href="http://doi/"> http://doi:10.1177/1745691611406920</a></p>
<p>Dienes, Z. (2016). How Bayes factors change scientific practice. <em>Journal Of Mathematical Psychology</em>, 7278-89. <a target="_blank" rel="nofollow" href="http://doi/"> http://doi:10.1016/j.jmp.2015.10.003 </a></p>
<p>Lindley, D. V. (1993). The analysis of experimental data: The appreciation of tea and wine. <em>Teaching Statistics</em>, 15(1), 22-25. <a target="_blank" rel="nofollow" href="http://dx.doi.org/10.1111/j.1467-9639.1993.tb00252.x"> http://dx.doi.org/10.1111/j.1467-9639.1993.tb00252.x </a></p>
<p>Rouder, J. N., Morey, R. D., Verhagen, J., Province, J. M., &amp; Wagenmakers, E. J. (2016a). Is there a free lunch in inference? <em>Topics in Cognitive Science</em>, <em>8</em>, 520–547. <a target="_blank" rel="nofollow" href="http://doi.org/10.1111/tops.12214">http://doi.org/10.1111/tops.12214</a></p>
<p>Rouder, J. N., Morey, R. D., &amp; Wagenmakers, E. J. (2016b). The Interplay between Subjectivity, Statistical Practice, and Psychological Science. <em>Collabra</em>, <em>2</em>(1), 6–12. <a target="_blank" rel="nofollow" href="http://doi.org/10.1525/collabra.28">http://doi.org/10.1525/collabra.28</a></p>
<p>[cc lang=”rsplus” escaped=”true”]</p>
<p>library(truncnorm)</p>
<p># parameters for H1 model<br>
M &lt;- 5.1<br>
SD &lt;- 0.5</p>
<p>range &lt;- seq(4.5, 7, by=.01)<br>
plausibility &lt;- dtruncnorm(range, a=4.5, b=Inf, mean=M, sd=SD)<br>
plot(range, plausibility, type=”l”, xlim=c(4, 7), axes=FALSE, ylab=”Plausibility”, xlab=”Lunch cost in €”, mgp = c(2.5, 1, 0))<br>
axis(1)</p>
<p># Get the axis ranges, draw arrow<br>
u &lt;- par(“usr”)<br>
points(u[1], u[4], pch=17, xpd = TRUE)<br>
lines(c(u[1], u[1]), c(u[3], u[4]), xpd = TRUE)</p>
<p>abline(v=4.5, lty=”dotted”)</p>
<p># What is the probability of values > 5.7?<br>
1-ptruncnorm(5.7, a=4.5, b=Inf, mean=M, sd=SD)<br>
[/cc]</p>
<p>The post <a target="_blank" rel="nofollow" href="http://www.nicebread.de/two-meanings-of-priors-2/">Two meanings of priors, part II: Quantifying uncertainty about model parameters</a> appeared first on <a target="_blank" rel="nofollow" href="http://www.nicebread.de/">Nicebread</a>.</p>
<p>
<div>
<div>To <strong>leave a comment</strong> for the author, please follow the link and comment on their blog: <strong><a href="http://www.nicebread.de/two-meanings-of-priors-2/"> R – Nicebread</a></strong>.</div>
<hr>
<a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers.com</a> offers <strong><a rel="nofollow" href="https://feedburner.google.com/fb/a/mailverify?uri=RBloggers">daily e-mail updates</a></strong> about <a title="The R Project for Statistical Computing" rel="nofollow" href="https://www.r-project.org/">R</a> news and <a title="R tutorials" rel="nofollow" href="https://www.r-bloggers.com/search/tutorial">tutorials</a> on topics such as: <a title="Data science" rel="nofollow" href="https://www.r-bloggers.com/search/data%20science">Data science</a>, <a title="Big Data" rel="nofollow" href="https://www.r-bloggers.com/search/Big%20Data">Big Data, <a title="R jobs" rel="nofollow" href="https://www.r-users.com/">R jobs</a>, visualization (<a title="ggplot and ggplot2 tutorials" rel="nofollow" href="https://www.r-bloggers.com/search/ggplot2">ggplot2</a>, <a title="Boxplots using lattice and ggplot2 tutorials" rel="nofollow" href="https://www.r-bloggers.com/search/boxplot">Boxplots</a>, <a title="Maps and gis" rel="nofollow" href="https://www.r-bloggers.com/search/map">maps</a>, <a title="Animation in R" rel="nofollow" href="https://www.r-bloggers.com/search/animation">animation</a>), programming (<a title="RStudio IDE for R" rel="nofollow" href="https://www.r-bloggers.com/search/RStudio">RStudio</a>, <a title="Sweave and literate programming" rel="nofollow" href="https://www.r-bloggers.com/search/sweave">Sweave</a>, <a title="LaTeX in R" rel="nofollow" href="https://www.r-bloggers.com/search/LaTeX">LaTeX</a>, <a title="SQL and databases" rel="nofollow" href="https://www.r-bloggers.com/search/SQL">SQL</a>, <a title="Eclipse IDE for R" rel="nofollow" href="https://www.r-bloggers.com/search/eclipse">Eclipse</a>, <a title="git and github, Version Control System" rel="nofollow" href="https://www.r-bloggers.com/search/git">git</a>, <a title="Large data in R using Hadoop" rel="nofollow" href="https://www.r-bloggers.com/search/hadoop">hadoop</a>, <a title="Web Scraping of google, facebook, yahoo, twitter and more using R" rel="nofollow" href="https://www.r-bloggers.com/search/Web+Scraping">Web Scraping</a>) statistics (<a title="Regressions and ANOVA analysis tutorials" rel="nofollow" href="https://www.r-bloggers.com/search/regression">regression</a>, <a title="principal component analysis tutorial" rel="nofollow" href="https://www.r-bloggers.com/search/PCA">PCA</a>, <a title="Time series" rel="nofollow" href="https://www.r-bloggers.com/search/time+series">time series</a>, <a title="finance trading" rel="nofollow" href="https://www.r-bloggers.com/search/trading">trading</a>) and more...
<img height="1" alt="" width="1" src="http://feeds.feedburner.com/~r/RBloggers/~4/Gkrx7VqGOrg"></a></div>