Skewed and heavy-tailed parametric distributions are widely used to model asymmetric data and tail-risk behaviour, particularly in applications such as modeling asset returns, and are commonly employed in Bayesian statistical frameworks. This repository brings together these and related parametric distributions in a consistent, MATLAB-compatible framework for the wider statistics community.
Each distribution is designed to:
- Integrate seamlessly with Statistics and Machine Learning Toolbox™
- Support PDF, CDF, ICDF, random generation, and fitting
- Be usable with standard MATLAB® functions such as:
makedistfitdistrandomcdf,pdf,icdfmean,var,std
The repository focuses on clarity, numerical stability, and compatibility with MATLAB's distribution framework. For detailed documentation please visit:
or run
skewdoc - MATLAB® R2022b or newer (recommended)
- Statistics and Machine Learning Toolbox™
Get the latest version of the toolbox from releases.
Install by double-clicking on the file or:
matlab.addons.install("skewdists.mltbx") Once installed, run (once) the command below to refresh the Statistics and Machine Learning Toolbox with the new options:
makedist -reset | Distribution | Class Name |
|---|---|
| Epsilon-Skew-Normal | EpsilonSkewNormalDistribution |
| Inverse-Gamma | InverseGammaDistribution |
| Log-Gamma | LoggammaDistribution |
| Skew-Normal | SkewNormalDistribution |
| Split-Normal | SplitNormalDistribution |
| Skew-t | SkewTDistribution |
% Create a distribution object
pd = makedist("SkewNormal", 0, 1, 5);
% Evaluate the PDF
x = linspace(-5, 5, 200);
y = pdf(pd, x);
% Random sampling
r = random(pd, 10000, 1);
% Fit a distribution to data
pdHat = fitdist(r, 'skewnormal');
% plot the fitted results
figure(Color = "w");
histogram(r, 100, Normalization = "pdf")
hold on;
x = linspace(-1, 5, 200);
y = pdf(pdHat, x);
line(x, y, LineWidth = 2)
├── README.md
├── SECURITY.md
├── License.txt
├── buildfile.m
├── tbx
│ ├── skewdist
| ├── skewdoc
│ ├── +prob
│ ├── EpsilonSkewNormalDistribution.m
│ ├── InverseGammaDistribution.m
│ ├── LoggammaDistribution.m
│ ├── SkewNormalDistribution.m
│ ├── SplitNormalDistribution.m
│ └── SkewTDistribution.m
│ ├── doc
│ ├── EpsilonSkewNormalDistribution.md
│ ├── InverseGammaDistribution.md
│ ├── LoggammaDistribution.md
│ ├── SkewNormalDistribution.md
│ ├── SplitNormalDistribution.md
│ └── SkewTDistribution.md
tbx/skewdist/+prob/*.mfiles contain the distribution class implementations.tbx/doc/contains one Markdown file per distribution, documenting:- Mathematical definition
- Parameters and constraints
- Supported methods
- Usage examples
- Implementation notes
Each new distribution should include:
- A
.mclass file implementing the distribution - A corresponding documentation file in
tbx/doc/ - Full support for
pdf,cdf,icdf,mean,var,std,fitdist,makedist
