def directional_variance(X, w):
 return sum((directional_variance_i(x_i, w) for x_i in X))

def directional_variance ( X , w ) : return sum ( ( directional_variance_i ( x_i , w ) for x_i in X ) )
the variance of the data in the direction w .