How do you compute the average height of a binary search tree when adding 1000 random ints? What is the average height?
This question is in fact, tricky. The answer will not be 1000, because that is improbable, but log2(1000) is also improbable, but even more so depending on how the tree is grown.
If you add an int by stepping though the tree then naively appending it the tree will virtually always be taller than log2(1000).
Talk to a statistician, because this seems related to normal probability distributions. Those are generated by lots of iterated random events( heads one unit right, tails ditto left), and the value of a random integer iterates through the tree as it settles out into a leaf.