statistics and machine learning toolbox functions