A Review of Bayesian Hypothesis Testing and Its Practical Implementations
Abstract
:1. Introduction
2. Bayes Factor Definition and Technical Aspects
2.1. Definition
2.2. Computation of the Bayes Factor
3. Prior Elicitation and Sensitivity Analysis
3.1. Prior Distributions
3.2. Prior Elicitation
3.3. Sensitivity Analysis
4. Applications of the Bayes Factor Using R Packages
4.1. One-Sample t-Test
4.2. Multiway ANOVA
4.3. Repeated-Measures Design
4.4. Poisson Mixed-Effects Model
5. Summary
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
Appendix A. Poisson Repeated-Measures Data Simulation
References
- Evett, I.W. Implementing Bayesian Methods in Forensic Science. In Proceedings of the 4th Valencia International Meeting on Bayesian Statistics, Valencia, Spain, 15–20 April 1991; Volume 59. [Google Scholar]
- Kohavi, R.; Longbotham, R. Online Controlled Experiments and A/B Testing. Encycl. Mach. Learn. Data Min. 2017, 7, 922–929. [Google Scholar] [CrossRef]
- Woodall, W.H. Controversies and Contradictions in Statistical Process Control. J. Qual. Technol. 2000, 32, 341–350. [Google Scholar] [CrossRef]
- Mulder, J.; Wagenmakers, E.-J. Editors’ Introduction to the Special Issue “Bayes Factors for Testing Hypotheses in Psychological Research: Practical Relevance and New Developments”. J. Math. Psychol. 2016, 72, 1–5. [Google Scholar] [CrossRef]
- Cranmer, K.S. Frequentist Hypothesis Testing with Background Uncertainty. arXiv 2003, arXiv:0310108. [Google Scholar]
- Dienes, Z. How Bayes Factors Change Scientific Practice. J. Math. Psychol. 2016, 72, 78–89. [Google Scholar] [CrossRef]
- Morey, R.D.; Romeijn, J.W.; Rouder, J.N. The Philosophy of Bayes Factors and the Quantification of Statistical Evidence. J. Math. Psychol. 2016, 72, 6–18. [Google Scholar] [CrossRef] [Green Version]
- Wagenmakers, E.-J. A Practical Solution to the Pervasive Problems of p Values. Psychon. Bull. Rev. 2007, 14, 779–804. [Google Scholar] [CrossRef] [Green Version]
- Fisher, R.A. The Design of Experiments. Nature 1936, 137, 252–254. [Google Scholar] [CrossRef]
- Brereton, R.G. p Values and Ronald Fisher. J. Chemom. 2020, 34, e3239. [Google Scholar] [CrossRef]
- Kennedy-Shaffer, L. Before p < 0.05 to Beyond p < 0.05: Using History to Contextualize p-Values and Significance Testing. Am. Stat. 2019, 73, 82–90. [Google Scholar] [CrossRef] [Green Version]
- Wasserstein, R.L.; Lazar, N.A. The ASA Statement on p-Values: Context, Process, and Purpose. Am. Stat. 2016, 70, 129–133. [Google Scholar] [CrossRef] [Green Version]
- Nathoo, F.S.; Masson, M.E.J. Bayesian Alternatives to Null-Hypothesis Significance Testing for Repeated-Measures Designs. J. Math. Psychol. 2016, 72, 144–157. [Google Scholar] [CrossRef]
- Greenland, S.; Senn, S.J.; Rothman, K.J.; Carlin, J.B.; Poole, C.; Goodman, S.N.; Altman, D.G. Statistical Tests, p Values, Confidence Intervals, and Power: A Guide to Misinterpretations. Eur. J. Epidemiol. 2016, 31, 337–350. [Google Scholar] [CrossRef] [PubMed] [Green Version]
- Goodman, S. A Dirty Dozen: Twelve p-Value Misconceptions. Semin. Hematol. 2008, 45, 135–140. [Google Scholar] [CrossRef] [PubMed] [Green Version]
- Good, I.J. Explicativity, Corroboration, and the Relative Odds of Hypotheses. Synthese 1975, 30, 39–73. [Google Scholar] [CrossRef]
- Kass, R.E.; Raftery, A.E. Bayes Factors. J. Am. Stat. Assoc. 1995, 90, 773–795. [Google Scholar] [CrossRef]
- Jeffreys, H. Theory of Probability, 3rd ed.; Oxford University Press: Oxford, UK, 1961. [Google Scholar]
- Robert, C.P.; Chopin, N.; Rousseau, J. Harold Jeffreys’s Theory of Probability Revisited. Stat. Sci. 2009, 24, 141–172. [Google Scholar] [CrossRef]
- Gelman, A.; Stern, H. The Difference Between “Significant” and “Not Significant” is not Itself Statistically Significant. Am. Stat. 2006, 60, 328–331. [Google Scholar] [CrossRef] [Green Version]
- Held, L.; Ott, M. On p-Values and Bayes Factors. Annu. Rev. Stat. Appl. 2018, 5, 393–419. [Google Scholar] [CrossRef] [Green Version]
- Jeffreys, H. Some Tests of Significance, Treated by the Theory of Probability. Math. Proc. Camb. Philos. Soc. 1935, 31, 203–222. [Google Scholar] [CrossRef]
- Morey, R.D.; Rouder, J.N. BayesFactor: Computation of Bayes Factors for Common Designs. 2018. R Package Version 0.9.12–4.2. Available online: https://cran.r-project.org/package=BayesFactor (accessed on 25 October 2021).
- Bürkner, P.C. Bayesian Item Response Modeling in R with brms and Stan. J. Stat. Softw. 2021, 100, 1–54. [Google Scholar] [CrossRef]
- Mulder, J.; Williams, D.R.; Gu, X.; Tomarken, A.; Böing-Messing, F.; Olsson-Collentine, A.; Meijerink-Bosman, M.; Menke, J.; van Aert, R.; Fox, J.-P.; et al. BFpack: Flexible Bayes Factor Testing of Scientific Theories in R. J. Stat. Softw. 2021, 100, 1–63. [Google Scholar] [CrossRef]
- JASP Team. JASP Computer Software. 2021. Available online: https://jasp-stats.org/ (accessed on 25 October 2021).
- IEEE Spectrum. Top Programming Languages 2021. 2021. Available online: https://spectrum.ieee.org/top-programming-languages/ (accessed on 30 October 2021).
- TIOBE. TIOBE Index for November. 2021. Available online: https://www.tiobe.com/tiobe-index/ (accessed on 30 October 2021).
- Gautier, L. rpy2 Package Version 3.5.0. 2021. Available online: https://rpy2.github.io/doc/latest/html/index.html (accessed on 30 October 2021).
- Bub, D.N.; Masson, M.E.J.; Kumar, R. Time Course of Motor Affordances Evoked by Pictured Objects and Words. J. Exp. Psychol. Hum. Percept. Perform. 2018, 44, 53. [Google Scholar] [CrossRef]
- Paap, K.R.; Johnson, H.A.; Sawi, O. Are Bilingual Advantages Dependent upon Specific Tasks or Specific Bilingual Experiences? J. Cogn. Psychol. 2014, 26, 615–639. [Google Scholar] [CrossRef]
- Przybylski, A.K.; Weinstein, N.; Murayama, K. Internet Gaming Disorder: Investigating the Clinical Relevance of a New Phenomenon. Am. J. Psychiatry 2017, 174, 230–236. [Google Scholar] [CrossRef] [PubMed] [Green Version]
- Gronau, Q.F.; Sarafoglou, A.; Matzke, D.; Ly, A.; Boehm, U.; Marsman, M.; Leslie, D.S.; Forster, J.J.; Wagenmakers, E.-J.; Steingroever, H. A Tutorial on Bridge Sampling. J. Math. Psychol. 2017, 81, 80–97. [Google Scholar] [CrossRef]
- Dickey, J.M. The Weighted Likelihood Ratio, Linear Hypotheses on Normal Location Parameters. Ann. Math. Stat. 1971, 42, 204–223. [Google Scholar] [CrossRef]
- Verdinelli, I.; Wasserman, L. Computing Bayes Factors using a Generalization of the Savage-Dickey Density Ratio. J. Am. Stat. Assoc. 1995, 90, 614–618. [Google Scholar] [CrossRef]
- Evans, M.; Swartz, T. Methods for Approximating Integrals in Statistics with Special Emphasis on Bayesian Integration Problems. Stat. Sci. 1995, 10, 254–272. [Google Scholar] [CrossRef]
- Evans, M.; Swartz, T. Approximating Integrals via Monte Carlo and Deterministic Methods; Oxford University Press: Oxford, UK, 2000; Volume 20. [Google Scholar]
- Meng, X.L.; Wong, W.H. Simulating Ratios of Normalizing Constants via a Simple Identity: A Theoretical Exploration. Stat. Sin. 1996, 6, 831–860. [Google Scholar]
- Carpenter, B.; Gelman, A.; Hoffman, M.D.; Lee, D.; Goodrich, B.; Betancourt, M.; Brubaker, M.; Guo, J.; Li, P.; Riddell, A. Stan: A Probabilistic Programming Language. J. Stat. Softw. 2017, 76, 1–32. [Google Scholar] [CrossRef] [Green Version]
- Plummer, M. JAGS: A program for Analysis of Bayesian Graphical Models Using Gibbs Sampling. In Proceedings of the 3rd International Workshop on Distributed Statistical Computing, Vienna, Austria, 20–22 March 2003; Volume 124, pp. 1–10. [Google Scholar]
- Gronau, Q.F.; Singmann, H.; Wagenmakers, E.-J. bridgesampling: An R Package for Estimating Normalizing Constants. J. Stat. Softw. 2020, 92, 1–29. [Google Scholar] [CrossRef] [Green Version]
- Liu, C.C.; Aitkin, M. Bayes Factors: Prior Sensitivity and Model Generalizability. J. Math. Psychol. 2008, 52, 362–375. [Google Scholar] [CrossRef]
- Gelman, A.; Carlin, J.B.; Stern, H.S.; Rubin, D.B. Bayesian Data Analysis, 3rd ed.; Chapman and Hall: London, UK, 2013. [Google Scholar] [CrossRef]
- Kadane, J.; Wolfson, L.J. Experiences in Elicitation. J. R. Stat. Soc. Ser. D Stat. 1998, 47, 3–19. [Google Scholar] [CrossRef]
- Bernardo, J.M. Reference Posterior Distributions for Bayesian Inference. J. R. Stat. Soc. Ser. B Stat. Methodol. 1979, 41, 113–128. [Google Scholar] [CrossRef]
- Hartmann, M.; Agiashvili, G.; Bürkner, P.; Klami, A. Flexible Prior Elicitation via the Prior Predictive Distribution. In Proceedings of the 36th Conference on Uncertainty in Artificial Intelligence, Online, 3–6 August 2020; pp. 1129–1138. [Google Scholar]
- da Silva, E.d.S.; Kuśmierczyk, T.; Hartmann, M.; Klami, A. Prior Specification via Prior Predictive Matching: Poisson Matrix Factorization and Beyond. arXiv 2019, arXiv:1910.12263. [Google Scholar]
- Sinharay, S.; Stern, H.S. On the Sensitivity of Bayes Factors to the Prior Distributions. Am. Stat. 2002, 56, 196–201. [Google Scholar] [CrossRef]
- Vanpaemel, W. Prior Sensitivity in Theory Testing: An Apologia for the Bayes Factor. J. Math. Psychol. 2010, 54, 491–498. [Google Scholar] [CrossRef] [Green Version]
- Depaoli, S.; Winter, S.D.; Visser, M. The Importance of Prior Sensitivity Analysis in Bayesian Statistics: Demonstrations Using an Interactive Shiny App. Front. Psychol. 2020, 11, 608045. [Google Scholar] [CrossRef] [PubMed]
- Ly, A.; Verhagen, J.; Wagenmakers, E.-J. Harold Jeffreys’s Default Bayes Factor Hypothesis Tests: Explanation, Extension, and Application in Psychology. J. Math. Psychol. 2016, 72, 19–32. [Google Scholar] [CrossRef]
- Rouder, J.N.; Speckman, P.L.; Sun, D.; Morey, R.D.; Iverson, G. Bayesian t Tests for Accepting and Rejecting the Null Hypothesis. Psychon. Bull. Rev. 2009, 16, 225–237. [Google Scholar] [CrossRef]
- Rouder, J.N.; Morey, R.D.; Speckman, P.L.; Province, J.M. Default Bayes Factors for ANOVA Designs. J. Math. Psychol. 2012, 56, 356–374. [Google Scholar] [CrossRef]
- Rouder, J.N.; Morey, R.D. Default Bayes Factors for Model Selection in Regression. Multivar. Behav. Res. 2012, 47, 877–903. [Google Scholar] [CrossRef]
- Cushny, A.R.; Peebles, A.R. The Action of Optical Isomers: II. Hyoscines. J. Physiol. 1905, 32, 501. [Google Scholar] [CrossRef]
- Su, Y.S.; Yajima, M. R2jags: Using R to Run ’JAGS’, 2021. R Package Version 0.7-1. 2021. Available online: https://cran.r-project.org/package=R2jags (accessed on 4 December 2021).
- Crampton, E. The Growth of the Odontoblasts of the Incisor Tooth as a Criterion of the Vitamin C Intake of the Guinea Pig. J. Nutr. 1947, 33, 491–504. [Google Scholar] [CrossRef]
- Nelder, J.A.; Wedderburn, R.W. Generalized Linear Models. J. R. Stat. Soc. Ser. A 1972, 135, 370–384. [Google Scholar] [CrossRef]
- Wagenmakers, E.-J.; Lodewyckx, T.; Kuriyal, H.; Grasman, R. Bayesian Hypothesis Testing for Psychologists: A Tutorial on the Savage–Dickey Method. Cogn. Psychol. 2010, 60, 158–189. [Google Scholar] [CrossRef] [Green Version]
- Plummer, M. rjags: Bayesian Graphical Models Using MCMC. 2021. Available online: https://cran.r-project.org/package=rjags (accessed on 21 November 2021).
- Kooperberg, C. polspline: Polynomial Spline Routines. 2020. Available online: https://cran.r-project.org/package=polspline (accessed on 21 November 2021).
Interpretation of Evidence against | |
---|---|
1 to 3 | Not worth more than a bare mention |
3 to 20 | Positive |
20 to 150 | Strong |
>150 | Very Strong |
Report | beta | tau_b | ||
---|---|---|---|---|
1 | dnorm(0, 0.01) | dgamma(0.01, 0.01) | 0.040 | 25.247 |
2 | dnorm(0, 0.1) | dgamma(0.01, 0.01) | 0.054 | 18.377 |
3 | dnorm(0, 0.01) | dgamma(2, 2) | 0.042 | 24.059 |
4 | dnorm(0, 0.1) | dgamma(2, 2) | 0.032 | 30.859 |
5 | dnorm(0, 0.5) | dgamma(1, 4) | 0.023 | 42.816 |
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |
© 2022 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Wei, Z.; Yang, A.; Rocha, L.; Miranda, M.F.; Nathoo, F.S. A Review of Bayesian Hypothesis Testing and Its Practical Implementations. Entropy 2022, 24, 161. https://doi.org/10.3390/e24020161
Wei Z, Yang A, Rocha L, Miranda MF, Nathoo FS. A Review of Bayesian Hypothesis Testing and Its Practical Implementations. Entropy. 2022; 24(2):161. https://doi.org/10.3390/e24020161
Chicago/Turabian StyleWei, Zhengxiao, Aijun Yang, Leno Rocha, Michelle F. Miranda, and Farouk S. Nathoo. 2022. "A Review of Bayesian Hypothesis Testing and Its Practical Implementations" Entropy 24, no. 2: 161. https://doi.org/10.3390/e24020161
APA StyleWei, Z., Yang, A., Rocha, L., Miranda, M. F., & Nathoo, F. S. (2022). A Review of Bayesian Hypothesis Testing and Its Practical Implementations. Entropy, 24(2), 161. https://doi.org/10.3390/e24020161