Question:Suppose we have one hundred seats, numbered 1 through 100. We randomly select 25 of these seats. What is the expected number of selected pairs of seats that are consecutive? (To clarify: we would count two consecutive selected seats as a single pair.)For example, if the selected seats are all consecutive (eg 1-25), then we have 24 consecutive pairs (eg 1&2, 2&3, 3&4, …, 24&25). The probability of this happening is 75/(100C25). So this contributes 24⋅75/(100C25) to the expected number of consecutive pairs.

Motivation: I teach. Near the end of an exam, when most of the students have left, I notice that there are still many pairs of students next to each other. I want to know if the number that remain should be expected or not.

**Answer**

If you’re just interested in the *expectation*, you can use the fact that expectation is additive to compute

- The expected number of consecutive integers among {1,2}, plus
- The expected number of consecutive integers among {2,3}, plus
- ….
- plus the expected number of consecutive integers among {99,100}.

Each of these 99 expectations is simply the probability that n and n+1 are both chosen, which is 251002499.

So the expected number of pairs is 99251002499=6.

**Attribution***Source : Link , Question Author : David Steinberg , Answer Author : hmakholm left over Monica*