Asymptotic Question - Determining average case runtime of linear search with summation formula
Suppose that it can be any element of your array. You'll have to consider, for $ 1 &lt;= i &lt;= n $ , what will be the cost if the searched element were at position $i$. If the element were in first position, it would cost $1$ iteration, at second $2$ iterations, and so on. So, if it were at position $i$, it would cost $i$ iterations. In addition, we have $n$ elements, with same chances, so the average cost is the average of the costs that's we have calculated. That's why it's $(1 + 2 + ... + n) / n$. 

If you know about probabilities, costs for each element represent a discrete probability distribution, and the average cost is the expected value.