# Probability and expectancy problem [closed]

if we choose a size $$25$$ subset of the set: $$\{1,2,....100\}$$ what is the expectancy of the number of sequential pairs in the subset? expectancy still confuses me, can anybody help?

## closed as off-topic by Namaste, user21820, RRL, Lord_Farin, DidDec 19 '18 at 18:20

This question appears to be off-topic. The users who voted to close gave this specific reason:

• "This question is missing context or other details: Please provide additional context, which ideally explains why the question is relevant to you and our community. Some forms of context include: background and motivation, relevant definitions, source, possible strategies, your current progress, why the question is interesting or important, etc." – Namaste, user21820, RRL, Lord_Farin, Did
If this question can be reworded to fit the rules in the help center, please edit the question.

• – StubbornAtom Dec 10 '18 at 18:56

Let $$X_i$$ be an indicator random variable that $$i$$ and $$i+1$$ ($$i\in \{1,2,...,99\}$$) are in a choosen subset.

Then $$P(X_i = 1) = {{98\choose 23}\over {100\choose 25}}= {6\over 99}$$ Since $$X= X_1+...+X_{99}$$ we have $$E(X) = E(X_1)+...+E(X_{99}) = 99{6\over 99} = 6$$

• Is that better @copper.hat? – Aqua Dec 5 '18 at 18:44
• Yes thanks. ${}{}$ – copper.hat Dec 5 '18 at 18:49

Let's assign a label $$1,2 \dots 25$$ (arbitrary order) to each of the selected numbers. Let $$A_{i,j}$$ with $$1\le i be $$1$$ if elements with labels $$i,j$$ have sequential values, $$0$$ otherwise.

Then $$X = \sum A_{i,j}$$ counts the number of sequential pairs, which is what we want, and

$$E(X)=\sum A_{i,j}$$

But $$E(X)=\sum E[A_{i,j}]= n_p P(A_{i,j} = 1) = n_p \frac{99}{\binom{100}{2}}$$

Where $$n_p = \binom{25}{2}=300$$ is the number of pairs. Then

$$E(X) = \frac{300 \times 99} { \binom{100}{2}}=6$$