Say an asteroid passes in a distance x from Earth, the radius of which we will call r. We now can ask how likely it is that an object that hits a disk of radius r+x also hits a disk of radius r provided that it any point on the larger disk is hit with equal likelihood.
The likelihood then is p = A(r)/A(r+x) where A is the area of a disk of the given radius, In other words p = πr²/π(r+x)² = 1/(1+x/r)². If we now define ξ=x/r (which is the distance in units of Earth's radius we get a quite simple formula: p = 1/(1+ξ)².
Using ξ is advantageous as it is a value you actually find in tables. Let’s try a couple of values; LD means Lunar distance and is the distance in terms of the average distance between Earth and Moon:
|Distance in||ξ||p in %|
Please note that the closer an encounter is the less meaningless this rough estimate becomes as the asteroid by no means randomly hits the disk of radius r+x but follows a clearly determined path.