handle possible negative value in binomial
fix a bug where hitting probability is unconditionally zero.
update unit tests