yHat method Null safety

double yHat(
  1. double x
)

Implementation

double yHat(double x) => (m * sumY + p * (num * x - sumX)) / (num * m);