# dask.array.stats.chisquare

### dask.array.stats.chisquare(f_obs, f_exp=None, ddof=0, axis=0)

Calculate a one-way chi-square test.

Please see the docstring for [`scipy.stats.chisquare()`](https://docs.scipy.org/doc/scipy/reference/generated/scipy.stats.chisquare.html#scipy.stats.chisquare) for
complete information including notes, references, and examples.

Some inconsistencies with the Dask version may exist.

The chi-square test tests the null hypothesis that the categorical
data has the given frequencies.

* **Parameters:**
  **f_obs**
  : Observed frequencies in each category.

  **f_exp**
  : Expected frequencies in each category.  By default the categories are
    assumed to be equally likely.

  **ddof**
  : “Delta degrees of freedom”: adjustment to the degrees of freedom
    for the p-value.  The p-value is computed using a chi-squared
    distribution with `k - 1 - ddof` degrees of freedom, where k
    is the number of observed frequencies.  The default value of ddof
    is 0.

  **axis**
  : The axis of the broadcast result of f_obs and f_exp along which to
    apply the test.  If axis is None, all values in f_obs are treated
    as a single data set.  Default is 0.
* **Returns:**
  res: Delayed Power_divergenceResult
  : An object containing attributes:
    <br/>
    chisq
    : The chi-squared test statistic.  The value is a float if axis is
      None or f_obs and f_exp are 1-D.
    <br/>
    pvalue
    : The p-value of the test.  The value is a float if ddof and the
      return value chisq are scalars.

<!-- !! processed by numpydoc !! -->
