Probability Density Function
이전 댓글 표시
Hello,
I have a question please: If I have a funcion f(a,b,c,d), how can one assign a certain probability distribution function (e.g. normal distribution) for each of a,b,c,d? The second question is how to calculate the probability density function of f?
Thank you very much.
답변 (1개)
Tom Lane
2012년 5월 10일
This could be a very complicated question depending on how far you want to take it. Here's a simple attempt. You can simulate values of f by simulating values of its inputs. Then you can compute a histogram of the results. For example:
a = 10 + 2*randn(1000,1); % 1000 normal values, mean 10, std dev 2
b = pi*rand(1000,1); % 1000 values uniform between 0 and pi
f = @(a,b) a.*sin(b); % sample f function
e = f(a,b); % simulate f
hist(e,40); % histogram, similar to density function
This code doesn't make use of any toolbox, but you can find functions to generate random numbers from other distributions in the Statistics Toolbox.
카테고리
도움말 센터 및 File Exchange에서 Noncentral t Distribution에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!