Loading [MathJax]/extensions/tex2jax.js
scipy 1.10.1 Pypi GitHub Homepage
Other Docs

ParametersReturns
PearsonRResult.confidence_interval(self, confidence_level=0.95)

Compute the confidence interval for the correlation coefficient statistic with the given confidence level.

The confidence interval is computed using the Fisher transformation F(r) = arctanh(r) . When the sample pairs are drawn from a bivariate normal distribution, F(r) approximately follows a normal distribution with standard error 1/sqrt(n - 3), where n is the length of the original samples along the calculation axis. When n <= 3, this approximation does not yield a finite, real standard error, so we define the confidence interval to be -1 to 1.

Parameters

confidence_level : float

The confidence level for the calculation of the correlation coefficient confidence interval. Default is 0.95.

Returns

ci : namedtuple

The confidence interval is returned in a namedtuple with fields low and high.

The confidence interval for the correlation coefficient.

Examples

See :

Local connectivity graph

Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.

Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)

SVG is more flexible but power hungry; and does not scale well to 50 + nodes.

All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them


GitHub : /scipy/stats/_stats_py.py#4181
type: <class 'function'>
Commit: