Reggie's Linear Regression

CodeCademy Python Practice Problems

Project Goals & Premise

Reggie is a mad scientist who has been hired by the local fast food joint to build their newest ball pit in the play area. As such, he is working on researching the bounciness of different balls so as to optimize the pit. He is running an experiment to bounce different sizes of bouncy balls, and then fitting lines to the data points he records. He has heard of linear regression, but needs your help to implement a version of linear regression in Python.

Linear Regression is when you have a group of points on a graph, and you find a line that approximately resembles that group of points. A good Linear Regression algorithm minimizes the error, or the distance from each point to the line. A line with the least error is the line that fits the data the best. We call this a line of best fit.

In this project, you’ll combine your knowledge of loops, lists, and arithmetic to create a function that will find a line of best fit when given a set of data.

(CodeCademy.com - Data Science Pathway)