title: Change elements in array mathematica
body: <pre><code>gammaSample = RandomVariate[GammaDistribution[2, 2], 10];
  xArray = Array[0, 10];
  yArray = Array[0, 10];
  Histogram[gammaSample];
  PearsonChiSquareTest[gammaSample]
  sorted = Sort[gammaSample];
  Print[sorted];
  For[i = 1, i &lt;= 10, i++; ReplacePart[xArray, i -&gt; (i - 1/2)/100];]
  xArray
  </code></pre>
  
  <p>Hello!
  I just want to change the values in the Array. I also tried xArray[i]=(i - 1/2)/100 but it doesnt work. How do i do it in mathematica?</p>