CorrelationResult
The result of a correlation computation.
Example:
val result = pearsonCorrelation(x, y)
result.coefficient // correlation coefficient (-1.0 to 1.0)
result.pValue // two-sided p-value for H0: r = 0
result.n // number of observationsContent copied to clipboard
Properties
Link copied to clipboard
the correlation coefficient, ranging from -1.0 (perfect negative correlation) through 0.0 (no correlation) to 1.0 (perfect positive correlation). Returns Double.NaN when the correlation is undefined (e.g. constant input).
Link copied to clipboard
the two-sided p-value for testing the null hypothesis that the true correlation is zero. Smaller values indicate stronger evidence of a real association. Returns Double.NaN when the p-value cannot be computed.