| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → Statistics Toolbox |
| Contents | Index |
| Learn more about Statistics Toolbox |
| On this page… |
|---|
The probability density function for the extreme value distribution with location parameter µ and scale parameter σ is
![]()
If T has a Weibull distribution with parameters a and b, then log T has an extreme value distribution with parameters µ = log a and σ = 1/b.
Extreme value distributions are often used to model the smallest or largest value among a large set of independent, identically distributed random values representing measurements or observations. The extreme value distribution is appropriate for modeling the smallest value from a distribution whose tails decay exponentially fast, for example, the normal distribution. It can also model the largest value from a distribution, such as the normal or exponential distributions, by using the negative of the original values.
For example, the following fits an extreme value distribution to minimum values taken over 1000 sets of 500 observations from a normal distribution:
xMinima = min(randn(1000,500), [], 2); paramEstsMinima = evfit(xMinima); y = linspace(-5,-1.5,1001); hist(xMinima,-4.75:.25:-1.75); p = evpdf(y,paramEstsMinima(1),paramEstsMinima(2)); line(y,.25*length(xMinima)*p,'color','r')

The following fits an extreme value distribution to the maximum values in each set of observations:
xMaxima = max(randn(1000,500), [], 2); paramEstsMaxima = evfit(-xMaxima); y = linspace(1.5,5,1001); hist(xMaxima,1.75:.25:4.75); p = evpdf(-y,paramEstsMaxima(1),paramEstsMaxima(2)); line(y,.25*length(xMaxima)*p,'color','r')

Although the extreme value distribution is most often used as a model for extreme values, you can also use it as a model for other types of continuous data. For example, extreme value distributions are closely related to the Weibull distribution. If T has a Weibull distribution, then log(T) has a type 1 extreme value distribution.
The function evfit returns the maximum likelihood estimates (MLEs) and confidence intervals for the parameters of the extreme value distribution. The following example shows how to fit some sample data using evfit, including estimates of the mean and variance from the fitted distribution.
Suppose you want to model the size of the smallest washer in each batch of 1000 from a manufacturing process. If you believe that the sizes are independent within and between each batch, you can fit an extreme value distribution to measurements of the minimum diameter from a series of eight experimental batches. The following code returns the MLEs of the distribution parameters as parmhat and the confidence intervals as the columns of parmci.
x = [19.774 20.141 19.44 20.511 21.377 19.003 19.66 18.83]; [parmhat, parmci] = evfit(x) parmhat = 20.2506 0.8223 parmci = 19.644 0.49861 20.857 1.3562
You can find mean and variance of the extreme value distribution with these parameters using the function evstat.
[meanfit, varfit] = evstat(parmhat(1),parmhat(2)) meanfit = 19.776 varfit = 1.1123
The following code generates a plot of the pdf for the extreme value distribution.
t = [-5:.01:2]; y = evpdf(t); plot(t,y)

The extreme value distribution is skewed to the left, and its general shape remains the same for all parameter values. The location parameter, mu, shifts the distribution along the real line, and the scale parameter, sigma, expands or contracts the distribution. This example plots the probability function for different combinations of mu and sigma.
x = -15:.01:5;
plot(x,evpdf(x,2,1),'-', ...
x,evpdf(x,0,2),':', ...
x,evpdf(x,-2,4),'-.');
legend({'mu = 2, sigma = 1', ...
'mu = 0, sigma = 2', ...
'mu = -2, sigma = 4'}, ...
'Location','NW')
xlabel('x')
ylabel('f(x|mu,sigma)')

Continuous Distributions (Data)
![]() | Exponential Distribution | F Distribution | ![]() |

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |