def parameters(log_r_inf, log_r_time):
    """
    Fit parameters of the linear regression model.
    :param log_r_time: array, the total number of retweets at an observation time for all tweet
    :param log_r_inf: array, the total number of retweets at the prediction time for all tweet
    :return: tuple, the linear regression model parameters (alpha and variance)
    """
    alpha = sum([(log_r_inf[i] - log_r_time[i]) for i in range(len(log_r_time))]) / len(log_r_time)
    var = sum([(log_r_inf[i] - log_r_time[i] - alpha) ** 2 for i in range(len(log_r_time))]) / len(log_r_time)
    return alpha, var