def chisquare_univariate(observed, expected, start=0):
    """
    Computes the chi-square statistic for chi-square tests.
    :param observed: (List) array of observations.
    :param expected: (List) array of expected values.
    :param start: (int) index of array from where to start
    :return: (Float) the chi-square statistic.
    """
    K = len(observed)
    value = 0
    for x in range(start, K):
        value += ((observed[x] - expected(x)) ** 2) / expected(x)
    return value