diff --git a/docs/statlab_corr_spearman_rho.rst b/docs/statlab_corr_spearman_rho.rst index 2da2edf3..71131a94 100644 --- a/docs/statlab_corr_spearman_rho.rst +++ b/docs/statlab_corr_spearman_rho.rst @@ -71,9 +71,9 @@ We can calculate the rank of a single sample as R_{i^*1} = s1 + \frac{s2+1}{2} = n - s3 - \frac{s-1}{2}. -For a vector, `pandas.DataFrame` has the `rank` function with `method='average'` option to calculate rank as defined in :eq:`eq_rank`. -In `R`, that can be calculated using the `rank` function with `ties.method='average'` option. -See reference [2]_ for ranking in `Julia`. +For a vector, ``pandas.DataFrame`` has the ``rank`` function with ``method='average'`` option to calculate rank as defined in :eq:`eq_rank`. +In ``R``, that can be calculated using the ``rank`` function with ``ties.method='average'`` option. +See reference [2]_ for ranking in ``Julia``. The Spearman's :math:`\rho` can be calculated as: @@ -141,6 +141,8 @@ To use ``scipy.stats`` [3]_: rho, p_value = spearmanr(y1, y2) print("Spearman's rho:", rho) + + ************* Reference *************