Our Story:
Reggie, the resident mad scientist at a local fast food joint, wants to build the ultimate ball pit. To optimize the bounciness, he's diving into the world of physics with a little help from Python and linear regression! Join us as we build a Python function to find the line that best fits Reggie's bouncy ball data, unraveling the mysteries of bounce height and ball width.
Error Detectives: Calculate the distance between a point and a line (hint: think triangles!), then measure the total error for a line by summing up its distances from all data points. Slope & Intercept Safari: Explore a jungle of different slopes and intercepts (m and b values) to find the one that minimizes the total error, uncovering the line of best fit! Prediction Playground: Armed with the best-fit line, predict the bounce height of any ball Reggie throws in, letting him design the bounciest ball pit the world has ever seen!
- Python
- Lists & Loops
- Arithmetic & Functions
- Clone this repo: git clone Bouncy_ball linear_regression
- Install libraries (optional): pip install matplotlib
- Run the Jupyter notebook: jupyter notebook 'Reggie_Linear_Regression_Skeleton.ipynb'
Follow our journey through the code, experiment with different data, and let's bounce to new heights of scientific understanding!
See a bug? Have a cool extension idea? We welcome contributions! Pull requests and issues are always appreciated.
Reza Sadeghi: https://github.com/xre22zax/