Seems like average price is the wrong metric. You're vulnerable to errors in your database like vendors setting the price to $999 to indicate that it's out of stock or vendors never updating the price of products that don't move.
Lowest price from a place that lists it as in stock seems like a far better metric. Or even something like 25th percentile price.