stats.py 398 Bytes
def avg(X):
  return 0

def cov(X, Y):
  return 0

def var(X):
  return 0

# Returns a tuple of (b, m) as per the equations in the
# instructions
def make_model(data):
  b = 0
  m = 0
  return (b, m)

# simple test cases
assert(make_model([(0, 0), (1, 1), (2, 2)]) == (0.0, 1.0))
assert(make_model([(0, 0), (1, 2), (2, 4)]) == (0.0, 2.0))
assert(make_model([(0, 2), (1, 3), (2, 4)]) == (2.0, 1.0))