title: Update Array to reduce Variance
body: <p>I have an array <code>X</code> with float values and a fixed size. I need to add <code>p</code> (a float value) to any element of <code>X</code> such that the variance of <code>X</code> reduces.</p>
  <p>How do I select the proper element?</p>
  <p>Eg:</p>
  <pre><code>X = [0,1.2,1.7,2.1,1.7,0,1.3] 
  </code></pre>
  <p>and</p>
  <pre><code>p = 0.5
  </code></pre>
  <p>What is the new <code>X</code>?</p>