calculate_tree function

Propagate Answers and Confidence Up the Tree