# Finding probability… Two numbers selected from a set of natural numbers

Two numbers $r$ and $s$ are drawn one at a time, without replacement from the set $\{1,2,...,n\}$ Find $P(r\leq p/s\leq p)$ where $p$ belongs to the set

• $p/s \le p$ seems unnecessary. Check the source to make sure you stated the problem correctly. – quasi Sep 18 '17 at 18:09
• I agree it seems unnecessary but that's how the question is. The question can still be solved – Ava Sep 18 '17 at 18:12
• Is the answer supposed to be expressed in terms of the unknown $p$? – quasi Sep 18 '17 at 18:13
• I don't have the answer sorry. – Ava Sep 18 '17 at 18:14
• But I think that since p can be anything it should in terms of that – Ava Sep 18 '17 at 18:15

Fix an integer $n>1$.
If $r,s$ are drawn randomly, one at a time, without replacement, from $\{1,...,n\}$, then for fixed $p \in \{1,...,n\}$, the probability that $r \le {\large{\frac{p}{s}}} \le p\;$can be expressed as $$\frac { {\displaystyle{ \left( \sum_{r=1}^p \left\lfloor{\frac{p}{r}}\right\rfloor \right) -\lfloor{\sqrt{p}}\rfloor }} } { \phantom{\large{X^X}}{n(n-1)}\phantom{\large{X^X}} }$$
• You need to subtract off the counts for the pairs $(r,r)$ where $r^2 \le p$. – quasi Sep 18 '17 at 19:14
• Test the formula for small values of $n$ and $p$. – quasi Sep 18 '17 at 19:16