state transition & predict formulas