フィルターのクリア

Observation with trend line in the normal distribution plot ?

1 回表示 (過去 30 日間)
Hydro
Hydro 2014 年 9 月 22 日
コメント済み: Star Strider 2014 年 9 月 24 日
I am trying to plot my data in the form of normal probability with a fitted line. however, the area under the curve exceeds 1. any thought on this?
function mynormplot(Y)
S=sort(Y);
pi=(1:length(S))/(1+length(S));
zi=norminv(pi); % Since standard normal CDF hence, mean and STD is 0 & 1 respectively
plot(S,zi,'o');
hold
T=(S-mean(Y))/std(Y);
plot(S,T,'k');
end

回答 (1 件)

Star Strider
Star Strider 2014 年 9 月 23 日
I have no idea what ‘pi’ is supposed to be (and please don’t use built-in function names for variable names, since pi=3.14...).
The norminv function requires that you define the mean and standard deviation in its argument list. You are giving it ‘pi’ as an argument, so it is yours to guess what it is assuming are the mean and standard deviation.
  2 件のコメント
Hydro
Hydro 2014 年 9 月 24 日
Thanks star, i figured my mistake..you are right, i shouldnt name the variable as the buildt in function.
thanks,
Star Strider
Star Strider 2014 年 9 月 24 日
My pleasure!

サインインしてコメントする。

Community Treasure Hunt

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

Start Hunting!

Translated by