Note: This page has been translated by MathWorks. Please click here

To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

Correlation coefficients

`R = corrcoef(A)`

`R = corrcoef(A,B)`

```
[R,P] =
corrcoef(___)
```

```
[R,P,RL,RU]
= corrcoef(___)
```

`___ = corrcoef(___,Name,Value)`

returns
the matrix of correlation
coefficients for `R`

= corrcoef(`A`

)`A`

, where the columns of `A`

represent
random variables and the rows represent observations.

`[`

returns the matrix of correlation
coefficients and the matrix of p-values for testing the hypothesis
that there is no relationship between the observed phenomena (null
hypothesis). Use this syntax with any of the arguments from the previous
syntaxes. If an off-diagonal element of `R`

,`P`

] =
corrcoef(___)`P`

is smaller
than the significance level (default is `0.05`

),
then the corresponding correlation in `R`

is considered
significant. This syntax is invalid if `R`

contains
complex elements.

`___ = corrcoef(___,`

returns any of the output arguments from the previous syntaxes with additional
options specified by one or more `Name,Value`

)`Name,Value`

pair arguments.
For example, `corrcoef(A,'Alpha',0.1)`

specifies a 90%
confidence interval, and `corrcoef(A,'Rows','complete')`

omits
all rows of `A`

containing one or more `NaN`

values.

[1] Fisher, R.A. *Statistical Methods for Research
Workers*, 13th Ed., Hafner, 1958.

[2] Kendall, M.G. *The Advanced Theory of Statistics*,
4th Ed., Macmillan, 1979.

[3] Press, W.H., Teukolsky, S.A., Vetterling, W.T., and Flannery,
B.P. *Numerical Recipes in C*, 2nd Ed., Cambridge
University Press, 1992.

`cov`

| `mean`

| `plotmatrix`

| `std`

Was this topic helpful?