triprobgHs function

Internal Function