Fixed major logic error.

in Calculate_probability