Average case analysis of linear search
The phrase "the element being searched for is equally likely to be any element in the array" is ambiguous. It might mean two different things:


The element is at a uniformly random position in the array.
The element is chosen uniformly at random from the set of elements in the array.


This ambiguity suggests that the authors are making the hidden assumption that all elements are distinct, in which case both meanings coincide. Moreover, without this assumption it is impossible to determine the average-case complexity (consider what happens if all elements in the array are identical).