Why does this probability density function looks off?
이전 댓글 표시
I have a random variable x which has a mean of 10 and a variance of 16. I used the following code to generate the array and the PDF:
x= randn(100,1) * sqrt(16)+10;
mu = 10;
sigma = 4;
pd = makedist('Normal',mu,sigma);
y=pdf(pd,x);
hist(y)
Should i be plotting with something other than hist or is x itself wrong? Thank you.
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Uniform Distribution (Continuous)에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

