title: if Statement to Override Value
body: <p>I'm trying to implement this formula from a paper <em>(ref)</em>:</p>
  <p><a href="https://i.stack.imgur.com/OYpjE.gif" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/OYpjE.gif" alt="enter image description here" /></a></p>
  <p>I tried:</p>
  <pre><code>import statsmodels.api
  
  n = 1 # samples
  x = 1 # positive results
  
  # Range of significance
  Min=0
  Max=1
  Step=.01
  Alpha = np.arange(Min,Max+Step,Step)
  
  Low  = []
  High = []
  
  for  A in Alpha:
    low, high = statsmodels.stats.proportion.proportion_confint(x, n, alpha=A, method='jeffreys')
    if x == 0: low  == 0 # these lines
    if x == n: high == 1 # aren't working
    Low.append(low)
    High.append(high)
  </code></pre>
  <p>But that gives me this:</p>
  <p><a href="https://i.stack.imgur.com/sN4CA.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/sN4CA.png" alt="enter image description here" /></a></p>
  <p>My <strong>if</strong> statements are supposed to override the values of <strong>low</strong> and <strong>high</strong> when <strong>x=0</strong> or <strong>x=n</strong>. How can I get them to work please?</p>
  <p><em>ref: Brown, L.D., Cai, T.T. and DasGupta, A., 2001. Interval estimation for a binomial proportion. Statistical science, pp.101-117.</em></p>