Skip to content
All apps

Multiple regression (3D)

About this app

Explore point cloud and regression plane interactively — drag points, mix data, reveal residuals.

The idea

In multiple linear regression a target variable y depends on several predictors, here x₁ and x₂. The model y = β₀ + β₁x₁ + β₂x₂ is then no longer a line but a plane in space. Ordinary least squares (OLS) chooses the coefficients so that the sum of squared residuals is as small as possible. A residual is the vertical distance from a data point to the plane in the y direction. The coefficient of determination R² gives the share of the variation in y that x₁ and x₂ explain.

What the app shows

A point cloud floats above the ground together with the fitted regression plane. You can show the residuals as lines and the squared errors as squares. The control panel sets the number of points and the noise level and reshuffles the data. The model panel shows the fitted model with coefficients β₀, β₁, β₂ and R². Whenever the data change, the plane is refitted immediately.

Try it yourself

Drag one point far upwards and see how much a single outlier tilts the plane. Double-click the ground to add a point and right-click a point to remove it. Turn on “Squares”: the total area of these squares is exactly what OLS minimises. Increase the noise and compare how R² drops even though the plane stays in a similar place.

Frequently asked questions

What is multiple linear regression?
A model that describes a target y as a linear function of several predictors, for example y = β₀ + β₁x₁ + β₂x₂ + error. With two predictors its graph is a plane. The coefficients are usually estimated by least squares.
What does least squares minimise?
The sum of squared residuals, i.e. the squared vertical distances between observed and fitted values. Squaring gives large deviations extra weight, which is why outliers can strongly affect the estimate.
What does R² mean in regression?
R² is the share of the variation in y explained by the model. R² = 1 means all points lie on the plane; R² = 0 means the model is no better than the mean of y. A high R² alone does not prove a causal relationship.
Can I place my own points in the app?
Yes. Double-click the ground to add a point, right-click to remove one, and drag existing points up or down. The regression plane updates live every time.

Subject: Analysis (multivariable)

More from Analysis (multivariable)

A VisuApp by heyprof: interactive, free in your browser, no sign-up. What is a VisuApp? · All apps