title: Statsmodels ztest: Which variance is used in proportions_ztest?
body: <p>I'm trying to understand how proportions_ztest works</p>
  <p>As I understand it when I run</p>
  <pre><code>stat, pvalue = proportions_ztest(count = 40, nobs = 20000, value = 0.003, alternative = &quot;smaller&quot;) 
  pvalue
  </code></pre>
  <p>it should give the same result for the p-value as</p>
  <pre><code>stats.norm.cdf(40, 60, np.sqrt(20000* 0.003*(1-0.003)))
  </code></pre>
  <p>but it does not. My assumption is, there is a different variance used, but I didnt find any documentation on this.</p>