A bag contains toys marked 1,2,3,…n.Two tags are chosen at random.

combinatorics

A bag contains toys marked 1,2,3,…n.Two tags are chosen at random.

Find P such that the markers will be consecutive integers if the tags are chosen

1)without replacement

2)with replacement

I am having a solution that goes like this:

For case 1:(Without replacement)

There are $nC2$ ways of choosing an element.

Take n=5, you get (1,2)(2,3)(3,4)(4,5) Generalising you can get (n-1) cases of getting consecutive tags.

So the required probability stands $(n-1)/nC2$

For case 2:(With replacement)

There is a sample space of $nC1 * nC1$ or $n^2$.

Here my instructor says that the number of choices will be 2(n-1).

Therefore, the probability of choosing consecutive tags is $\frac{2(n-1)}{n^2}$.

But I don't understand why it's $2*(n-1)$.

Is it simply because we now take both the tags without order for example: 1,2 in two ways (1,2) and (2,1) and they still remain conseceutive.

Best Answer

Here is another way to look at the second part of the question (which is with replacement) -

Let's say you pick the first tag and that is number $k$. If $k$ is $1$ or $n$, there is only possibility to get the consecutive number that we pick $2$ if the first number is $1$ and we pick $(n-1)$ if the first number is $n$. But if $k$ is any of the remaining $(n-2)$ numbers, you have two possibilities for the second number, it is either $(k-1)$ or it is $(k+1)$.

So the probability is $\frac{1}{n}(\frac{1}{n} + \frac{1}{n} + (n-2) \frac{2}{n}) = \frac{2(n-1)}{n^2}$

Related Question