Based on CLRS question 2.2:
Consider linear search again. How many elements of the input sequence need to be checked on the average, assuming that the element being searched for is equally likely to be any element in the array? How about in the worst case? What are the average-case and worst-case running times of linear search in $\theta$-notation? Justify your answers.
I have a question regarding the average case.
"assuming that the element being searched for is equally likely to be any element in the array" - what does that exactly mean? Does it mean that the probability for each to happen is $\frac{1}{n}$?
Or could it also be that the element is not in the array at all - is that a case is this probability the same as the rest (and then they are all $\frac{1}{n+1}$)?
Does it matter for the average case how many duplicated are there? Are we assumming that there are no duplicates?
A good explanation about what exactly is the average case would be helpful.