<title>Spearman Rank Correlation</title>
<description>## Class: `Spearman`</description>
<keywords>spearman, rank, correlation, class, public, fields, js, new, x, number, y, s</keywords>

# Spearman Rank Correlation

## Class: `Spearman`

**Constructor**

```js
new Spearman({ X: number[], Y: number[] })
```

### Public fields

- `r: number` – Spearman’s rho
- `t: number` – t‑approximation of significance
- `p: number` – two‑sided p‑value
- `n: number` – number of paired observations (shorter input is trimmed)
