Example 7. In the segment of the natural number series from 1 to 20, find the frequency of prime numbers.
Solution. On the specified segment of the natural number series, the following prime numbers are found: $2,3,5,7,11,13,17,19$; there are 8 in total. Since $n=20, m=8$, the sought frequency is

$$
W=\frac{8}{20}=0.4
$$