Relationship between average cost and total cost