# Test That Columns Are Similarly Distributed

One general approach to test if two columns are similarly distributed is using a nonparametric statistic. DBNL offers two such statistics: `scaled_ks_stat` for testing ordinal distributions and `scaled_chi2_stat` for testing nominal distributions.&#x20;

<details>

<summary>Example Test Spec</summary>

```json
{
    "name": "discrepancy_of_text_coherence_score",
    "description": "Test the nonparametric discrepancy of the coherence score distributions",
    "statistic_name": "scaled_ks_stat",
    "statistic_params": {},
    "assertion": {
        "name": "less_than_or_equal_to",
        "params": {
            "other": 0.25,
        },
    },
    "statistic_inputs": [
        {
            "select_query_template": {
                "select": "{EXPERIMENT}.coherence_score"
            }
        },
        {
            "select_query_template": {
                "select": "{BASELINE}.coherence_score"
            }
        },
    ],
}
```

</details>

<figure><img src="https://content.gitbook.com/content/z6EklLimWg9qh5eYpLkw/blobs/SZfWBPb81CwGSkqQZaEx/test-result-scaled-ks.png" alt=""><figcaption><p>Example test on discrepancy of distribution of coherence_score</p></figcaption></figure>
