How to calculate a transformed distribution in Matlab?

9 views (last 30 days)
Assume that I have a random variable X following some distribution, for example normal distribution. Is there an easy way to calculate what is the distribution of a function of that random variable? In other words I'm looking for an equivivalent functions such as
makedist(), seems only to take well-known distributions as an argument. So I can't plug a function of them as an argument.
I know that I can most often calculate the transformation by hand using special functions, but that makes it impossible to use commands like cdf and especially icdf. I would very much like Matlab to recognize my transformed distribution as a distribution to use these functionalities.

Answers (1)

Jeff Miller
Jeff Miller on 12 Oct 2020
Depending on the transformations you have in mind, you may be able to do what you want with Cupid. It's transformation distributions are again distributions, so you can get their pdfs, cdfs, etc (and, you can also transform them further).
Lots of standard transformations are pre-defined, and in principle you could use any monotonic transformation for which you can supply your own transformation and inverse-transform functions. You do have to watch out for numerical problems, though.

Products


Release

R2020b

Community Treasure Hunt

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

Start Hunting!