Clear Filters
Clear Filters

How to perform extreme value distribution in Matlab?

2 views (last 30 days)
%Water level observations
WL=[ 6.79 6.89 6.38 5.67 6.91 7.66 6.41 6.04 6.41 5.55 6.93 5.67 6.69 6.51 6.32 7.33 6.43 6.52 6.13 6.72 6.7 7.78 6.18 5.41 6.94 6.51 6.02 5.94 6.08 ];
Now i want to apply gumble distribution for that data which will give me several return period values(50,100,150) along with the probability plot(confidence limit line should be visible on the plot). Gumbel distribution of same data gave 8.27 for 100 year return period with another software whereas matlab gives 8.54 for same return period.In that case i use the following coding,
WL= [ 6.79 6.89 6.38 5.67 6.91 7.66 6.41 6.04 6.41 5.55 6.93 5.67 6.69 6.51 6.32 7.33 6.43 6.52 6.13 6.72 6.7 7.78 6.18 5.41 6.94 6.51 6.02 5.94 6.08 ];
p = fitdist(-WL','ev')
p = extreme value distribution
mu = -6.19143
sigma = 0.512164
val100yr=-evinv(0.01,-6.19143,0.512164)
val100yr = 8.5475
Is there any error here? why this difference? pls help me out

Accepted Answer

José-Luis
José-Luis on 2 May 2013
Hard to say without looking at the i) the formulas, ii) how the formulas are implemented in the code. It could be numerical precision, but it is very difficult to be sure without looking at the implementations. Another alternative is that you are not using the necessary precision when feeding data to evinv(). You could try:
evinv(0.01,mu,sigma)
instead of typing in numerical values, and if that solves the problem, then you should be aware that the value displayed in the screen is usually different from the internal representation (what is stored in memory).
What is "another sofware"?
  3 Comments
José-Luis
José-Luis on 2 May 2013
What has this got to do with your original question? If you have a new question, please ask another one and accept/ask for clarifications in your original question. Note that I have no idea what the different variables in your code are. That being said, copy/pasting from the documentation:
probplot(ax,fun,params) takes a function fun and a set of parameters, params, and adds fitted lines to the axes of an existing probability plot specified by ax. fun is a function handle to a cdf function, specified with @ (for example, @wblcdf). params is the set of parameters required to evaluate fun, and is specified as a cell array or vector. The function must accept a vector of X values as its first argument, then the optional parameters, and must return a vector of cdf values evaluated at X.
ci() are values needed to evaluate normcdf. Please read the documentation and feel free to ask more questions if it is still unclear.
arif rabbani
arif rabbani on 5 May 2013
thank you very much.I have asked a new question which might be more specific to you.Your precise answer is expected there.thanks again.

Sign in to comment.

More Answers (0)

Tags

Community Treasure Hunt

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

Start Hunting!