필터 지우기
필터 지우기

Is the description of mvnrnd a little bit misleading?

조회 수: 1 (최근 30일)
Mr M.
Mr M. 2017년 6월 17일
편집: Jochem Bonarius 2019년 7월 19일
Input SIGMA is said to be the covariance, but in case of uncorrelated variables this means that SIGMA = sigma^2, isn't it?
  댓글 수: 1
Jochem Bonarius
Jochem Bonarius 2019년 7월 19일
편집: Jochem Bonarius 2019년 7월 19일
Only for a single vaiable. If more, then it's
SIGMA = I^N * [sigma_1^2 sigma_2^2 ... sigma_N^2] or diag([sigma_1^2 sigma_2^2 ... sigma_N^2])

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

답변 (4개)

Walter Roberson
Walter Roberson 2017년 6월 18일
In this situation, it is confusing unless you read and think about the small print. I hit exactly this problem myself and spent a good hour trying to figure out it before I read the documentation more carefully. It might make sense to people with a lot of experience in statistics, but for the rest of us, the term "sigma" is strongly associated with standard deviation, not with variance.

John D'Errico
John D'Errico 2017년 6월 17일
편집: John Kelly 2017년 6월 22일
"covariance matrix SIGMA."
"SIGMA is a D-by-D symmetric positive semi-definite matrix"
"If the covariance matrix is diagonal, containing variances along the diagonal and zero covariances off the diagonal, SIGMA may also be specified as a 1-by-D matrix..."
So SIGMA is stated to be a covariance matrix in multiple places, or at least, a vector of variances. The diagonal elements of a covariance matrix are known to be VARIANCES, not standard deviations. That some people may often use the lower case greek letter sigma to indicate a standard deviation means you need to be careful. But a variable name like this means nothing out of context.

Gregory Canal
Gregory Canal 2019년 7월 18일
The other concern I have with this notation is that you would expect the behavior of mvnrnd in 1 dimension to reduce to normrnd. But 'sigma' in 1 dimension is defined differently in both functions (variance vs standard deviation).
  댓글 수: 1
Steven Lord
Steven Lord 2019년 7월 18일
There is a note in the Tips section on the mvnrnd documentation page describing this difference in behavior between mvnrnd and normrnd.
If you feel that information should be made more prominent, or if you have other feedback about that page, I recommend using the "How useful was this information?" box at the bottom of the page to rate the page and offer feedback about what you feel should be added, removed, or reworked in the documentation. [For feedback about the functionality, you should probably send that to Technical Support.]

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


Jochem Bonarius
Jochem Bonarius 2019년 7월 19일
편집: Jochem Bonarius 2019년 7월 19일
So the problem is actually in mathematic notation. I will use Wikipedia for my explanation, as it is accurate enough.
The standard deviation is often represented by the lower case Greek letter σ.
The covariance matrix is often represented by the upper case Greek letter Σ.
What the software developer did, probably in attempt to mimick scientific notation, is use lower case "sigma" to represent σ and upper case "SIGMA" to represent Σ. But this is of course very confusing. And it misses the purpose of using a single character to represent a value, by changing it into a full word.
What the software developer should have done, from a UI perspective, is just call the inputs "standard_deviation" and "covariance_matrix".

카테고리

Help CenterFile Exchange에서 Descriptive Statistics에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by