estDiversity function

Estimate diversity at each node of the tree