Probability and Big-O notation

426 Views Asked by At

Let $m$ be a positive integer, and let $p(m)$ be the probability that a number chosen with uniform distribution from $\{1,... , m\}$ is divisible by either $4$, $5$ or $6$.

Show that $$p(m) = \frac{14}{30} + O\left(\frac1m\right)$$

What I have done so far :

number of elements divisible by $4 = \frac m4$
number of elements divisible by $5 = \frac m5$
number of elements divisible by $6 = \frac m6$
$P($choosing an element from {1, ... , m }$)$ $= \frac 1m$

Using all the above values in the inclusion-exclusion principle I got the number of elements divisible by either $4$, $5$ and $6$. But I don't know that to do next.

1

There are 1 best solutions below

9
On BEST ANSWER

The number of elements of $\{1,\ldots,m\}$ that are divisible by $k$ is $\lfloor m/k \rfloor$ instead of $m/k$. The two quantities are related by $m = k \cdot \lfloor m/k \rfloor + m \bmod k$, so that their difference is less than $1$. If you got the $14/30$, it means that you applied inclusion/exclusion correctly, but to the $m/k$'s. If you account for the residues in your computation, you should get a term whose absolute value is bounded by $C/m$, where $C$ is a small positive integer.