필터 지우기
필터 지우기

the mean and std value of a standard normal distribution

조회 수: 2 (최근 30일)
yue li
yue li 2018년 8월 28일
댓글: yue li 2018년 8월 28일
Hello,
I used matlab example https://www.mathworks.com/help/stats/normal-distribution.html
Compute the pdf of a standard normal distribution, with parameters µ equal to 0 and σ equal to 1. The mean value of norm should be 0, and the std value of norm should be 1.
Why the mean value of norm is 0.1636, and the std value is 0.1408?
Thanks in advance!
Yue
x = [-3:.1:3];
norm = normpdf(x,0,1);
>> norm_mean=mean(norm)
norm_mean =
0.1636
>> norm_std=std(norm)
norm_std =
0.1408
  댓글 수: 2
Adam
Adam 2018년 8월 28일
You are taking the mean and std of the values on the y axis of the pdf, not the x axis, which is a fairly meaningless statistic.
yue li
yue li 2018년 8월 28일
편집: yue li 2018년 8월 28일
Hello, Adam,
Thank you so much for your great help!
Yue

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

채택된 답변

Image Analyst
Image Analyst 2018년 8월 28일
norm() is a built-in function so don't use that for your variable name.
Try using randn() and then using mean() and std() on that.
  댓글 수: 1
yue li
yue li 2018년 8월 28일
Hello, Image Analyst,
Thank you do much for your reminding!
Yue

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

추가 답변 (0개)

Community Treasure Hunt

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

Start Hunting!

Translated by