Here are some older threads
http://forums.dtnma.com/index.cfm?page=topic&topicID=1264and a much older one
http://forums.dtnma.com/index.cfm?page=topic&topicID=229&start=1Since then QQQ changed to QQQQ and the primary market moved from Amex to Nasdaq. Running the same test for data from Jan 25, 2007, I show approx 0.5% of the time QQQQ and SPY are in a crossed state. My ATS focuses on these since the markets are highly liquid and with futures and options, arbs should clear any slight market inefficiencies very quickly.
Since I'm not using IQ's Level 2, I'm not sure if they provide a time stamp. Perhaps you might want to add your own, and then you can tell if the quote is "stale", or if it popped up recently outside the other BBOs. If the former, my hunch is that you couldn't get an execution at that price. If the latter, perhaps there is a trading opportunity. My guess is that if you're watching an active issue, and the quote is more than a few seconds old, you can't get executed at that price.
The next thing I would be looking at is whether the condition persists for more than a fraction of a second. Let's say you detect a crossed state, but it clears in less than 100ms. In that case, my hunch is that the quote you are seeing has already been updated, but that it takes time for a new quote to go from market center to IQ servers, and then out to you.
Another item which I find useful & enlightening is to analyze which are most active markets for the ticker you watch using the market center codes. Usually there are a few very active ones, and others which have very little volume. Using the regional quotes for the active market centers, I feel I can get a better picture of the "true" state of the market, while ignoring quotes from those markets where executions may be suspect.