Clear Filters
Clear Filters

How to fit a (left) skewed distribution

40 views (last 30 days)
Currently, I am using the following code to fit distributions to my data:
pd = fitdist(mydata,distribution)
x_values = 1:1:26;
y = pdf(pd,x_values);
However, as far as I can see all the distributions offered by Matlab are either not skewed or right-skewed. Hence my question: Knowing that my data is left-skewed, how could I fit such a distribution to it?
  1 Comment
Kin Sung Chan
Kin Sung Chan on 23 Apr 2020
histfit(mydata/max(mydata), 30, 'beta'); % let's say using bin = 30.
However, even though it can produce a fit, the 'beta' requires your data to be within 0 and 1.

Sign in to comment.

Accepted Answer

Image Analyst
Image Analyst on 2 Sep 2017
Try fitting the max value minus your data. In other words, flip your distribution right to left.
Maria Amr
Maria Amr on 2 Feb 2021
I have the same problem but my data are right skewed. Would you please direct me how to fit a right skewed distributions? Thank you!

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!