class_docstr: Test bayesian.py.
class_docstr_tok: ["Test","bayesian.py","."]
docstr: Test function bayesfactor_binom.
  Compare to http://pcl.missouri.edu/bf-binomial.
  See also docstring of the function for a comparison with Wikipedia.
docstr_tok: ["Test","function","bayesfactor_binom",".","Compare","to","http",":","\/\/pcl.missouri.edu\/bf-binomial",".","See","also","docstring","of","the","function","for","a","comparison","with","Wikipedia","."]
code: def test_bayesfactor_binom(self):
      """Test function bayesfactor_binom.
      Compare to http://pcl.missouri.edu/bf-binomial.
      See also docstring of the function for a comparison with Wikipedia.
      """
  
      def bf10(x):
          return approx(1 / x, rel=1e-5)
  
      assert bayesfactor_binom(16, 20) == bf10(0.09703159)
      assert bayesfactor_binom(16, 20, 0.8) == bf10(4.582187)
      assert bayesfactor_binom(14, 20, a=6, b=4) == bf10(0.37901)
      assert bayesfactor_binom(100, 1000, 0.1) == bf10(42.05881)
  
file_path: pingouin/pingouin/tests/test_bayesian.py
imports: import numpy
  from unittest import TestCase
  from scipy.stats import pearsonr
  from pingouin.parametric import ttest
  from pingouin.bayesian import bayesfactor_ttest, bayesfactor_binom
  from pingouin.bayesian import bayesfactor_pearson
  from pytest import approx
label_desc: Use image node_id 3 for calling the TestBayesian obj's underlying member method code with example usage: obj.test_bayesfactor_binom() and returns: approx