show probabilities (-inf+inf, -3dev-3dev and so on....)

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

9 comentarios

John D'Errico
John D'Errico el 28 de En. de 2021
Um, what is your question?
show probabilities (-inf+inf, -3dev-3dev and so on....)
Follow with the mean and std
John D'Errico
John D'Errico el 28 de En. de 2021
show what probabilities? Mean and std of what? What is your question?
showing (-inf+inf, -3dev-3dev) probabilities in Matlab. mean = 12.5 , std=3.75
James Tursa
James Tursa el 28 de En. de 2021
Can you copy & paste the actual wording of the assignment?
it is not an assignment. I have this example which plotting the pdf function.
matlab code:
>> mu = 12.5; % mean
sigma = 3.75; % standard deviation
fh=@(x) exp(-((x-mu).^2)./(2*(sigma^2)))*(1/sqrt(2*pi*(sigma^2))); % PDF function
X = 0:.01:25;
p = plot(X,fh(X),'b-')
and my teacher is asking me this question.
show probabilities (-inf+inf, -3dev-3dev and so on....)
Follow with the mean and std
John D'Errico
John D'Errico el 28 de En. de 2021
I think it is your teacher you need to talk to, to explain what you are asked to do.
James Tursa
James Tursa el 28 de En. de 2021
"show probabilities (-inf+inf, -3dev-3dev and so on....)"
I have no idea what is being asked for here. Cumulative probability between the two values? Or ...?
'by integrating pdf You can find the probability of the signal apperance in given level ranges' teacher's explanation.

Iniciar sesión para comentar.

 Respuesta aceptada

James Tursa
James Tursa el 28 de En. de 2021
Editada: James Tursa el 28 de En. de 2021
"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

Más respuestas (0)

Etiquetas

Preguntada:

el 28 de En. de 2021

Editada:

el 28 de En. de 2021

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by