Effacer les filtres
Effacer les filtres

Find the index that represents a percentage of area

1 vue (au cours des 30 derniers jours)
Khoder Makkawi
Khoder Makkawi le 29 Avr 2021
Commenté : Khoder Makkawi le 29 Avr 2021
Hello,
I have a probability distribution with mean mu = 0 and a standard deviation s = 1.
I want to plot a vertical line that represents the 20% for example of the total area (as in the figure attached).
How I can do this?
Thanks
s = 1; mu = 0; xstart = -10; xend = 10; xstep = 0.1;
x_range = xstart:xstep:xend;
my_pdf = normpdf(x_range,mu,s);
figure
plot(x_range,my_pdf,'b');

Réponse acceptée

David Hill
David Hill le 29 Avr 2021
s = 1; mu = 0; xstart = -10; xend = 10; xstep = 0.1;
x_range = xstart:xstep:xend;
my_pdf = normpdf(x_range,mu,s);
figure
x=norminv(.2,mu,s);
y=0:.01:.4;
x=x*ones(size(y));
plot(x_range,my_pdf,'b',x,y,'r');

Plus de réponses (0)

Catégories

En savoir plus sur Linear and Nonlinear Regression dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by