Divide the total number of hits, walks, and pitches hit by the number of times at bat plus walks, sacrifice flies, and pitches hit by the player's OBP.