title: Estimate the needed sample size for a Chi Squared test
body: <p>I want to estimate the needed sample size to compute a Chi Squared (Test for homogenity) test for discrete data using Python and need a hint how to do it. </p>
  
  <p>In general I want to estimate if the failure rates of two production processes differ significantly (alpha = 5%) or not.</p>
  
  <p>I have only found the  <a href="http://www.statsmodels.org/dev/generated/statsmodels.stats.gof.chisquare_effectsize.html#statsmodels.stats.gof.chisquare_effectsize" rel="nofollow noreferrer">statsmodels.stats.gof.chisquare_effectsize()</a> function but this seems to work only for a goodness of fit test.</p>
  
  <p>Is there any way how I can determine the needed sample size?</p>
  
  <p>I appreciate every answer.</p>