If we assume an asteroid can approach from any direction and that the Earth is perfectly spherical, the calculation is straightforward, because we can model it as a particle approaching a hemisphere head-on. It would get much more complicated if we relax those assumptions, but my feeling is that they would not make a huge difference to the probability.
With the hemisphere, we can calculate the probability of it striking at a particular angle theta by considering the closest distance r at which it would pass the Earth's centre, if the Earth were not there. The probability of the distance being between r and r+dr is ##p(r)dr = \frac{2\pi r\,dr}{\pi R^2}## where ##R## is the Earth's radius. The probability of the distance being less than ##r## is ##\int_0^r p(u)du = \left(\frac rR\right)^2##.
We can then do a change of variable and calculate the CDF and PDF for the angle theta, given that ##r=R\cos\theta##.
The result is that the probability density for angle ##\theta## is ##\sin 2\theta## and the probability of the angle being less than ##\theta## is ##\sin^2\theta##.
The probability density has a maximum when theta is 45 degrees, so your supposition is correct. The probability density is zero for theta equal to zero (brushing the surface) or ninety degrees (head-on impact).
This calculation also ignores the effect of gravity, which will make the object's trajectory curve inwards as it approaches Earth. However, if the object is traveling very fast relative to Earth, that effect should be minor.