<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def recursive_mean(self, mean, length, chain):
 r"""Compute the chain mean recursively. Instead of computing the mean :math:`\bar{x_n}` of the entire chain, use the last computed mean :math:`bar{x_j}` and the tail of the chain to recursively estimate the mean. .. math:: \bar{x_n} & = \frac{1}{n} \sum_{i=1}^n x_i & = \frac{1}{n} (\sum_{i=1}^j x_i + \sum_{i=j+1}^n x_i) & = \frac{j\bar{x_j}}{n} + \frac{\sum_{i=j+1}^n x_i}{n} :Parameters: - mean : array Previous mean. - length : int Length of chain used to compute the previous mean. - chain : array Sample used to update mean. """

        n = length + len(chain)
        return length * mean / n + chain.sum(0) / n