Ancetral state estimation along a phylogeny via weighted mean