Linear Regression

Requires a Wolfram Notebook System

Interact on desktop, mobile and cloud with the free Wolfram CDF Player or other Wolfram Language products.

Requires a Wolfram Notebook System

Edit on desktop, mobile and cloud with any Wolfram Language product.

This Demonstration shows linear regression in action. You can use it to tune a straight line to fit the data and then see the result in the cost function landscape. The optimal solution is also shown.

Contributed by: Mikel Landajuela (March 2018)
Open content licensed under CC BY-NC-SA



The hypothesis in linear regression is a fit of the data in the form

with the associated (least-squares) cost function


The problem is to find such that is minimized.

Feedback (field required)
Email (field required) Name
Occupation Organization
Note: Your message & contact information may be shared with the author of any specific Demonstration for which you give feedback.