In basketball, if the ball goes through the hands of a player and hits the referee (who is out of bounds) and comes back in the court, is it a live ball, or out on last player to touch the ball?
If the referee is standing out of bounds, then the ball is out of bounds and dead as soon as it hits the referee. It is out on the last player to touch the ball.
From NCAA Men's Basketball 2013-14 and 2014-15 Rules, Rule 7 (Out of Bounds and the Throw-in), Section 1 (Out of Bounds - Player, Ball):
Art. 2. The ball shall be out of bounds when it touches a player who is out of bounds, any other person, the floor or any object on or outside a boundary, the supports or back of the backboard, or the ceiling or overhead equipment.
Section 2 (Ball Caused To Go Out of Bounds):
Art. 1. The last player to touch the ball before the ball goes out of bounds caused the ball to go out of bounds, provided that the ball is out of bounds because it touched something other than a player who is out of bounds.