Warmup: Vectorized function for calculating posterior probabilities