The spoiler in THEORY should hurt mileage, as a spoiler adds drag to create downforce.
Most spoilers only make ANY downforce above 80 or much higher.
To get ANY lower speed difference, you need one like that on a Formula One car, which has a huge amount of drag. The rake of a race car spoiler is a balance between downforce and drag.
That said . . .
I have my doubts that the spoiler on the xB does anything more than look cool.
So, it is likely near aerodynamically neutral (little drag as possible and probably little downforce of any). Though, I have not examined a Scion xB2 spoiler to look at how the air should flow around it.
Aside:
If you look at many of the spoilers on modern cars, most don't really do much and many of the aftermarket ones are SO badly designed that they function more as a true wing (providing lift) rather that a "wing" spoiler (providing downforce). All a spoiler really actually is is an upside down wing that make "negative lift" pushing into the ground rather than into the air, like an airplane wing.
If a spoiler does anything, it should hurt mileage. Unless, of course, it is not really a spoiler at all . . .