A mathematical model for value estimation with public information and herding