title: Binomial test in Python vs R
body: <p>I am trying to re-implement a binomial test initialy developed in <code>R</code> with <code>Python</code>. However, I am not sure if I am using the right functionality.</p>
  
  <p>In <code>R</code>, I get: </p>
  
  <pre><code>&gt; binom.test (2, 8, 11/2364, alternative = "greater")
  0.25
  </code></pre>
  
  <p>With <code>Python</code> &amp; <code>SciPy</code>, I use </p>
  
  <pre><code>from scipy.stats import binom
  binom.sf(2, 8, float(11)/float(2364))
  5.5441613055814931e-06
  </code></pre>
  
  <p>In fact I have to do <code>binom.sf(2, 8, float(11)/float(2364))</code> to make sure the third parameter is not <code>0</code> because of int division.</p>
  
  <p>Why do the values differ? Do I have to specify the moments for Scipy / <code>binom.sf</code>?
  Should I use some other library?</p>