They are a lot of ways to compute an "**estimated bid-ask spread**". The most straightforward one is to sample the bid-ask on a regular time grid (for instance every second), but that for you need all the quote changes (a quote is the best bid and ask, price and quantity).

Usually **it is easier (and cheaper) to get the quotes sampled just before the transactions of the day**. Hence it is natural the compute the average bid-ask spread on such a database. Unfortunately this sample time is a stopping time and not a deterministic good that is known "a priori". Worst than that it is probable that **the occurence of a trade is not independent of the bid-ask spread**: most probably traders or algorithms are making a trade-off between the cost of crossing the spread and some predictors or a waiting cost. Because of that the bid-ask spread compute just before a trade is in general smaller than the "average bid-ask spread" (on a regular time grid).

In this context, the original question is: "*is the bid-ask spread sampled just before a trade always lower than the bid-ask spread sampled on a regular time grid?*"