Programmer Guide/SPU Reference/EXSTAT: Difference between revisions
From STX Wiki
Jump to navigationJump to search
No edit summary |
No edit summary |
||
Line 31: | Line 31: | ||
;Description: | ;Description: | ||
<math>\begin{matrix} | <math>\begin{matrix} | ||
\mu = \frac{\sum_{i=0}^{N-1} x_i px_i}{\sum_{i=0}^{N-1} px_i} & | \mu = \frac{\sum_{i=0}^{N-1} x_i px_i}{\sum_{i=0}^{N-1} px_i} & V = \frac{\sum_{i=0}^{N-1}(x_i-\mu)^2px_i}{\sum_{i=0}^{N-1} px_i} \\ | ||
S = \frac{\sum_{i=0}^{N-1}(x_i-\mu)^3px_i}{\sum_{i=0}^{N-1} px_i} & K = \frac{\sum_{i=0}^{N-1}(x_i-\mu)^4px_i}{\sum_{i=0}^{N-1} px_i} | |||
\end{matrix}</math> | \end{matrix}</math> | ||
{|class="einrahmen" | {|class="einrahmen" | ||
Line 42: | Line 42: | ||
|- | |- | ||
|<var>M2</var> | |<var>M2</var> | ||
|<math> | |<math>V\!</math> | ||
|<math>\frac{ | |<math>\frac{V}{\mu}</math> | ||
|- | |- | ||
|<var>M3</var> | |||
|<math>S\!</math> | |||
|<math>\frac{S}{\sqrt{V^3}}</math> | |||
|} | |} | ||
;See also: | ;See also: | ||
<[[../#Signal Processing Atoms|SP-atoms]]> | <[[../#Signal Processing Atoms|SP-atoms]]> | ||
<!-- AN, 2.5.2011 --> | <!-- AN, 2.5.2011 --> |
Revision as of 11:50, 9 May 2011
Calculation of statistical moments.
[SPU EXSTAT X PX NORM OUT M1 M2 M3 M4 N]
input | description | data type | value type | default value |
---|---|---|---|---|
X | data vector | number, vector | variable | 0,1,..
|
PX | probability vector | number, vector | variable | 1, 1, ...
|
NORM | normalization flag | number (int.), string | constant | 0 (= NO )
|
output | description | data type | value type | comment |
M1 | 1st moment (mean) | number | variable | |
M2 | 2nd moment (variance or spread) | number | variable | |
M2 | 3rd moment (skewness) | number | variable | |
M4 | 4th moment (kurtosis) | number | variable | |
N | number of data samples | number | constant |
Note:
- At least one of the data vectors X and PX must be supplied!
- The number of data points N is set to the length of the vector X or PX.
- If X is a not connected, the x-data are initialized with xi = i.
- If X is a number, the x-data are initialized with xi = X+i.
- If PX is not a vector, the probabilies pxi are set to 1.
- Description
output | NORM=0 |
NORM=1
|
---|---|---|
M1 | ||
M2 | ||
M3 |
- See also
<SP-atoms>