Derivation of quantum probabilities from deterministic evolution