MATLAB: Does EVRND function in the Statistics toolbox give results that seem counter intutive

Statistics and Machine Learning Toolbox

I am using the EVRND function as below:
>> evrnd(0,1)
I run it 10, 10000, 10^6 times and then calculate the mean and standard deviation. The function returns the mean as -0.58 and the standard deviation as 1.28. I was expecting the mean to be in the range [0, 1].

Best Answer

There are two versions of the Extreme Value (EV) distributions, one for the minimum, and the other for the maximum. These versions are just mirror images of each other. We use the minimum version in our functions for Extreme Value Distribution. All the EV* functions in MATLAB are correct, given the definition that we use.
Our generalized extreme value (GEV) functions use the maximum orientation for the EV distribution. The function GEVRND can be used produce this type of extreme value random numbers.