I think the answer is 34/8 = 4.25.
Question: From a complete binary tree T of 8 leaf nodes, a and b are selected randomly and independently. What is the expected distance between a and b in T.
Here is how I solved it:
Since, the two leaf nodes are selected independently, both nodes can be same. If the leaf nodes are numbered 1 to 8 from left to right, then,
I can reach 1 node (i.e., same node) in a distance = 0
I can reach 1 node in a distance = 2
I can reach 2 nodes in a distance = 4
I can reach 4 nodes in a distance = 6
So, expected distance = (1 * 0 + 1 * 2 + 2 * 4 + 4 * 6)/(1 + 1 + 2 + 4) = 34/8.