LinearBestFit.php 526 B

1234567891011121314151617181920
  1. <?php
  2. return [
  3. [
  4. 'slope' => [-1.1, -1.1064189189190],
  5. 'intersect' => [14.1, 14.081081081081],
  6. 'goodnessOfFit' => [0.873138, 0.8731378215564962],
  7. 'equation' => 'Y = 14.08 + -1.11 * X',
  8. [3, 10, 3, 6, 8, 12, 1, 4, 9, 14],
  9. [8, 2, 11, 6, 5, 4, 12, 9, 6, 1],
  10. ],
  11. [
  12. 'slope' => [1.0, 1.0],
  13. 'intersect' => [-2.0, -2.0],
  14. 'goodnessOfFit' => [1.0, 1.0],
  15. 'equation' => 'Y = -2 + 1 * X',
  16. [1, 2, 3, 4, 5],
  17. [3, 4, 5, 6, 7],
  18. ],
  19. ];