What is the probability of comparision between smallest and greatest element in array when quick sort randomly choose the pivot element?
It is $2/N$ : the probability of picking the smallest or the biggest as pivot.
If you choose one of them, they will be compared.
If you choose any other, then the smallest and the biggest elements will be put in different partitions, and thus will not be compared.