adding probability statistics calculation