calculate x value from normal distribution

조회 수: 2 (최근 30일)
Jay Hanuman
Jay Hanuman 2016년 11월 14일
편집: Torsten 2016년 11월 14일
I have data x , with nonzero mean. I can plot normal distribution with following
x=randi([1 20],1,60);
a=mean(x);
b=sqrt(var(x));
x= [-130:1:120];
norm = normpdf(x,a,b);
plot(x,norm)
to calculate x value for 97%, I have to see z score for 97% and then use
z=(x-mean)/standard deviation
for calculation of x value but how can I calculate x value directly by code.

채택된 답변

Torsten
Torsten 2016년 11월 14일
편집: Torsten 2016년 11월 14일
You mean
x = norminv([0.015 0.985],a,b)
?
Or simply
x = norminv(0.97,a,b)
?
Best wishes
Torsten.

추가 답변 (0개)

Community Treasure Hunt

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

Start Hunting!

Translated by