### Navigation

- index
- modules |
- modules |
- next |
- previous |
- SciPy v0.12 Reference Guide (DRAFT) »
- Statistical functions (`scipy.stats`) »

# scipy.stats.cmedian

`scipy.stats.``cmedian`(a, numbins=1000)

  Returns the computed median value of an array.

  All of the values in the input array are used. The input array is first histogrammed using numbins bins. The bin containing the median is selected by searching for the halfway point in the cumulative histogram. The median value is then computed by linearly interpolating across that bin.

  Parameters : | a : array_like Input array. numbins : int The number of bins used to histogram the data. More bins give greater accuracy to the approximation of the median.
  Returns : | cmedian : float An approximation of the median.

  References

  [CRCProbStat2000] Section 2.2.6

  [CRCProbStat2000] | (1, 2) Zwillinger, D. and Kokoska, S. (2000). CRC Standard Probability and Statistics Tables and Formulae. Chapman & Hall: New York. 2000.

### Navigation

- index
- modules |
- modules |
- next |
- previous |
- SciPy v0.12 Reference Guide (DRAFT) »
- Statistical functions (`scipy.stats`) »