def get_hypothesis(x, theta):
    """
        :param x        : scalar of a given sample
        :param theta    : 1D array of the trainable parameters
    """
    
    hypothesis = 0.0
    for t in range(len(theta)):
        # compute prediction by raising x to each power t
        hypothesis += theta[t] * (x ** t)
    
    return hypothesis