Repository: scipy/scipy

Issue:
Cumulative density function should be replaced with cumulative distribution function
The phrase "cumulative density function" is not correct, it should be replaced with "cumulative distribution function".

See for instance the description of `cdf` [here](https://docs.scipy.org/doc/scipy-0.16.1/reference/generated/scipy.stats.norm.html).


Discussion:
> The phrase "cumulative density function" is not correct, it should be replaced with "cumulative distribution function".

+1 see e.g. https://en.wikipedia.org/wiki/Cumulative_density_function (which explains why it's incorrect)
Looks like there are several occurrences in the source code: https://github.com/scipy/scipy/search?q=%22cumulative+density%22&unscoped_q=%22cumulative+density%22
@albertcthomas, note that the example that you found is from the documentation of an old version of scipy (0.16.1).  That particular instance has been fixed since then.  The latest version of that documentation, based on the master branch of scipy, is at http://scipy.github.io/devdocs/generated/scipy.stats.norm.html
Indeed... thanks!

Resolving patch:
diff --git a/scipy/special/__init__.py b/scipy/special/__init__.py
--- a/scipy/special/__init__.py
+++ b/scipy/special/__init__.py
@@ -199,7 +199,7 @@
    bdtri        -- Inverse function to `bdtr` with respect to `p`.
    bdtrik       -- Inverse function to `bdtr` with respect to `k`.
    bdtrin       -- Inverse function to `bdtr` with respect to `n`.
-   btdtr        -- Cumulative density function of the beta distribution.
+   btdtr        -- Cumulative distribution function of the beta distribution.
    btdtri       -- The `p`-th quantile of the beta distribution.
    btdtria      -- Inverse of `btdtr` with respect to `a`.
    btdtrib      -- btdtria(a, p, x)
@@ -207,7 +207,7 @@
    fdtrc        -- F survival function.
    fdtri        -- The `p`-th quantile of the F-distribution.
    fdtridfd     -- Inverse to `fdtr` vs dfd
-   gdtr         -- Gamma distribution cumulative density function.
+   gdtr         -- Gamma distribution cumulative distribution function.
    gdtrc        -- Gamma distribution survival function.
    gdtria       -- Inverse of `gdtr` vs a.
    gdtrib       -- Inverse of `gdtr` vs b.
@@ -232,7 +232,7 @@
    pdtrc        -- Poisson survival function
    pdtri        -- Inverse to `pdtr` vs m
    pdtrik       -- Inverse to `pdtr` vs k
-   stdtr        -- Student t distribution cumulative density function
+   stdtr        -- Student t distribution cumulative distribution function
    stdtridf     -- Inverse of `stdtr` vs df
    stdtrit      -- Inverse of `stdtr` vs `t`
    chdtr        -- Chi square cumulative distribution function
diff --git a/scipy/special/add_newdocs.py b/scipy/special/add_newdocs.py
--- a/scipy/special/add_newdocs.py
+++ b/scipy/special/add_newdocs.py
@@ -599,7 +599,7 @@ def add_newdoc(place, name, doc):
 
     See Also
     --------
-    btdtr : Cumulative density function of the beta distribution.
+    btdtr : Cumulative distribution function of the beta distribution.
     btdtri : Inverse with respect to `x`.
     btdtrib : Inverse with respect to `b`.
 
@@ -652,7 +652,7 @@ def add_newdoc(place, name, doc):
 
     See Also
     --------
-    btdtr : Cumulative density function of the beta distribution.
+    btdtr : Cumulative distribution function of the beta distribution.
     btdtri : Inverse with respect to `x`.
     btdtria : Inverse with respect to `a`.
 
@@ -925,7 +925,7 @@ def add_newdoc(place, name, doc):
     r"""
     btdtr(a, b, x)
 
-    Cumulative density function of the beta distribution.
+    Cumulative distribution function of the beta distribution.
 
     Returns the integral from zero to `x` of the beta probability density
     function,
@@ -947,8 +947,8 @@ def add_newdoc(place, name, doc):
     Returns
     -------
     I : ndarray
-        Cumulative density function of the beta distribution with parameters
-        `a` and `b` at `x`.
+        Cumulative distribution function of the beta distribution with
+        parameters `a` and `b` at `x`.
 
     See Also
     --------
@@ -2431,7 +2431,7 @@ def add_newdoc(place, name, doc):
 
     F cumulative distribution function.
 
-    Returns the value of the cumulative density function of the
+    Returns the value of the cumulative distribution function of the
     F-distribution, also known as Snedecor's F-distribution or the
     Fisher-Snedecor distribution.
 
@@ -2794,7 +2794,7 @@ def add_newdoc(place, name, doc):
     r"""
     gdtr(a, b, x)
 
-    Gamma distribution cumulative density function.
+    Gamma distribution cumulative distribution function.
 
     Returns the integral from zero to `x` of the gamma probability density
     function,
@@ -4489,7 +4489,7 @@ def add_newdoc(place, name, doc):
     Show the probability of a gap at least as big as 0, 0.5 and 1.0.
 
     >>> from scipy.special import kolmogorov
-    >>> from scipy.stats import kstwobign 
+    >>> from scipy.stats import kstwobign
     >>> kolmogorov([0, 0.5, 1.0])
     array([ 1.        ,  0.96394524,  0.26999967])
 
@@ -6654,7 +6654,7 @@ def add_newdoc(place, name, doc):
     """
     stdtr(df, t)
 
-    Student t distribution cumulative density function
+    Student t distribution cumulative distribution function
 
     Returns the integral from minus infinity to t of the Student t
     distribution with df > 0 degrees of freedom::
diff --git a/scipy/stats/_continuous_distns.py b/scipy/stats/_continuous_distns.py
--- a/scipy/stats/_continuous_distns.py
+++ b/scipy/stats/_continuous_distns.py
@@ -4002,8 +4002,10 @@ def _cdf(self, x, alpha, beta):
                 data_out[data_mask] = np.array([levy_stable._cdf_single_value_zolotarev(_x, _alpha, _beta)
                             for _x, _alpha, _beta in data_subset]).reshape(len(data_subset), 1)
             else:
-                warnings.warn('Cumulative density calculations experimental for FFT method.' +
-                              ' Use zolatarev method instead.', RuntimeWarning)
+                warnings.warn('FFT method is considered experimental for ' +
+                              'cumulative distribution function ' +
+                              'evaluations. Use Zolotarev’s method instead).',
+                              RuntimeWarning)
                 _alpha, _beta = pair
                 _x = data_subset[:,(0,)]
 


Test patch:
diff --git a/scipy/stats/tests/test_distributions.py b/scipy/stats/tests/test_distributions.py
--- a/scipy/stats/tests/test_distributions.py
+++ b/scipy/stats/tests/test_distributions.py
@@ -1600,7 +1600,9 @@ def test_cdf_nolan_samples(self):
             stats.levy_stable.pdf_fft_min_points_threshold = fft_min_points
             subdata = data[filter_func(data)] if filter_func is not None else data
             with suppress_warnings() as sup:
-                sup.record(RuntimeWarning, "Cumulative density calculations experimental for FFT method.*")
+                sup.record(RuntimeWarning, 'FFT method is considered ' +
+                           'experimental for cumulative distribution ' +
+                           'function evaluations.*')
                 p = stats.levy_stable.cdf(subdata['x'], subdata['alpha'], subdata['beta'], scale=1, loc=0)
                 subdata2 = rec_append_fields(subdata, 'calc', p)
                 failures = subdata2[(np.abs(p-subdata['p']) >= 1.5*10.**(-decimal_places)) | np.isnan(p)]