Note: This page has been translated by MathWorks. Click here to see

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

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

Kruskal-Wallis test

`p = kruskalwallis(x)`

`p = kruskalwallis(x,group)`

`p = kruskalwallis(x,group,displayopt)`

```
[p,tbl,stats]
= kruskalwallis(___)
```

returns
the `p`

= kruskalwallis(`x`

)*p*-value for the null hypothesis that the data
in each column of the matrix `x`

comes from the
same distribution, using a Kruskal-Wallis test. The alternative
hypothesis is that not all samples come from the same distribution. `kruskalwallis`

also
returns an ANOVA table and a box plot.

returns
the `p`

= kruskalwallis(`x`

,`group`

,`displayopt`

)*p*-value of the test and lets you display or
suppress the ANOVA table and box plot.