I have a vector of waves' height values sorted descendly and I've used a Gumbel distribution (extreme value distribution) in order to fit them. I need to determinate the equtions of the two lines that delitmitate the confidence interval but i don't know how to estimate te CI for each value of my distribution. I've tried in this way but i'm sure it's wrong.
Tr_Gumbel=[1.0001:0.1:2 2.5:1:500];%return time vector
P_Gumbel=1-1./Tr_Gumbel; %CDF for Gumbel
H_Gumbel=epsilon+teta*(-log(-log(P_Gumbel))); %Equation of the model that describes waves' height
figure semilogx(Tremp,campioneHm0,'k.','markersize',10);xlabel('T_r [anni]','FontWeight','bold');ylabel('Hm_{0} [m]','FontWeight','bold');title('ANALISI DEGLI ESTREMI');grid on;hold onsemilogx(Tr_Gumbel,H_Gumbel,'r-');xticks([0 2 5 10 20 30 50 100 250 500]);legend('Hm_{0} osservata',['Gumbel \theta=' num2str(teta) ' \epsilon= ' num2str(epsilon)],'FontWeight','bold','Color','w','Location','southeast')c1=0.64;c2=9;c3=0.93;c4=0;c5=1.33;v=1;%quanto vale questo parametro ???
s_z=sqrt((1+c1*(H_Gumbel-c4+c5*log(v)^2*exp(c2/N^(4/3)+c3*sqrt((-log(v)))))/(N)));s_tr=varianza^(0.5)*s_z;curva_up=H_Gumbel+1.96*s_tr;curva_down=H_Gumbel-1.96*s_tr;figure semilogx(Tremp,campioneHm0,'k.','markersize',10);xlabel('T_r [anni]','FontWeight','bold');ylabel('Hm_{0} [m]','FontWeight','bold');title('STIMA DELLA CONFIDENZA AL 90%');grid on;hold onsemilogx(Tr_Gumbel,H_Gumbel,'r-');semilogx(Tr_Gumbel,curva_up,'b--');semilogx(Tr_Gumbel,curva_down,'b--');
Best Answer