MATLAB: Show probabilities (-inf+inf, -3dev-3dev and so on….)

pdf

show probabilities (-inf+inf, -3dev-3dev and so on….)
>> mu = 12.5;
sigma = 3.75;
xs = [0:.01:25];
ys = normpdf(xs, mu, sigma);
clf;
plot(xs, ys);
Follow with the mean and std

Best Answer

"Integrating pdf" and "probability ... in given level ranges" sounds like the teacher wants you to use the cdf to get the cumulative probability between a range of values. E.g., maybe this is what is being asked:
>> mu = 12.5;
>> sigma = 3.75;
>> pd = makedist('Normal','mu',mu,'sigma',sigma); % Make a Normal pdf
>> cdf(pd,inf) - cdf(pd,-inf) % the integrated probablility between -inf and +inf
ans =
1
>> cdf(pd,mu+3*sigma) - cdf(pd,mu-3*sigma) % the integrated probablity between mu-3sigma and mu+3sigma
ans =
0.9973