When determining turnovers for a given player, how exactly are they determined? Wikipedia defines turnovers as
In basketball, a turnover occurs when a player from one team gives possession to a member of the opposing team by losing the ball. This can result from the ball being stolen, the player making mistakes such as stepping out or throwing the ball out of bounds, or committing a violation (such as traveling) or committing an offensive foul.
However, I'm not clear on what happens on errant passes. When a player in possession of the ball makes a pass that is immediately intercepted by a defender, then obviously the player who passed the ball is charged with a turnover. My question is what happens if the ball is tipped by the player that the ball was intended for before the defender gains possession of the ball? Who is charged with a turnover in that situation, the player who made the pass or the player who tipped the ball before the defender gained possession? Is it determined by who touched the ball last or the player who last had full possession of the ball?