Application of MATLAB in probability and statistics