Added total_cost method for Hypothesis