Probability of Selecting $r$ Numbers from $n$ Possibilities

104 Views Asked by At

I am working on a homework problem and I am given this situation:

Let $A$ be the event that the $r$ numbers we obtain are all different from each other. So, for example, if $n = 3$ and $r = 2$ the sample space is $S = \{(1, 1),(1, 2),(1, 3),(2, 1),(2, 2),(2, 3),(3, 1),(3, 2),(3, 3)\}$ and the event $A$ is $A = \{(1, 2),(1, 3),(2, 1),(2, 3),(3, 1),(3, 2)\}$.

My task is to solve for the general case and put together a formula.

For the random experiment described above, find the probability $P(A)$ for a general $n$ and $r$. [Hint: If $r = 1$, we don't choose any duplicate numbers, so $P(A) = 1$. If $r > n$, then our choice of $r$ numbers must contain some duplicates, so $P(A) = 0$. The interesting case is when $2 \leq r \leq n$.]

I found this relatively simple to do while programming on R, however I do not know where to begin when putting a formula together for the general case. Any explanations would be helpful!

4

There are 4 best solutions below

0
On

Hint. You'll do better by thinking rather than (brute force) programming.

Can you calculate the size of the sample space? That depends only on $n$. You've already done $n=3$ and found $9$ elements.

Now how many ways can you choose $r$ different elements in order from among $n$? You found $6$ when $n=3$ and $r=2$. Work out a few more cases and find the pattern.

0
On

Size of sample space can be calculated by n^r, as we are selecting r elements out of n choices, with repetition.

No of allowed outcomes = nCr

So, the formula comes out to be

nCr/n^r
0
On

It is in fact $\Large\binom{n}{k}=\dfrac{n!}{k!(n-k)!}$

0
On

I get:

The sample size is $n^r$.

The number of possibilities for success is: $n(n-1)(n-2)\cdots(n-(r-1))=\frac{n!}{(r-1)!}$...