generic method to evaluate pdf for a range