Calculate probability for class values.