<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE article PUBLIC "-//NLM//DTD Journal Publishing DTD v3.0 20080202//EN" "http://dtd.nlm.nih.gov/publishing/3.0/journalpublishing3.dtd">
<article xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink" dtd-version="3.0" xml:lang="en" article-type="research article">
 <front>
  <journal-meta>
   <journal-id journal-id-type="publisher-id">
    ojapps
   </journal-id>
   <journal-title-group>
    <journal-title>
     Open Journal of Applied Sciences
    </journal-title>
   </journal-title-group>
   <issn pub-type="epub">
    2165-3917
   </issn>
   <issn publication-format="print">
    2165-3925
   </issn>
   <publisher>
    <publisher-name>
     Scientific Research Publishing
    </publisher-name>
   </publisher>
  </journal-meta>
  <article-meta>
   <article-id pub-id-type="doi">
    10.4236/ojapps.2025.159169
   </article-id>
   <article-id pub-id-type="publisher-id">
    ojapps-145348
   </article-id>
   <article-categories>
    <subj-group subj-group-type="heading">
     <subject>
      Articles
     </subject>
    </subj-group>
    <subj-group subj-group-type="Discipline-v2">
     <subject>
      Biomedical 
     </subject>
     <subject>
       Life Sciences, Chemistry 
     </subject>
     <subject>
       Materials Science, Computer Science 
     </subject>
     <subject>
       Communications, Engineering, Physics 
     </subject>
     <subject>
       Mathematics
     </subject>
    </subj-group>
   </article-categories>
   <title-group>
    On the Interpretation and the Choice of the Hyperparameters of a Beta Prior Distribution
   </title-group>
   <contrib-group>
    <contrib contrib-type="author" xlink:type="simple">
     <name name-style="western">
      <surname>
       Valeria
      </surname>
      <given-names>
       Sambucini
      </given-names>
     </name>
    </contrib>
   </contrib-group> 
   <aff id="affnull">
    <addr-line>
     aDepartment of Statistical Sciences, Sapienza University of Rome, Rome, Italy
    </addr-line> 
   </aff> 
   <pub-date pub-type="epub">
    <day>
     01
    </day> 
    <month>
     09
    </month>
    <year>
     2025
    </year>
   </pub-date> 
   <volume>
    15
   </volume> 
   <issue>
    09
   </issue>
   <fpage>
    2545
   </fpage>
   <lpage>
    2555
   </lpage>
   <history>
    <date date-type="received">
     <day>
      25,
     </day>
     <month>
      June
     </month>
     <year>
      2025
     </year>
    </date>
    <date date-type="published">
     <day>
      31,
     </day>
     <month>
      June
     </month>
     <year>
      2025
     </year> 
    </date> 
    <date date-type="accepted">
     <day>
      31,
     </day>
     <month>
      August
     </month>
     <year>
      2025
     </year> 
    </date>
   </history>
   <permissions>
    <copyright-statement>
     © Copyright 2014 by authors and Scientific Research Publishing Inc. 
    </copyright-statement>
    <copyright-year>
     2014
    </copyright-year>
    <license>
     <license-p>
      This work is licensed under the Creative Commons Attribution International License (CC BY). http://creativecommons.org/licenses/by/4.0/
     </license-p>
    </license>
   </permissions>
   <abstract>
    Binary outcomes are frequently encountered in a variety of fields and contexts and the Bayesian approach is widely used to analyze this type of data. Under this framework, a beta prior distribution for the probability of success is typically used. We clarify why in the statistical literature one can find two slightly different interpretations of the prior hyperparameters as extra data. The two interpretations can be exploited to elicit informative beta prior densities by specifying a measure of central tendency and a suitable value for the prior sample size. We developed a Shiny App in R that provides a user-friendly interface to implement the elicitation procedures.
   </abstract>
   <kwd-group> 
    <kwd>
     Beta Prior Distributions
    </kwd> 
    <kwd>
      Binary Data
    </kwd> 
    <kwd>
      Elicitation
    </kwd> 
    <kwd>
      Extra Data
    </kwd> 
    <kwd>
      Prior Sample Size
    </kwd>
   </kwd-group>
  </article-meta>
 </front>
 <body>
  <sec id="s1">
   <title>1. Introduction</title>
   <p>Binary outcomes, which assume only two possible values, are often analysed in a variety of fields and contexts, especially in epidemiology and clinical trials. In fact, many standard epidemiological problems, such as the study of the effectiveness of a new vaccine or the evaluation of diagnostic tests and the assessment of their performance, are based on binary variables. Cohort and case-control studies, conducted to identify aetiological agents that increase the risk of a certain disease, are typically based on a binary exposure variable. Also in clinical trials, the primary endpoint is often a binary endpoint, that allows each patient to be classified as a responder or not to the experimental drug: standard examples are single-arm phase II trials or comparative phase III studies that exploit the risk difference, the relative risk or the odds-ratio as parameters of interest. In all these areas of research, the Bayesian approach is widely used to analyze binary outcomes.</p>
   <p>The Bayesian analysis of binary data, generated from a Bernoulli distribution, requires the specification of a prior distribution for the unknown parameter 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mi>
       θ 
     </mi> 
    </math>, that represents a success probability. A very common choice in this situation is the beta distribution. In addition to computational convenience and high flexibility, this distribution allows a nice interpretation of its hyperparameters as extra data. However, there are two possible and slightly different interpretations. According to the first one, the information contained in a beta prior density of hyperparameters 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mi>
       α 
     </mi> 
    </math> and 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mi>
       β 
     </mi> 
    </math> corresponds to the augmentation of data with 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mi>
       α 
     </mi> 
    </math> successes and 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mi>
       β 
     </mi> 
    </math> failures <xref ref-type="bibr" rid="scirp.145348-1">
     [1]
    </xref>-<xref ref-type="bibr" rid="scirp.145348-4">
     [4]
    </xref>. The alternative interpretation suggests that the amount of data to add to the current experiment consists in 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <mi>
        α 
      </mi> 
      <mo>
        − 
      </mo> 
      <mn>
        1 
      </mn> 
     </mrow> 
    </math> successes and 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <mi>
        β 
      </mi> 
      <mo>
        − 
      </mo> 
      <mn>
        1 
      </mn> 
     </mrow> 
    </math> failures <xref ref-type="bibr" rid="scirp.145348-5">
     [5]
    </xref>-<xref ref-type="bibr" rid="scirp.145348-8">
     [8]
    </xref>. Both the interpretations are mathematically sound, but they reflect different philosophical stances on prior information strength. Moreover, most textbooks and papers from the statistical literature typically provide only one of them, which can lead to ambiguity and confusion.</p>
   <p>The rest of the paper is organized as follows. In Section 2, we revise the Bayesian analysis of binary data. In Section 3, we clarify why both the interpretations of the hyperparameters are reasonable by illustrating the reasoning that supports them. Section 4 shows how the two interpretations can be exploited to elicit informative beta prior densities. In Section 5, we present a Shiny App in R that provides a user-friendly interface to implement the elicitation procedures and to help students or practitioners not experts in Bayesian statistics to understand the role of the prior sample size. The main functionalities of the app are illustrated through numerical examples. Finally, Section 6 contains some concluding remarks.</p>
  </sec><sec id="s2">
   <title>2. Bayesian Analysis of Binary Data</title>
   <p>Let us introduce an experiment based on a binary response variable 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mi>
       Y 
     </mi> 
    </math> related to an event’s occurrence. Thus, we consider a random sample, 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <mrow> 
       <mo>
         ( 
       </mo> 
       <mrow> 
        <msub> 
         <mi>
           Y 
         </mi> 
         <mn>
           1 
         </mn> 
        </msub> 
        <mo>
          , 
        </mo> 
        <mo>
          ⋯ 
        </mo> 
        <mo>
          , 
        </mo> 
        <msub> 
         <mi>
           Y 
         </mi> 
         <mi>
           n 
         </mi> 
        </msub> 
       </mrow> 
       <mo>
         ) 
       </mo> 
      </mrow> 
     </mrow> 
    </math>, with independent and identically distributed variables such that 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <msub> 
       <mi>
         Y 
       </mi> 
       <mi>
         i 
       </mi> 
      </msub> 
      <mo>
        | 
      </mo> 
      <mi>
        θ 
      </mi> 
      <mo>
        ~ 
      </mo> 
      <mi>
        B 
      </mi> 
      <mi>
        e 
      </mi> 
      <mi>
        r 
      </mi> 
      <mi>
        n 
      </mi> 
      <mi>
        o 
      </mi> 
      <mi>
        u 
      </mi> 
      <mi>
        l 
      </mi> 
      <mi>
        l 
      </mi> 
      <mi>
        i 
      </mi> 
      <mrow> 
       <mo>
         ( 
       </mo> 
       <mi>
         θ 
       </mi> 
       <mo>
         ) 
       </mo> 
      </mrow> 
     </mrow> 
    </math>, for 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <mi>
        i 
      </mi> 
      <mo>
        = 
      </mo> 
      <mn>
        1 
      </mn> 
      <mo>
        , 
      </mo> 
      <mo>
        ⋯ 
      </mo> 
      <mo>
        , 
      </mo> 
      <mi>
        n 
      </mi> 
     </mrow> 
    </math>, where 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mi>
       θ 
     </mi> 
    </math> is the unknown success probability, i.e. the probability that the event occurs. To summarize data, we typically use the sum of successes, that is the sufficient statistic 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <msub> 
       <mi>
         S 
       </mi> 
       <mi>
         n 
       </mi> 
      </msub> 
      <mo>
        = 
      </mo> 
      <mstyle displaystyle="true"> 
       <msubsup> 
        <mo>
          ∑ 
        </mo> 
        <mrow> 
         <mi>
           i 
         </mi> 
         <mo>
           = 
         </mo> 
         <mn>
           1 
         </mn> 
        </mrow> 
        <mi>
          n 
        </mi> 
       </msubsup> 
       <mrow> 
        <msub> 
         <mi>
           Y 
         </mi> 
         <mi>
           i 
         </mi> 
        </msub> 
       </mrow> 
      </mstyle> 
     </mrow> 
    </math> with a binomial sampling distribution of parameters 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <mrow> 
       <mo>
         ( 
       </mo> 
       <mrow> 
        <mi>
          n 
        </mi> 
        <mo>
          , 
        </mo> 
        <mi>
          θ 
        </mi> 
       </mrow> 
       <mo>
         ) 
       </mo> 
      </mrow> 
     </mrow> 
    </math>. Under a frequentist framework, the maximum likelihood estimate of 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mi>
       θ 
     </mi> 
    </math> is the sample mean, 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <msub> 
       <mover accent="true"> 
        <mi>
          θ 
        </mi> 
        <mo>
          ^ 
        </mo> 
       </mover> 
       <mrow> 
        <mi>
          M 
        </mi> 
        <mi>
          L 
        </mi> 
       </mrow> 
      </msub> 
      <mo>
        = 
      </mo> 
      <mrow> 
       <mrow> 
        <msub> 
         <mi>
           s 
         </mi> 
         <mi>
           n 
         </mi> 
        </msub> 
       </mrow> 
       <mo>
         / 
       </mo> 
       <mi>
         n 
       </mi> 
      </mrow> 
     </mrow> 
    </math>, i.e. the frequency of the successes among all observations.</p>
   <p>Under the Bayesian approach, before data is observed, the parameter 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mi>
       θ 
     </mi> 
    </math> is treated as a random variable having a prior distribution, 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <mi>
        π 
      </mi> 
      <mrow> 
       <mo>
         ( 
       </mo> 
       <mi>
         θ 
       </mi> 
       <mo>
         ) 
       </mo> 
      </mrow> 
     </mrow> 
    </math>, that expresses pre-experimental knowledge and belief available about 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mi>
       θ 
     </mi> 
    </math>. When dealing with binary data, a beta prior distribution for 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mi>
       θ 
     </mi> 
    </math> is commonly used, that is</p>
   <p>
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <mi>
        π 
      </mi> 
      <mrow> 
       <mo>
         ( 
       </mo> 
       <mi>
         θ 
       </mi> 
       <mo>
         ) 
       </mo> 
      </mrow> 
      <mo>
        = 
      </mo> 
      <mi>
        B 
      </mi> 
      <mi>
        e 
      </mi> 
      <mi>
        t 
      </mi> 
      <mi>
        a 
      </mi> 
      <mrow> 
       <mo>
         ( 
       </mo> 
       <mrow> 
        <mi>
          θ 
        </mi> 
        <mo>
          ; 
        </mo> 
        <mi>
          α 
        </mi> 
        <mo>
          , 
        </mo> 
        <mi>
          β 
        </mi> 
       </mrow> 
       <mo>
         ) 
       </mo> 
      </mrow> 
      <mo>
        = 
      </mo> 
      <mfrac> 
       <mn>
         1 
       </mn> 
       <mrow> 
        <mi>
          ℬ 
        </mi> 
        <mrow> 
         <mo>
           ( 
         </mo> 
         <mrow> 
          <mi>
            α 
          </mi> 
          <mo>
            , 
          </mo> 
          <mi>
            β 
          </mi> 
         </mrow> 
         <mo>
           ) 
         </mo> 
        </mrow> 
       </mrow> 
      </mfrac> 
      <msup> 
       <mi>
         θ 
       </mi> 
       <mrow> 
        <mi>
          α 
        </mi> 
        <mo>
          − 
        </mo> 
        <mn>
          1 
        </mn> 
       </mrow> 
      </msup> 
      <msup> 
       <mrow> 
        <mrow> 
         <mo>
           ( 
         </mo> 
         <mrow> 
          <mn>
            1 
          </mn> 
          <mo>
            − 
          </mo> 
          <mi>
            θ 
          </mi> 
         </mrow> 
         <mo>
           ) 
         </mo> 
        </mrow> 
       </mrow> 
       <mrow> 
        <mi>
          β 
        </mi> 
        <mo>
          − 
        </mo> 
        <mn>
          1 
        </mn> 
       </mrow> 
      </msup> 
      <mo>
        , 
      </mo> 
     </mrow> 
    </math></p>
   <p>where the hyperparameters 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mi>
       α 
     </mi> 
    </math> and 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mi>
       β 
     </mi> 
    </math> are both larger than 0 and 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <mi>
        ℬ 
      </mi> 
      <mrow> 
       <mo>
         ( 
       </mo> 
       <mrow> 
        <mi>
          α 
        </mi> 
        <mo>
          , 
        </mo> 
        <mi>
          β 
        </mi> 
       </mrow> 
       <mo>
         ) 
       </mo> 
      </mrow> 
     </mrow> 
    </math> denotes the beta function. The mode, the expected value and the variance of 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <mi>
        π 
      </mi> 
      <mrow> 
       <mo>
         ( 
       </mo> 
       <mi>
         θ 
       </mi> 
       <mo>
         ) 
       </mo> 
      </mrow> 
     </mrow> 
    </math> are, respectively,</p>
   <p>
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <mi>
        M 
      </mi> 
      <mi>
        o 
      </mi> 
      <mi>
        d 
      </mi> 
      <mi>
        e 
      </mi> 
      <mrow> 
       <mo>
         ( 
       </mo> 
       <mi>
         θ 
       </mi> 
       <mo>
         ) 
       </mo> 
      </mrow> 
      <mo>
        = 
      </mo> 
      <mfrac> 
       <mrow> 
        <mi>
          α 
        </mi> 
        <mo>
          − 
        </mo> 
        <mn>
          1 
        </mn> 
       </mrow> 
       <mrow> 
        <mi>
          α 
        </mi> 
        <mo>
          + 
        </mo> 
        <mi>
          β 
        </mi> 
        <mo>
          − 
        </mo> 
        <mn>
          2 
        </mn> 
       </mrow> 
      </mfrac> 
      <mo>
        , 
      </mo> 
      <mtext>
          
      </mtext> 
      <mtext>
          
      </mtext> 
      <mi>
        E 
      </mi> 
      <mrow> 
       <mo>
         ( 
       </mo> 
       <mi>
         θ 
       </mi> 
       <mo>
         ) 
       </mo> 
      </mrow> 
      <mo>
        = 
      </mo> 
      <mfrac> 
       <mi>
         α 
       </mi> 
       <mrow> 
        <mi>
          α 
        </mi> 
        <mo>
          + 
        </mo> 
        <mi>
          β 
        </mi> 
       </mrow> 
      </mfrac> 
     </mrow> 
    </math> and</p>
   <p>
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <mi>
        V 
      </mi> 
      <mi>
        a 
      </mi> 
      <mi>
        r 
      </mi> 
      <mrow> 
       <mo>
         ( 
       </mo> 
       <mi>
         θ 
       </mi> 
       <mo>
         ) 
       </mo> 
      </mrow> 
      <mo>
        = 
      </mo> 
      <mfrac> 
       <mrow> 
        <mi>
          α 
        </mi> 
        <mi>
          β 
        </mi> 
       </mrow> 
       <mrow> 
        <msup> 
         <mrow> 
          <mrow> 
           <mo>
             ( 
           </mo> 
           <mrow> 
            <mi>
              α 
            </mi> 
            <mo>
              + 
            </mo> 
            <mi>
              β 
            </mi> 
           </mrow> 
           <mo>
             ) 
           </mo> 
          </mrow> 
         </mrow> 
         <mn>
           2 
         </mn> 
        </msup> 
        <mrow> 
         <mo>
           ( 
         </mo> 
         <mrow> 
          <mi>
            α 
          </mi> 
          <mo>
            + 
          </mo> 
          <mi>
            β 
          </mi> 
          <mo>
            + 
          </mo> 
          <mn>
            1 
          </mn> 
         </mrow> 
         <mo>
           ) 
         </mo> 
        </mrow> 
       </mrow> 
      </mfrac> 
      <mo>
        . 
      </mo> 
     </mrow> 
    </math></p>
   <p>This choice is mainly due to analytical tractability, since the class of the beta prior densities is conjugate to the binomial model and, therefore, the corresponding posterior distribution will belong to the same family of distributions as the prior. A further reason that motivates the use of a beta prior is that its probability density function can take many different shapes depending on the two hyperparameters and, thus, it can be exploited to model very different kinds of information.</p>
   <p>Assuming that 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <msub> 
       <mi>
         s 
       </mi> 
       <mi>
         n 
       </mi> 
      </msub> 
     </mrow> 
    </math> successes have been observed, from standard results of conjugate analysis, the posterior distribution of 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mi>
       θ 
     </mi> 
    </math> is still a beta density with updated parameters <xref ref-type="bibr" rid="scirp.145348-5">
     [5]
    </xref>, that is</p>
   <p>
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <mi>
        π 
      </mi> 
      <mrow> 
       <mo>
         ( 
       </mo> 
       <mrow> 
        <mi>
          θ 
        </mi> 
        <mo>
          | 
        </mo> 
        <msub> 
         <mi>
           s 
         </mi> 
         <mi>
           n 
         </mi> 
        </msub> 
       </mrow> 
       <mo>
         ) 
       </mo> 
      </mrow> 
      <mo>
        = 
      </mo> 
      <mi>
        B 
      </mi> 
      <mi>
        e 
      </mi> 
      <mi>
        t 
      </mi> 
      <mi>
        a 
      </mi> 
      <mrow> 
       <mo>
         ( 
       </mo> 
       <mrow> 
        <mi>
          θ 
        </mi> 
        <mo>
          ; 
        </mo> 
        <msub> 
         <mi>
           s 
         </mi> 
         <mi>
           n 
         </mi> 
        </msub> 
        <mo>
          + 
        </mo> 
        <mi>
          α 
        </mi> 
        <mo>
          , 
        </mo> 
        <mi>
          n 
        </mi> 
        <mo>
          − 
        </mo> 
        <msub> 
         <mi>
           s 
         </mi> 
         <mi>
           n 
         </mi> 
        </msub> 
        <mo>
          + 
        </mo> 
        <mi>
          β 
        </mi> 
       </mrow> 
       <mo>
         ) 
       </mo> 
      </mrow> 
      <mo>
        . 
      </mo> 
     </mrow> 
    </math></p>
   <p>As it is well known, Bayesian inference about 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mi>
       θ 
     </mi> 
    </math> is realized by summarizing the information contained in its posterior distribution. For instance, a Bayesian point estimate of 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mi>
       θ 
     </mi> 
    </math> can be obtained by considering a measure of central tendency of 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <mi>
        π 
      </mi> 
      <mrow> 
       <mo>
         ( 
       </mo> 
       <mrow> 
        <mi>
          θ 
        </mi> 
        <mo>
          | 
        </mo> 
        <msub> 
         <mi>
           s 
         </mi> 
         <mi>
           n 
         </mi> 
        </msub> 
       </mrow> 
       <mo>
         ) 
       </mo> 
      </mrow> 
     </mrow> 
    </math>. The most commonly used measures are the posterior mode or the posterior mean. By considering one or the other of these measures, we can derive the two interpretations of the hyperparameters of 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <mi>
        π 
      </mi> 
      <mrow> 
       <mo>
         ( 
       </mo> 
       <mi>
         θ 
       </mi> 
       <mo>
         ) 
       </mo> 
      </mrow> 
     </mrow> 
    </math> mentioned above.</p>
  </sec><sec id="s3">
   <title>3. Interpretation of the Hyperparameters of the Beta Prior Distribution</title>
   <p>Let us start by considering the posterior mode as a Bayesian estimate of 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mi>
       θ 
     </mi> 
    </math>,</p>
   <p>
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mtable> 
      <mtr> 
       <mtd> 
        <mi>
          M 
        </mi> 
        <mi>
          o 
        </mi> 
        <mi>
          d 
        </mi> 
        <mi>
          e 
        </mi> 
        <mrow> 
         <mo>
           ( 
         </mo> 
         <mrow> 
          <mi>
            θ 
          </mi> 
          <mo>
            | 
          </mo> 
          <msub> 
           <mi>
             s 
           </mi> 
           <mi>
             n 
           </mi> 
          </msub> 
         </mrow> 
         <mo>
           ) 
         </mo> 
        </mrow> 
        <mo>
          = 
        </mo> 
        <mfrac> 
         <mrow> 
          <mi>
            α 
          </mi> 
          <mo>
            + 
          </mo> 
          <msub> 
           <mi>
             s 
           </mi> 
           <mi>
             n 
           </mi> 
          </msub> 
          <mo>
            − 
          </mo> 
          <mn>
            1 
          </mn> 
         </mrow> 
         <mrow> 
          <mi>
            α 
          </mi> 
          <mo>
            + 
          </mo> 
          <mi>
            β 
          </mi> 
          <mo>
            + 
          </mo> 
          <mi>
            n 
          </mi> 
          <mo>
            − 
          </mo> 
          <mn>
            2 
          </mn> 
         </mrow> 
        </mfrac> 
       </mtd> 
      </mtr> 
      <mtr> 
       <mtd> 
        <mo>
          = 
        </mo> 
        <mfrac> 
         <mrow> 
          <mi>
            α 
          </mi> 
          <mo>
            − 
          </mo> 
          <mn>
            1 
          </mn> 
         </mrow> 
         <mrow> 
          <mi>
            α 
          </mi> 
          <mo>
            + 
          </mo> 
          <mi>
            β 
          </mi> 
          <mo>
            − 
          </mo> 
          <mn>
            2 
          </mn> 
          <mo>
            + 
          </mo> 
          <mi>
            n 
          </mi> 
         </mrow> 
        </mfrac> 
        <mo>
          + 
        </mo> 
        <mfrac> 
         <mrow> 
          <msub> 
           <mi>
             s 
           </mi> 
           <mi>
             n 
           </mi> 
          </msub> 
         </mrow> 
         <mrow> 
          <mi>
            α 
          </mi> 
          <mo>
            + 
          </mo> 
          <mi>
            β 
          </mi> 
          <mo>
            − 
          </mo> 
          <mn>
            2 
          </mn> 
          <mo>
            + 
          </mo> 
          <mi>
            n 
          </mi> 
         </mrow> 
        </mfrac> 
        <mo>
          . 
        </mo> 
       </mtd> 
      </mtr> 
     </mtable> 
    </math>(1)</p>
   <p>By multiplying the first term of (1) by 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <mfrac> 
       <mrow> 
        <mi>
          α 
        </mi> 
        <mo>
          + 
        </mo> 
        <mi>
          β 
        </mi> 
        <mo>
          − 
        </mo> 
        <mn>
          2 
        </mn> 
       </mrow> 
       <mrow> 
        <mi>
          α 
        </mi> 
        <mo>
          + 
        </mo> 
        <mi>
          β 
        </mi> 
        <mo>
          − 
        </mo> 
        <mn>
          2 
        </mn> 
       </mrow> 
      </mfrac> 
     </mrow> 
    </math> and by making the substitution 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <msub> 
       <mi>
         s 
       </mi> 
       <mi>
         n 
       </mi> 
      </msub> 
      <mo>
        = 
      </mo> 
      <mi>
        n 
      </mi> 
      <msub> 
       <mover accent="true"> 
        <mi>
          θ 
        </mi> 
        <mo>
          ^ 
        </mo> 
       </mover> 
       <mrow> 
        <mi>
          M 
        </mi> 
        <mi>
          L 
        </mi> 
       </mrow> 
      </msub> 
     </mrow> 
    </math> in the second term, we obtain that</p>
   <p>
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mtable> 
      <mtr> 
       <mtd> 
        <mi>
          M 
        </mi> 
        <mi>
          o 
        </mi> 
        <mi>
          d 
        </mi> 
        <mi>
          e 
        </mi> 
        <mrow> 
         <mo>
           ( 
         </mo> 
         <mrow> 
          <mi>
            θ 
          </mi> 
          <mo>
            | 
          </mo> 
          <msub> 
           <mi>
             s 
           </mi> 
           <mi>
             n 
           </mi> 
          </msub> 
         </mrow> 
         <mo>
           ) 
         </mo> 
        </mrow> 
        <mo>
          = 
        </mo> 
        <mfrac> 
         <mrow> 
          <mi>
            α 
          </mi> 
          <mo>
            + 
          </mo> 
          <mi>
            β 
          </mi> 
          <mo>
            − 
          </mo> 
          <mn>
            2 
          </mn> 
         </mrow> 
         <mrow> 
          <mi>
            α 
          </mi> 
          <mo>
            + 
          </mo> 
          <mi>
            β 
          </mi> 
          <mo>
            − 
          </mo> 
          <mn>
            2 
          </mn> 
          <mo>
            + 
          </mo> 
          <mi>
            n 
          </mi> 
         </mrow> 
        </mfrac> 
        <mi>
          M 
        </mi> 
        <mi>
          o 
        </mi> 
        <mi>
          d 
        </mi> 
        <mi>
          e 
        </mi> 
        <mrow> 
         <mo>
           ( 
         </mo> 
         <mi>
           θ 
         </mi> 
         <mo>
           ) 
         </mo> 
        </mrow> 
        <mo>
          + 
        </mo> 
        <mfrac> 
         <mi>
           n 
         </mi> 
         <mrow> 
          <mi>
            α 
          </mi> 
          <mo>
            + 
          </mo> 
          <mi>
            β 
          </mi> 
          <mo>
            − 
          </mo> 
          <mn>
            2 
          </mn> 
          <mo>
            + 
          </mo> 
          <mi>
            n 
          </mi> 
         </mrow> 
        </mfrac> 
        <msub> 
         <mover accent="true"> 
          <mi>
            θ 
          </mi> 
          <mo>
            ^ 
          </mo> 
         </mover> 
         <mrow> 
          <mi>
            M 
          </mi> 
          <mi>
            L 
          </mi> 
         </mrow> 
        </msub> 
       </mtd> 
      </mtr> 
      <mtr> 
       <mtd> 
        <mo>
          = 
        </mo> 
        <mfrac> 
         <mrow> 
          <msubsup> 
           <mi>
             n 
           </mi> 
           <mn>
             0 
           </mn> 
           <mi>
             M 
           </mi> 
          </msubsup> 
         </mrow> 
         <mrow> 
          <msubsup> 
           <mi>
             n 
           </mi> 
           <mn>
             0 
           </mn> 
           <mi>
             M 
           </mi> 
          </msubsup> 
          <mo>
            + 
          </mo> 
          <mi>
            n 
          </mi> 
         </mrow> 
        </mfrac> 
        <mi>
          M 
        </mi> 
        <mi>
          o 
        </mi> 
        <mi>
          d 
        </mi> 
        <mi>
          e 
        </mi> 
        <mrow> 
         <mo>
           ( 
         </mo> 
         <mi>
           θ 
         </mi> 
         <mo>
           ) 
         </mo> 
        </mrow> 
        <mo>
          + 
        </mo> 
        <mfrac> 
         <mi>
           n 
         </mi> 
         <mrow> 
          <msubsup> 
           <mi>
             n 
           </mi> 
           <mn>
             0 
           </mn> 
           <mi>
             M 
           </mi> 
          </msubsup> 
          <mo>
            + 
          </mo> 
          <mi>
            n 
          </mi> 
         </mrow> 
        </mfrac> 
        <msub> 
         <mover accent="true"> 
          <mi>
            θ 
          </mi> 
          <mo>
            ^ 
          </mo> 
         </mover> 
         <mrow> 
          <mi>
            M 
          </mi> 
          <mi>
            L 
          </mi> 
         </mrow> 
        </msub> 
        <mo>
          , 
        </mo> 
       </mtd> 
      </mtr> 
     </mtable> 
    </math></p>
   <p>where 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <msubsup> 
       <mi>
         n 
       </mi> 
       <mn>
         0 
       </mn> 
       <mi>
         M 
       </mi> 
      </msubsup> 
      <mo>
        = 
      </mo> 
      <mi>
        α 
      </mi> 
      <mo>
        + 
      </mo> 
      <mi>
        β 
      </mi> 
      <mo>
        − 
      </mo> 
      <mn>
        2 
      </mn> 
     </mrow> 
    </math>. In practice, the mode of the posterior distribution, which represents the most plausible value a posteriori, is a weighted average of the prior mode and the sample estimate of 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mi>
       θ 
     </mi> 
    </math> based on the observed data. This result clearly shows how the beta posterior distribution combines prior beliefs about 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mi>
       θ 
     </mi> 
    </math> with observed data and turns out to be an updated probability distribution. The weights assigned to 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <msub> 
       <mover accent="true"> 
        <mi>
          θ 
        </mi> 
        <mo>
          ^ 
        </mo> 
       </mover> 
       <mrow> 
        <mi>
          M 
        </mi> 
        <mi>
          L 
        </mi> 
       </mrow> 
      </msub> 
     </mrow> 
    </math> and to the prior mode are, respectively, the sample size of the experiment 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mi>
       n 
     </mi> 
    </math> and 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <msubsup> 
       <mi>
         n 
       </mi> 
       <mn>
         0 
       </mn> 
       <mi>
         M 
       </mi> 
      </msubsup> 
      <mo>
        = 
      </mo> 
      <mi>
        α 
      </mi> 
      <mo>
        + 
      </mo> 
      <mi>
        β 
      </mi> 
      <mo>
        − 
      </mo> 
      <mn>
        2 
      </mn> 
     </mrow> 
    </math>, that can be interpreted as the prior sample size. The result, in fact, also suggests that the information provided by the beta prior density is equivalent to that of a virtual binomial experiment based on 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <mi>
        α 
      </mi> 
      <mo>
        + 
      </mo> 
      <mi>
        β 
      </mi> 
      <mo>
        − 
      </mo> 
      <mn>
        2 
      </mn> 
     </mrow> 
    </math> observations, with 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <mi>
        α 
      </mi> 
      <mo>
        − 
      </mo> 
      <mn>
        1 
      </mn> 
     </mrow> 
    </math> successes and 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <mi>
        β 
      </mi> 
      <mo>
        − 
      </mo> 
      <mn>
        1 
      </mn> 
     </mrow> 
    </math> failures. The correspondence between the observed number of successes in the current experiment and the virtual number of prior successes is evident from (1).</p>
   <p>A similar, but slightly different, interpretation of the hyperparameters of the beta prior arises if we consider as Bayesian estimate of 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mi>
       θ 
     </mi> 
    </math> the posterior mean. In this case, we have that</p>
   <p>
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <mi>
        E 
      </mi> 
      <mrow> 
       <mo>
         ( 
       </mo> 
       <mrow> 
        <mi>
          θ 
        </mi> 
        <mo>
          | 
        </mo> 
        <msub> 
         <mi>
           s 
         </mi> 
         <mi>
           n 
         </mi> 
        </msub> 
       </mrow> 
       <mo>
         ) 
       </mo> 
      </mrow> 
      <mo>
        = 
      </mo> 
      <mfrac> 
       <mrow> 
        <mi>
          α 
        </mi> 
        <mo>
          + 
        </mo> 
        <msub> 
         <mi>
           s 
         </mi> 
         <mi>
           n 
         </mi> 
        </msub> 
       </mrow> 
       <mrow> 
        <mi>
          α 
        </mi> 
        <mo>
          + 
        </mo> 
        <mi>
          β 
        </mi> 
        <mo>
          + 
        </mo> 
        <mi>
          n 
        </mi> 
       </mrow> 
      </mfrac> 
      <mo>
        = 
      </mo> 
      <mfrac> 
       <mi>
         α 
       </mi> 
       <mrow> 
        <mi>
          α 
        </mi> 
        <mo>
          + 
        </mo> 
        <mi>
          β 
        </mi> 
        <mo>
          + 
        </mo> 
        <mi>
          n 
        </mi> 
       </mrow> 
      </mfrac> 
      <mo>
        + 
      </mo> 
      <mfrac> 
       <mrow> 
        <msub> 
         <mi>
           s 
         </mi> 
         <mi>
           n 
         </mi> 
        </msub> 
       </mrow> 
       <mrow> 
        <mi>
          α 
        </mi> 
        <mo>
          + 
        </mo> 
        <mi>
          β 
        </mi> 
        <mo>
          + 
        </mo> 
        <mi>
          n 
        </mi> 
       </mrow> 
      </mfrac> 
      <mo>
        . 
      </mo> 
     </mrow> 
    </math></p>
   <p>With computations analogous to those performed for the posterior mode, we obtain that</p>
   <p>
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mtable> 
      <mtr> 
       <mtd> 
        <mi>
          E 
        </mi> 
        <mrow> 
         <mo>
           ( 
         </mo> 
         <mrow> 
          <mi>
            θ 
          </mi> 
          <mo>
            | 
          </mo> 
          <msub> 
           <mi>
             s 
           </mi> 
           <mi>
             n 
           </mi> 
          </msub> 
         </mrow> 
         <mo>
           ) 
         </mo> 
        </mrow> 
        <mo>
          = 
        </mo> 
        <mfrac> 
         <mrow> 
          <mi>
            α 
          </mi> 
          <mo>
            + 
          </mo> 
          <mi>
            β 
          </mi> 
         </mrow> 
         <mrow> 
          <mi>
            α 
          </mi> 
          <mo>
            + 
          </mo> 
          <mi>
            β 
          </mi> 
          <mo>
            + 
          </mo> 
          <mi>
            n 
          </mi> 
         </mrow> 
        </mfrac> 
        <mi>
          E 
        </mi> 
        <mrow> 
         <mo>
           ( 
         </mo> 
         <mi>
           θ 
         </mi> 
         <mo>
           ) 
         </mo> 
        </mrow> 
        <mo>
          + 
        </mo> 
        <mfrac> 
         <mi>
           n 
         </mi> 
         <mrow> 
          <mi>
            α 
          </mi> 
          <mo>
            + 
          </mo> 
          <mi>
            β 
          </mi> 
          <mo>
            + 
          </mo> 
          <mi>
            n 
          </mi> 
         </mrow> 
        </mfrac> 
        <msub> 
         <mover accent="true"> 
          <mi>
            θ 
          </mi> 
          <mo>
            ^ 
          </mo> 
         </mover> 
         <mrow> 
          <mi>
            M 
          </mi> 
          <mi>
            L 
          </mi> 
         </mrow> 
        </msub> 
       </mtd> 
      </mtr> 
      <mtr> 
       <mtd> 
        <mo>
          = 
        </mo> 
        <mfrac> 
         <mrow> 
          <msubsup> 
           <mi>
             n 
           </mi> 
           <mn>
             0 
           </mn> 
           <mi>
             E 
           </mi> 
          </msubsup> 
         </mrow> 
         <mrow> 
          <msubsup> 
           <mi>
             n 
           </mi> 
           <mn>
             0 
           </mn> 
           <mi>
             E 
           </mi> 
          </msubsup> 
          <mo>
            + 
          </mo> 
          <mi>
            n 
          </mi> 
         </mrow> 
        </mfrac> 
        <mi>
          E 
        </mi> 
        <mrow> 
         <mo>
           ( 
         </mo> 
         <mi>
           θ 
         </mi> 
         <mo>
           ) 
         </mo> 
        </mrow> 
        <mo>
          + 
        </mo> 
        <mfrac> 
         <mi>
           n 
         </mi> 
         <mrow> 
          <msubsup> 
           <mi>
             n 
           </mi> 
           <mn>
             0 
           </mn> 
           <mi>
             E 
           </mi> 
          </msubsup> 
          <mo>
            + 
          </mo> 
          <mi>
            n 
          </mi> 
         </mrow> 
        </mfrac> 
        <mo> 
        </mo> 
        <msub> 
         <mover accent="true"> 
          <mi>
            θ 
          </mi> 
          <mo>
            ^ 
          </mo> 
         </mover> 
         <mrow> 
          <mi>
            M 
          </mi> 
          <mi>
            L 
          </mi> 
         </mrow> 
        </msub> 
        <mo>
          , 
        </mo> 
       </mtd> 
      </mtr> 
     </mtable> 
    </math></p>
   <p>where 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <msubsup> 
       <mi>
         n 
       </mi> 
       <mn>
         0 
       </mn> 
       <mi>
         E 
       </mi> 
      </msubsup> 
      <mo>
        = 
      </mo> 
      <mi>
        α 
      </mi> 
      <mo>
        + 
      </mo> 
      <mi>
        β 
      </mi> 
     </mrow> 
    </math>. Thus, the mean of the posterior distribution turns out to be a weighted average of the prior mean and the ML estimate of 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mi>
       θ 
     </mi> 
    </math>. The contribution of 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <msub> 
       <mover accent="true"> 
        <mi>
          θ 
        </mi> 
        <mo>
          ^ 
        </mo> 
       </mover> 
       <mrow> 
        <mi>
          M 
        </mi> 
        <mi>
          L 
        </mi> 
       </mrow> 
      </msub> 
     </mrow> 
    </math> is again the sample size 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mi>
       n 
     </mi> 
    </math>, while the weight of the prior mean is 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <msubsup> 
       <mi>
         n 
       </mi> 
       <mn>
         0 
       </mn> 
       <mi>
         E 
       </mi> 
      </msubsup> 
      <mo>
        = 
      </mo> 
      <mi>
        α 
      </mi> 
      <mo>
        + 
      </mo> 
      <mi>
        β 
      </mi> 
     </mrow> 
    </math>, that plays the role of the prior sample size. Hence, in this case, the beta prior distribution corresponds to adding 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mi>
       α 
     </mi> 
    </math> prior successes and 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mi>
       β 
     </mi> 
    </math> prior failures.</p>
   <p>Both the interpretations of the beta prior density are equally legitimate based on the aforementioned arguments. Note that the non-informative prior distribution corresponding to a sample with no observations is the uniform distribution 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <mi>
        B 
      </mi> 
      <mi>
        e 
      </mi> 
      <mi>
        t 
      </mi> 
      <mi>
        a 
      </mi> 
      <mrow> 
       <mo>
         ( 
       </mo> 
       <mrow> 
        <mn>
          1 
        </mn> 
        <mo>
          , 
        </mo> 
        <mn>
          1 
        </mn> 
       </mrow> 
       <mo>
         ) 
       </mo> 
      </mrow> 
     </mrow> 
    </math> under the interpretation based on the posterior mode and the improper Haldane’s distribution 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <mi>
        B 
      </mi> 
      <mi>
        e 
      </mi> 
      <mi>
        t 
      </mi> 
      <mi>
        a 
      </mi> 
      <mrow> 
       <mo>
         ( 
       </mo> 
       <mrow> 
        <mn>
          0 
        </mn> 
        <mo>
          , 
        </mo> 
        <mn>
          0 
        </mn> 
       </mrow> 
       <mo>
         ) 
       </mo> 
      </mrow> 
     </mrow> 
    </math> under the interpretation based on the posterior mean.</p>
  </sec><sec id="s4">
   <title>4. Elicitation of the Prior Hyperparameters</title>
   <p>The two interpretations of the hyperparameters of the prior 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <mi>
        π 
      </mi> 
      <mrow> 
       <mo>
         ( 
       </mo> 
       <mi>
         θ 
       </mi> 
       <mo>
         ) 
       </mo> 
      </mrow> 
      <mo>
        = 
      </mo> 
      <mi>
        B 
      </mi> 
      <mi>
        e 
      </mi> 
      <mi>
        t 
      </mi> 
      <mi>
        a 
      </mi> 
      <mrow> 
       <mo>
         ( 
       </mo> 
       <mrow> 
        <mi>
          θ 
        </mi> 
        <mo>
          ; 
        </mo> 
        <mi>
          α 
        </mi> 
        <mo>
          , 
        </mo> 
        <mi>
          β 
        </mi> 
       </mrow> 
       <mo>
         ) 
       </mo> 
      </mrow> 
     </mrow> 
    </math> as extra data can be exploited to construct an informative prior distribution for 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mi>
       θ 
     </mi> 
    </math> based on pre-experimental information.</p>
   <p>The idea is to express the hyperparameters in terms of 1) a measure of central tendency of the prior and 2) the prior sample size. More specifically, if we opt for the prior mode 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <msubsup> 
       <mi>
         θ 
       </mi> 
       <mn>
         0 
       </mn> 
       <mi>
         M 
       </mi> 
      </msubsup> 
     </mrow> 
    </math>, we need to consider the following system of equations</p>
   <p>
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <mrow> 
       <mo>
         { 
       </mo> 
       <mrow> 
        <mtable columnalign="left"> 
         <mtr columnalign="left"> 
          <mtd columnalign="left"> 
           <mrow> 
            <msubsup> 
             <mi>
               θ 
             </mi> 
             <mn>
               0 
             </mn> 
             <mi>
               M 
             </mi> 
            </msubsup> 
            <mo>
              = 
            </mo> 
            <mfrac> 
             <mrow> 
              <mi>
                α 
              </mi> 
              <mo>
                − 
              </mo> 
              <mn>
                1 
              </mn> 
             </mrow> 
             <mrow> 
              <mi>
                α 
              </mi> 
              <mo>
                + 
              </mo> 
              <mi>
                β 
              </mi> 
              <mo>
                − 
              </mo> 
              <mn>
                2 
              </mn> 
             </mrow> 
            </mfrac> 
           </mrow> 
          </mtd> 
         </mtr> 
         <mtr columnalign="left"> 
          <mtd columnalign="left"> 
           <mrow> 
            <msubsup> 
             <mi>
               n 
             </mi> 
             <mn>
               0 
             </mn> 
             <mi>
               M 
             </mi> 
            </msubsup> 
            <mo>
              = 
            </mo> 
            <mi>
              α 
            </mi> 
            <mo>
              + 
            </mo> 
            <mi>
              β 
            </mi> 
            <mo>
              − 
            </mo> 
            <mn>
              2 
            </mn> 
           </mrow> 
          </mtd> 
         </mtr> 
        </mtable> 
       </mrow> 
      </mrow> 
      <mo>
        , 
      </mo> 
     </mrow> 
    </math></p>
   <p>obtaining the solutions</p>
   <p>
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <mi>
        α 
      </mi> 
      <mo>
        = 
      </mo> 
      <msubsup> 
       <mi>
         n 
       </mi> 
       <mn>
         0 
       </mn> 
       <mi>
         M 
       </mi> 
      </msubsup> 
      <msubsup> 
       <mi>
         θ 
       </mi> 
       <mn>
         0 
       </mn> 
       <mi>
         M 
       </mi> 
      </msubsup> 
      <mo>
        + 
      </mo> 
      <mn>
        1 
      </mn> 
      <mtext>
          
      </mtext> 
      <mtext>
          
      </mtext> 
      <mtext>
        and 
      </mtext> 
      <mtext>
          
      </mtext> 
      <mtext>
          
      </mtext> 
      <mi>
        β 
      </mi> 
      <mo>
        = 
      </mo> 
      <msubsup> 
       <mi>
         n 
       </mi> 
       <mn>
         0 
       </mn> 
       <mi>
         M 
       </mi> 
      </msubsup> 
      <mrow> 
       <mo>
         ( 
       </mo> 
       <mrow> 
        <mn>
          1 
        </mn> 
        <mo>
          − 
        </mo> 
        <msubsup> 
         <mi>
           θ 
         </mi> 
         <mn>
           0 
         </mn> 
         <mi>
           M 
         </mi> 
        </msubsup> 
       </mrow> 
       <mo>
         ) 
       </mo> 
      </mrow> 
      <mo>
        + 
      </mo> 
      <mn>
        1. 
      </mn> 
     </mrow> 
    </math>(2)</p>
   <p>Thus, this choice of the hyperparameters ensures that the mode of the beta prior is 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <msubsup> 
       <mi>
         θ 
       </mi> 
       <mn>
         0 
       </mn> 
       <mi>
         M 
       </mi> 
      </msubsup> 
     </mrow> 
    </math>, that can be selected as the value of the parameter considered the most plausible according to the prior information. Then, we can regulate the concentration of 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <mi>
        π 
      </mi> 
      <mrow> 
       <mo>
         ( 
       </mo> 
       <mi>
         θ 
       </mi> 
       <mo>
         ) 
       </mo> 
      </mrow> 
     </mrow> 
    </math> around 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <msubsup> 
       <mi>
         θ 
       </mi> 
       <mn>
         0 
       </mn> 
       <mi>
         M 
       </mi> 
      </msubsup> 
     </mrow> 
    </math> through the selection of the prior sample size 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <msubsup> 
       <mi>
         n 
       </mi> 
       <mn>
         0 
       </mn> 
       <mi>
         M 
       </mi> 
      </msubsup> 
     </mrow> 
    </math>. This quantity, in fact, represents the number of virtual observations to which the prior information is considered equivalent and, therefore, the larger 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <msubsup> 
       <mi>
         n 
       </mi> 
       <mn>
         0 
       </mn> 
       <mi>
         M 
       </mi> 
      </msubsup> 
     </mrow> 
    </math>, the more concentrated the prior distribution. This can also be easily proved by noting that the variance of the beta prior distribution with hyperparameters provided in (2), that is</p>
   <p>
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mtable> 
      <mtr> 
       <mtd> 
        <mi>
          V 
        </mi> 
        <mi>
          a 
        </mi> 
        <mi>
          r 
        </mi> 
        <mrow> 
         <mo>
           ( 
         </mo> 
         <mi>
           θ 
         </mi> 
         <mo>
           ) 
         </mo> 
        </mrow> 
        <mo>
          = 
        </mo> 
        <mfrac> 
         <mrow> 
          <mi>
            α 
          </mi> 
          <mi>
            β 
          </mi> 
         </mrow> 
         <mrow> 
          <msup> 
           <mrow> 
            <mrow> 
             <mo>
               ( 
             </mo> 
             <mrow> 
              <mi>
                α 
              </mi> 
              <mo>
                + 
              </mo> 
              <mi>
                β 
              </mi> 
             </mrow> 
             <mo>
               ) 
             </mo> 
            </mrow> 
           </mrow> 
           <mn>
             2 
           </mn> 
          </msup> 
          <mrow> 
           <mo>
             ( 
           </mo> 
           <mrow> 
            <mi>
              α 
            </mi> 
            <mo>
              + 
            </mo> 
            <mi>
              β 
            </mi> 
            <mo>
              + 
            </mo> 
            <mn>
              1 
            </mn> 
           </mrow> 
           <mo>
             ) 
           </mo> 
          </mrow> 
         </mrow> 
        </mfrac> 
       </mtd> 
      </mtr> 
      <mtr> 
       <mtd> 
        <mo>
          = 
        </mo> 
        <mfrac> 
         <mrow> 
          <mrow> 
           <mo>
             ( 
           </mo> 
           <mrow> 
            <msubsup> 
             <mi>
               n 
             </mi> 
             <mn>
               0 
             </mn> 
             <mi>
               M 
             </mi> 
            </msubsup> 
            <msubsup> 
             <mi>
               θ 
             </mi> 
             <mn>
               0 
             </mn> 
             <mi>
               M 
             </mi> 
            </msubsup> 
            <mo>
              + 
            </mo> 
            <mn>
              1 
            </mn> 
           </mrow> 
           <mo>
             ) 
           </mo> 
          </mrow> 
          <mrow> 
           <mo>
             ( 
           </mo> 
           <mrow> 
            <msubsup> 
             <mi>
               n 
             </mi> 
             <mn>
               0 
             </mn> 
             <mi>
               M 
             </mi> 
            </msubsup> 
            <mo>
              − 
            </mo> 
            <msubsup> 
             <mi>
               n 
             </mi> 
             <mn>
               0 
             </mn> 
             <mi>
               M 
             </mi> 
            </msubsup> 
            <msubsup> 
             <mi>
               θ 
             </mi> 
             <mn>
               0 
             </mn> 
             <mi>
               M 
             </mi> 
            </msubsup> 
            <mo>
              + 
            </mo> 
            <mn>
              1 
            </mn> 
           </mrow> 
           <mo>
             ) 
           </mo> 
          </mrow> 
         </mrow> 
         <mrow> 
          <msup> 
           <mrow> 
            <mrow> 
             <mo>
               ( 
             </mo> 
             <mrow> 
              <msubsup> 
               <mi>
                 n 
               </mi> 
               <mn>
                 0 
               </mn> 
               <mi>
                 M 
               </mi> 
              </msubsup> 
              <mo>
                + 
              </mo> 
              <mn>
                2 
              </mn> 
             </mrow> 
             <mo>
               ) 
             </mo> 
            </mrow> 
           </mrow> 
           <mn>
             2 
           </mn> 
          </msup> 
          <mrow> 
           <mo>
             ( 
           </mo> 
           <mrow> 
            <msubsup> 
             <mi>
               n 
             </mi> 
             <mn>
               0 
             </mn> 
             <mi>
               M 
             </mi> 
            </msubsup> 
            <mo>
              + 
            </mo> 
            <mn>
              3 
            </mn> 
           </mrow> 
           <mo>
             ) 
           </mo> 
          </mrow> 
         </mrow> 
        </mfrac> 
        <mo>
          , 
        </mo> 
       </mtd> 
      </mtr> 
     </mtable> 
    </math></p>
   <p>decreases as 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <msubsup> 
       <mi>
         n 
       </mi> 
       <mn>
         0 
       </mn> 
       <mi>
         M 
       </mi> 
      </msubsup> 
     </mrow> 
    </math> increases. Moreover, as 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <msubsup> 
       <mi>
         n 
       </mi> 
       <mn>
         0 
       </mn> 
       <mi>
         M 
       </mi> 
      </msubsup> 
      <mo>
        → 
      </mo> 
      <mi>
        ∞ 
      </mi> 
     </mrow> 
    </math>, the limit of the variance is 0 and, thus, if 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <msubsup> 
       <mi>
         n 
       </mi> 
       <mn>
         0 
       </mn> 
       <mi>
         M 
       </mi> 
      </msubsup> 
     </mrow> 
    </math> tends to infinity the beta prior density tends to a degenerate distribution at 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <msubsup> 
       <mi>
         θ 
       </mi> 
       <mn>
         0 
       </mn> 
       <mi>
         M 
       </mi> 
      </msubsup> 
     </mrow> 
    </math>. This elicitation procedure has been exploited, for instance, by <xref ref-type="bibr" rid="scirp.145348-9">
     [9]
    </xref> <xref ref-type="bibr" rid="scirp.145348-10">
     [10]
    </xref> at the design stage of a clinical trial and it is often applied by setting the prior sample size to 1, in order to obtain a weakly informative prior <xref ref-type="bibr" rid="scirp.145348-11">
     [11]
    </xref> <xref ref-type="bibr" rid="scirp.145348-12">
     [12]
    </xref>.</p>
   <p>Analogously, if we choose the prior mean 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <msubsup> 
       <mi>
         θ 
       </mi> 
       <mn>
         0 
       </mn> 
       <mi>
         E 
       </mi> 
      </msubsup> 
     </mrow> 
    </math> as measure of central tendency, by solving the following system of equations</p>
   <p>
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <mrow> 
       <mo>
         { 
       </mo> 
       <mrow> 
        <mtable columnalign="left"> 
         <mtr columnalign="left"> 
          <mtd columnalign="left"> 
           <mrow> 
            <msubsup> 
             <mi>
               θ 
             </mi> 
             <mn>
               0 
             </mn> 
             <mi>
               E 
             </mi> 
            </msubsup> 
            <mo>
              = 
            </mo> 
            <mfrac> 
             <mi>
               α 
             </mi> 
             <mrow> 
              <mi>
                α 
              </mi> 
              <mo>
                + 
              </mo> 
              <mi>
                β 
              </mi> 
             </mrow> 
            </mfrac> 
           </mrow> 
          </mtd> 
         </mtr> 
         <mtr columnalign="left"> 
          <mtd columnalign="left"> 
           <mrow> 
            <msubsup> 
             <mi>
               n 
             </mi> 
             <mn>
               0 
             </mn> 
             <mi>
               E 
             </mi> 
            </msubsup> 
            <mo>
              = 
            </mo> 
            <mi>
              α 
            </mi> 
            <mo>
              + 
            </mo> 
            <mi>
              β 
            </mi> 
           </mrow> 
          </mtd> 
         </mtr> 
        </mtable> 
       </mrow> 
      </mrow> 
      <mo>
        , 
      </mo> 
     </mrow> 
    </math></p>
   <p>we obtain that</p>
   <p>
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <mi>
        α 
      </mi> 
      <mo>
        = 
      </mo> 
      <msubsup> 
       <mi>
         n 
       </mi> 
       <mn>
         0 
       </mn> 
       <mi>
         E 
       </mi> 
      </msubsup> 
      <msubsup> 
       <mi>
         θ 
       </mi> 
       <mn>
         0 
       </mn> 
       <mi>
         E 
       </mi> 
      </msubsup> 
      <mtext>
          
      </mtext> 
      <mtext>
          
      </mtext> 
      <mtext>
        and 
      </mtext> 
      <mtext>
          
      </mtext> 
      <mtext>
          
      </mtext> 
      <mi>
        β 
      </mi> 
      <mo>
        = 
      </mo> 
      <msubsup> 
       <mi>
         n 
       </mi> 
       <mn>
         0 
       </mn> 
       <mi>
         E 
       </mi> 
      </msubsup> 
      <mrow> 
       <mo>
         ( 
       </mo> 
       <mrow> 
        <mn>
          1 
        </mn> 
        <mo>
          − 
        </mo> 
        <msubsup> 
         <mi>
           θ 
         </mi> 
         <mn>
           0 
         </mn> 
         <mi>
           E 
         </mi> 
        </msubsup> 
       </mrow> 
       <mo>
         ) 
       </mo> 
      </mrow> 
     </mrow> 
    </math>(3)</p>
   <p>are the hyperparameters of a beta prior density with mean equal to 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <msubsup> 
       <mi>
         θ 
       </mi> 
       <mn>
         0 
       </mn> 
       <mi>
         E 
       </mi> 
      </msubsup> 
     </mrow> 
    </math> and prior sample size 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <msubsup> 
       <mi>
         n 
       </mi> 
       <mn>
         0 
       </mn> 
       <mi>
         E 
       </mi> 
      </msubsup> 
     </mrow> 
    </math>. Also in this case, as 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <msubsup> 
       <mi>
         n 
       </mi> 
       <mn>
         0 
       </mn> 
       <mi>
         E 
       </mi> 
      </msubsup> 
     </mrow> 
    </math> increases, the variability of the beta prior decreases and the distribution turns out to be more concentrated. In the limiting case, when 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <msubsup> 
       <mi>
         n 
       </mi> 
       <mn>
         0 
       </mn> 
       <mi>
         E 
       </mi> 
      </msubsup> 
      <mo>
        → 
      </mo> 
      <mi>
        ∞ 
      </mi> 
     </mrow> 
    </math>, 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <mi>
        π 
      </mi> 
      <mrow> 
       <mo>
         ( 
       </mo> 
       <mi>
         θ 
       </mi> 
       <mo>
         ) 
       </mo> 
      </mrow> 
     </mrow> 
    </math> corresponds to the probability distribution that assigns all the probability mass to 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <msubsup> 
       <mi>
         θ 
       </mi> 
       <mn>
         0 
       </mn> 
       <mi>
         E 
       </mi> 
      </msubsup> 
     </mrow> 
    </math>.</p>
   <p>In <xref ref-type="fig" rid="fig1">
     Figure 1
    </xref>, we compare the beta prior distributions obtained by specifying the prior mode and the prior mean, assuming equal values for these measures of central tendency and for the prior sample size. As expected, the prior densities tend to coincide as the central tendency approaches 0.5 and as 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <msubsup> 
       <mi>
         n 
       </mi> 
       <mn>
         0 
       </mn> 
       <mi>
         M 
       </mi> 
      </msubsup> 
      <mo>
        = 
      </mo> 
      <msubsup> 
       <mi>
         n 
       </mi> 
       <mn>
         0 
       </mn> 
       <mi>
         E 
       </mi> 
      </msubsup> 
     </mrow> 
    </math> increases.</p>
   <fig id="fig1" position="float">
    <label>Figure 1</label>
    <caption>
     <title>
      <xref ref-type="bibr" rid="scirp.145348-"></xref>Figure 1. Comparison of beta prior distributions for 

      <math xmlns="http://www.w3.org/1998/Math/MathML"> <mi>
        
  θ
 
       </mi>

      </math> when using the hyperparameters in (2) and (3) for different values of the measure of central tendency and the prior sample size, with 

      <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
  
        <msubsup> 
   
         <mi>
          
    θ
   
         </mi> 
   
         <mn>
          
    0
   
         </mn> 
   
         <mi>
          
    M
   
         </mi> 
  
        </msubsup> 
  
        <mo>
         
   =
  
        </mo>
  
        <msubsup> 
   
         <mi>
          
    θ
   
         </mi> 
   
         <mn>
          
    0
   
         </mn> 
   
         <mi>
          
    E
   
         </mi> 
  
        </msubsup> 
 
       </mrow>

      </math> and 

      <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
  
        <msubsup> 
   
         <mi>
          
    n
   
         </mi> 
   
         <mn>
          
    0
   
         </mn> 
   
         <mi>
          
    M
   
         </mi> 
  
        </msubsup> 
  
        <mo>
         
   =
  
        </mo>
  
        <msubsup> 
   
         <mi>
          
    n
   
         </mi> 
   
         <mn>
          
    0
   
         </mn> 
   
         <mi>
          
    E
   
         </mi> 
  
        </msubsup> 
 
       </mrow>

      </math>.</title>
    </caption>
    <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/2313240-rId182.jpeg?20250903025536" />
   </fig>
  </sec><sec id="s5">
   <title>5. A Shiny/R App to Elicit the Hyperparameters</title>
   <p>The elicitation procedures described above can be used to formalize the belief that it is highly plausible that 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mi>
       θ 
     </mi> 
    </math> belongs to a specific interval. To provide a user-friendly tool to easily implement the procedures, we developed a Shiny/R app available at <xref ref-type="bibr" rid="scirp.145348-https://vales.shinyapps.io/betapriors_app/">
     https://vales.shinyapps.io/betapriors_app/
    </xref>. The app allows to choose between the mode or the mean as prior measure of central tendency. Then, once a numeric value has been entered for this measure, the user can dynamically appreciate how the shape of the beta prior distribution changes according to the prior sample size value passed through a slider. Moreover, the lower and upper limits of an interval of interest can be provided and the prior probability assigned to the interval is highlighted and indicated in the plot of the prior density. Thus, the prior sample size can be selected according to the level of this prior probability we wish to achieve.</p>
   <sec id="s5_1">
    <title>5.1. Example 1</title>
    <p>Let us consider an example provided by Spiegelhalter et al. <xref ref-type="bibr" rid="scirp.145348-13">
      [13]
     </xref>, where the response rate of an experimental drug is supposed to lie between 0.2 and 0.6 on the basis of previous experience. The Authors translated this information into the beta prior of hyperparameters 9.2 and 13.8, by exploiting a normal approximation for the beta distribution of mean 0.4 and imposing a 95% of prior probability assigned to [0.2, 0.6]. As an alternative, we can exploit the Shiny/R App to set the hyperparameters as in (3) by fixing the prior mean equal to 0.4 and selecting the prior sample size 
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msubsup> 
        <mi>
          n 
        </mi> 
        <mn>
          0 
        </mn> 
        <mi>
          E 
        </mi> 
       </msubsup> 
      </mrow> 
     </math> through the slider in order to have a prior probability assigned to the interval of interest equal to 0.95 (see <xref ref-type="fig" rid="fig2">
      Figure 2
     </xref>). We obtain the prior density 
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <mi>
         π 
       </mi> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mi>
          θ 
        </mi> 
        <mo>
          ) 
        </mo> 
       </mrow> 
       <mo>
         = 
       </mo> 
       <mi>
         B 
       </mi> 
       <mi>
         e 
       </mi> 
       <mi>
         t 
       </mi> 
       <mi>
         a 
       </mi> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mrow> 
         <mi>
           θ 
         </mi> 
         <mo>
           ; 
         </mo> 
         <mn>
           8.6 
         </mn> 
         <mo>
           , 
         </mo> 
         <mn>
           12.9 
         </mn> 
        </mrow> 
        <mo>
          ) 
        </mo> 
       </mrow> 
      </mrow> 
     </math> with hyperparameters slightly different from the ones obtained with the procedure based on the use of a normal approximation, that actually provides a prior probability that 
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <mi>
         θ 
       </mi> 
       <mo>
         ∈ 
       </mo> 
       <mrow> 
        <mo>
          [ 
        </mo> 
        <mrow> 
         <mn>
           0.2 
         </mn> 
         <mo>
           , 
         </mo> 
         <mn>
           0.6 
         </mn> 
        </mrow> 
        <mo>
          ] 
        </mo> 
       </mrow> 
      </mrow> 
     </math> equal to 0.958.</p>
    <fig id="fig2" position="float">
     <label>Figure 2</label>
     <caption>
      <title>
       <xref ref-type="bibr" rid="scirp.145348-"></xref>Figure 2. Shiny app user interface to elicit a beta prior distribution with mean equal to 0.4 that assigns a 95% prior probabability to the interval [0.2, 0.6].</title>
     </caption>
     <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/2313240-rId198.jpeg?20250903025537" />
    </fig>
   </sec>
   <sec id="s5_2">
    <title>5.2. Example 2</title>
    <p>Let us assume that our prior knowledge suggests that the success probability 
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mi>
        θ 
      </mi> 
     </math> cannot take certain values or that we need to elicit a beta prior with support smaller than the parameter space [0, 1]. The latter case occurs, for instance, at the design stage of a one-sample experiment when a hybrid frequentist-Bayesian approach is used to determine the appropriate sample size. When the focus is on power analysis, the frequentist criterion selects the minimal sample size that guarantees a given power, for a fixed Type I error rate, conditional on the assumption that the true 
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mi>
        θ 
      </mi> 
     </math> is equal to a clinically relevant design value, 
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msup> 
        <mi>
          θ 
        </mi> 
        <mi>
          D 
        </mi> 
       </msup> 
      </mrow> 
     </math>, that belongs to the alternative hypothesis. To overcome local optimality, implied by the fixed design value, the hybrid approach assigns a prior distribution to 
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mi>
        θ 
      </mi> 
     </math>, typically called design prior distribution, to realize the assumption that the alternative hypothesis is true <xref ref-type="bibr" rid="scirp.145348-14">
      [14]
     </xref>. The sample size criteria is then based on the average of the traditional power over the design prior. For an exhaustive discussion about this topic the readers are referred to <xref ref-type="bibr" rid="scirp.145348-15">
      [15]
     </xref>.</p>
    <p>Specifically, let us focus on the hypotheses 
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msub> 
        <mi>
          H 
        </mi> 
        <mn>
          0 
        </mn> 
       </msub> 
       <mo>
         : 
       </mo> 
       <mi>
         θ 
       </mi> 
       <mo>
         ≤ 
       </mo> 
       <mn>
         0.3 
       </mn> 
      </mrow> 
     </math> and 
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msub> 
        <mi>
          H 
        </mi> 
        <mn>
          1 
        </mn> 
       </msub> 
       <mo>
         : 
       </mo> 
       <mi>
         θ 
       </mi> 
       <mo>
         &gt; 
       </mo> 
       <mn>
         0.3 
       </mn> 
      </mrow> 
     </math>. In order to apply the hybrid approach to determine the optimal sample size, we need to elicit a beta design prior for 
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mi>
        θ 
      </mi> 
     </math> that 1) assigns negligible probability to values of 
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mi>
        θ 
      </mi> 
     </math> outside the interval 
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mrow> 
         <mn>
           0.3 
         </mn> 
         <mo>
           , 
         </mo> 
         <mn>
           1 
         </mn> 
        </mrow> 
        <mo>
          ] 
        </mo> 
       </mrow> 
      </mrow> 
     </math> and 2) has mode equal to the design value that we would have set if we had used the classical approach. The Shiny/R app can be used to easily obtain such a prior density. Assuming that 
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msup> 
        <mi>
          θ 
        </mi> 
        <mi>
          D 
        </mi> 
       </msup> 
       <mo>
         = 
       </mo> 
       <mn>
         0.4 
       </mn> 
      </mrow> 
     </math>, a first way of proceeding consists in setting the prior mode equal to 0.4 and specifying the limits of the interval of interest equal to 0.3 and 1, respectively. Then, we use the</p>
    <fig id="fig3" position="float">
     <label>Figure 3</label>
     <caption>
      <title>
       <xref ref-type="bibr" rid="scirp.145348-"></xref>Figure 3. Shiny app user interface to elicit a beta prior distribution with mode equal to 0.4 that assigns a 999% prior probabability to the interval [0.3, 1].</title>
     </caption>
     <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/2313240-rId219.jpeg?20250903025538" />
    </fig>
    <fig id="fig4" position="float">
     <label>Figure 4</label>
     <caption>
      <title>
       <xref ref-type="bibr" rid="scirp.145348-"></xref>Figure 4. Shiny app user interface to elicit a beta prior distribution with mode equal to 0.4 that assigns a 95% prior probabability to the interval [0.35, 0.45].</title>
     </caption>
     <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/2313240-rId220.jpeg?20250903025538" />
    </fig>
    <p>slider to increase the prior sample size, 
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msubsup> 
        <mi>
          n 
        </mi> 
        <mn>
          0 
        </mn> 
        <mi>
          M 
        </mi> 
       </msubsup> 
      </mrow> 
     </math>, until the prior probability assigned to 
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mrow> 
         <mn>
           0.3 
         </mn> 
         <mo>
           , 
         </mo> 
         <mn>
           1 
         </mn> 
        </mrow> 
        <mo>
          ] 
        </mo> 
       </mrow> 
      </mrow> 
     </math> achieves the level 0.999. <xref ref-type="fig" rid="fig3">
      Figure 3
     </xref> shows that the prior obtained is 
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <mi>
         π 
       </mi> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mi>
          θ 
        </mi> 
        <mo>
          ) 
        </mo> 
       </mrow> 
       <mo>
         = 
       </mo> 
       <mi>
         B 
       </mi> 
       <mi>
         e 
       </mi> 
       <mi>
         t 
       </mi> 
       <mi>
         a 
       </mi> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mrow> 
         <mi>
           θ 
         </mi> 
         <mo>
           ; 
         </mo> 
         <mn>
           77.4 
         </mn> 
         <mo>
           , 
         </mo> 
         <mn>
           115.6 
         </mn> 
        </mrow> 
        <mo>
          ) 
        </mo> 
       </mrow> 
      </mrow> 
     </math>, based on a prior sample size equal to 191. As an alternative, we can choose as interval of interest an interval centred at 
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msup> 
        <mi>
          θ 
        </mi> 
        <mi>
          D 
        </mi> 
       </msup> 
      </mrow> 
     </math> and entirely belonging to the alternative hypothesis. In this case, the prior sample size can be fixed as the smallest value such that the prior probability of the interval reaches a desired high value, i.e. 0.95. For instance, by using the shiny app, we obtain that the beta prior 
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <mi>
         π 
       </mi> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mi>
          θ 
        </mi> 
        <mo>
          ) 
        </mo> 
       </mrow> 
       <mo>
         = 
       </mo> 
       <mi>
         B 
       </mi> 
       <mi>
         e 
       </mi> 
       <mi>
         t 
       </mi> 
       <mi>
         a 
       </mi> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mrow> 
         <mi>
           θ 
         </mi> 
         <mo>
           ; 
         </mo> 
         <mn>
           147 
         </mn> 
         <mo>
           , 
         </mo> 
         <mn>
           220 
         </mn> 
        </mrow> 
        <mo>
          ) 
        </mo> 
       </mrow> 
      </mrow> 
     </math> has mode in 0.4 and assigns a prior probability equal to 0.95 to the interval 
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <mrow> 
        <mo>
          [ 
        </mo> 
        <mrow> 
         <mn>
           0.35 
         </mn> 
         <mo>
           , 
         </mo> 
         <mn>
           0.45 
         </mn> 
        </mrow> 
        <mo>
          ] 
        </mo> 
       </mrow> 
      </mrow> 
     </math>, being based on a prior sample size equal to 365 (see <xref ref-type="fig" rid="fig4">
      Figure 4
     </xref>). This latter prior is less dispersed around 
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msup> 
        <mi>
          θ 
        </mi> 
        <mi>
          D 
        </mi> 
       </msup> 
      </mrow> 
     </math>, being based on a larger prior sample size, and thus expresses less uncertainty on the guessed design value.</p>
   </sec>
  </sec><sec id="s6">
   <title>6. Conclusions</title>
   <p>Binary outcomes are dichotomous data that can take exactly two possible values and are often analysed in many fields. In the Introduction, we specifically refer to epidemiology and clinical trials, but many applications concern different context, such as, marketing, education, environment and social science. The statistical analysis of these data is often conducted by exploiting the Bayesian approach that is very popular and widely used nowadays. Many introductory textbooks and papers on Bayesian procedures cover binary data analysis, because it is really simple, but they typically provide only one of the two possible interpretations of the hyper-parameters of the beta prior distribution as extra data. This paper clarifies why both the interpretations are reasonable and, therefore, it is particularly aimed at non-expert users of Bayesian statistics and for students who might be confused by inconsistent definitions across sources. By explicitly discussing both interpretations and their implications, we aim to provide a clearer and more coherent understanding of the beta prior density, supporting more informed and consistent applications in practice.</p>
   <p>Moreover, the great popularity of Bayesian methods is in part due to the proliferation of user-friendly software tools available through open source platforms. We developed a very intuitive Shiny/R app that allows practitioners unfamiliar with Bayesian methods to easily apply the described elicitation procedures. Although the Shiny app itself is not the central contribution of this work, we think it can be useful as a support tool to operationalize the theoretical insights discussed. The app complements the methodological content by offering a dynamic and interactive means to explore the effects of different elicitation choices. In particular, it aims at fostering a better understanding of how prior parameters influence the beta prior shape and at clarifying the role of the prior sample size.</p>
   <p>Note that the elicitation procedures based on the two interpretations lead to very similar beta prior densities for high values of the prior sample sizes and to very similar posterior analysis for large samples. Instead, in small-sample contexts, the posterior distribution may be noticeably sensitive to the prior sample size, and hence to whether it is defined as 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <mi>
        α 
      </mi> 
      <mo>
        + 
      </mo> 
      <mi>
        β 
      </mi> 
      <mo>
        − 
      </mo> 
      <mn>
        2 
      </mn> 
     </mrow> 
    </math> (mode-based) or 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <mi>
        α 
      </mi> 
      <mo>
        + 
      </mo> 
      <mi>
        β 
      </mi> 
     </mrow> 
    </math> (mean-based). Furthermore, as a limitation of the elicitation procedures presented, we can mention the fact that they assume a unimodal and well-defined belief about the success probability. These methods may not be suitable when the prior knowledge is vague, multi-modal, or intentionally uniform over a restricted range. In such cases, alternative elicitation strategies or prior structures (e.g., mixtures of beta distributions or truncated distributions) should be considered.</p>
  </sec>
 </body><back>
  <ref-list>
   <title>References</title>
   <ref id="scirp.145348-ref1">
    <label>1</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Armitage, P., Berry, G. and Matthews, J.N.S. (2002) Statistical Methods in Medical Research. 4th Edition, Wiley-Blackwell . &gt;https://doi.org/10.1002/9780470773666
    </mixed-citation>
   </ref>
   <ref id="scirp.145348-ref2">
    <label>2</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Christensen, R., Johnson, W., Branscum, A. and Hanson T. E. (2010) Bayesian Ideas and Data Analysis: An Introduction for Scientists and Statisticians. CRC Press.
    </mixed-citation>
   </ref>
   <ref id="scirp.145348-ref3">
    <label>3</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Rosner, G.L., Laud, P.W. and Johnson, W.O. (2021) Bayesian Thinking in Biostatistics. Chapman&amp;Hall/CRC.
    </mixed-citation>
   </ref>
   <ref id="scirp.145348-ref4">
    <label>4</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Longford, N.T. (2021) Statistics for Making Decisions. Chapman&amp;Hall/CRC Press.
    </mixed-citation>
   </ref>
   <ref id="scirp.145348-ref5">
    <label>5</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Lesaffre, E. and Lawson, A.B. (2012) Bayesian Biostatistics. John Wiley&amp;Sons.
    </mixed-citation>
   </ref>
   <ref id="scirp.145348-ref6">
    <label>6</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Gelman, A., Carlin, J.B., Stern, H.S., Dunson, D.B., Vehtari, A. and Rubin D.B. (2013) Bayesian Data Analysis. Chapman&amp;Hall/CRC.
    </mixed-citation>
   </ref>
   <ref id="scirp.145348-ref7">
    <label>7</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Blitzstein, J.K. and Hwang, J. (2019) Introduction to Probability. 2nd Edition, Chapman&amp;Hall/CRC.
    </mixed-citation>
   </ref>
   <ref id="scirp.145348-ref8">
    <label>8</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Fox, J.P. (2010) Bayesian Item Response Modeling: Theory and Applications. Springer.
    </mixed-citation>
   </ref>
   <ref id="scirp.145348-ref9">
    <label>9</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Sambucini, V. (2008) A Bayesian Predictive Two‐stage Design for Phase II Clinical Trials. Statistics in Medicine, 27, 1199-1224. &gt;https://doi.org/10.1002/sim.3021
    </mixed-citation>
   </ref>
   <ref id="scirp.145348-ref10">
    <label>10</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Matano, F. and Sambucini, V. (2016) Accounting for Uncertainty in the Historical Response Rate of the Standard Treatment in Single-Arm Two-Stage Designs Based on Bayesian Power Functions. Pharmaceutical Statistics, 15, 517-530. &gt;https://doi.org/10.1002/pst.1788
    </mixed-citation>
   </ref>
   <ref id="scirp.145348-ref11">
    <label>11</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Tan, S. and Machin, D. (2002) Bayesian Two-Stage Designs for Phase II Clinical Trials. Statistics in Medicine, 21, 1991-2012. &gt;https://doi.org/10.1002/sim.1176
    </mixed-citation>
   </ref>
   <ref id="scirp.145348-ref12">
    <label>12</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Teramukai, S., Daimon, T. and Zohar, S. (2012) A Bayesian Predictive Sample Size Selection Design for Single-Arm Exploratory Clinical Trials. Statistics in Medicine, 31, 4243-4254. &gt;https://doi.org/10.1002/sim.5505
    </mixed-citation>
   </ref>
   <ref id="scirp.145348-ref13">
    <label>13</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Spiegelhalter, D.J., Abrams, K.R. and Myles, J.P. (2003) Bayesian Approaches to Clinical Trials and Health‐care Evaluation. Wiley. &gt;https://doi.org/10.1002/0470092602
    </mixed-citation>
   </ref>
   <ref id="scirp.145348-ref14">
    <label>14</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Sambucini, V. (2017) Bayesian vs Frequentist Power Functions to Determine the Optimal Sample Size: Testing One Sample Binomial Proportion Using Exact Methods. In: Tejedor, J.P., Ed., Bayesian Inference, InTech, 77-97. &gt;https://doi.org/10.5772/intechopen.70168
    </mixed-citation>
   </ref>
   <ref id="scirp.145348-ref15">
    <label>15</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Kunzmann, K., Grayling, M.J., Lee, K.M., Robertson, D.S., Rufibach, K. and Wason, J.M.S. (2021) A Review of Bayesian Perspectives on Sample Size Derivation for Confirmatory Trials. The American Statistician, 75, 424-432. &gt;https://doi.org/10.1080/00031305.2021.1901782
    </mixed-citation>
   </ref>
  </ref-list>
 </back>
</article>