简体   繁体   中英

Matlab, is there any way to manipulate random variable

In Maple, there is some feature that allows you to calculate the pdf of a function of a random variable. For example, if X is exponentially distributed, and you want to know the distribution of X^2, then there is a function that will do that for you.

My question is , is there a functionality in matlab that allows you to do so? I have looked through the matlab's guide, but I didn't see it.

The Statistics toolbox includes many probability distributions for you to choose from, both parametric and non-parametric distributions. For each it provides functions for PDF, CDF, fitting, random number generation, etc..

I suggest you start with the "Distribution Fitting app": dfittool .


EDIT:

In addition, MuPAD has support for a number of distributions , which you can manipulate symbolically. Example:

mupad_symbolic_math_toolbox

The function intlib::changevar might be of interest here, though it seems intended for integrals...

Also, if you're interested in getting the values of the PMF, or discrete PDF, then, given x some RV with some distribution,

my_pmf = hist(x)/sum(x);

So try,

doc hist

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM