code: def expected_number_of_purchases_up_to_time(self, t):
          
          r, alpha, s, beta = self._unload_params("r", "alpha", "s", "beta")
          first_term = r * beta / alpha / (s - 1)
          second_term = 1 - (beta / (beta + t)) ** (s - 1)
          return first_term * second_term
docs: Return expected number of repeat purchases up to time t.
  
          Calculate the expected number of repeat purchases up to time t for a
          randomly choose individual from the population.
  
          Parameters
          ----------
          t: array_like
              times to calculate the expectation for.
  
          Returns
          -------
          array_like