필터 지우기
필터 지우기

transforming the distribution of variables

조회 수: 5 (최근 30일)
John
John 2012년 4월 4일
Hello,
Would anybody know if there is a function in matlab to transform a continuous random variable x to a uniform distribution by using a cumulative distribution function (cdf) transformation?
Any comments and suggestions welcome.
Thank you
John

채택된 답변

Oleg Komarov
Oleg Komarov 2012년 4월 4일
You can call cdf specifying the type of distribution or you can call directly the specific distribution function. For a list of supported cdfs: cumulative distributions.
An example:
x = randn(1000,1);
y = normcdf(x,0,1);
hist(y,100)
  댓글 수: 2
John
John 2012년 4월 4일
Hello Oleg,
Thank you for your reply.
So as I understand this, using the cdf function returns the cumulative distribution of the data of a specified distribution.
Would you know how I could use the cdf to then transform the continuous random variable to a uniform distribution?
Apologies if this sounds like a silly question, I only have basic statistics?
Thank you
John
Oleg Komarov
Oleg Komarov 2012년 4월 4일
The Cumulative Distribution Function (CDF) maps some values into [0,1], i.e. uniform distribution on [0,1].

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

태그

Community Treasure Hunt

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

Start Hunting!

Translated by