Line of Best Fit for 3D scatter plot?

In summary, the conversation discusses adding a line of best fit to a 3D scatter plot and the asker is looking for a simple method or program to do so. A suggestion is made to use the "LinEst" function in Excel and a link is provided for further reference.
  • #1
Crabman
2
0
Hi all,

I'm having problems with something I'd like to do.

Basically I have a 3D scatter plot and would like to add a line of best fit to it, I've googled this but most of the answers I get are incomprehensible to me (I'm a chemistry PhD student and my maths isn't amazing).

Does anyone know a program or a method for doing this? The easier the better! (I have access to GUNplot and MATLAB if that helps but am not that familiar with either)

Many thanks in advance.
 
Mathematics news on Phys.org
  • #2
You'd probably find something like excel spreadsheet the most accessible.

Use the "LinEst" function (should be listed under "statistical functions").

Hint. Highlight two cells in adjacent columns before selecting "LinEst" and also hold both "ctrl" and "shift" when you click the final ok (needed to make a function return two values, gradient and y-intercept in this case).
 
  • #3
Crabman said:
Hi all,

I'm having problems with something I'd like to do.

Basically I have a 3D scatter plot and would like to add a line of best fit to it, I've googled this but most of the answers I get are incomprehensible to me (I'm a chemistry PhD student and my maths isn't amazing).

Does anyone know a program or a method for doing this? The easier the better! (I have access to GUNplot and MATLAB if that helps but am not that familiar with either)

Many thanks in advance.

Maybe you have already found this:

http://mathforum.org/library/drmath/view/69103.html

Or maybe not. :smile:
 

Related to Line of Best Fit for 3D scatter plot?

1. What is a line of best fit for a 3D scatter plot?

A line of best fit for a 3D scatter plot is a straight line that represents the overall trend or relationship between three variables in the data. It is used to visually depict the general direction of the data points in the scatter plot and can be used to make predictions or draw conclusions about the relationship between the variables.

2. How is a line of best fit calculated for a 3D scatter plot?

The line of best fit is calculated by finding the equation of the line that minimizes the distance between the line and all of the data points in the scatter plot. This can be done using various mathematical methods, such as least squares regression or gradient descent.

3. What does the slope of a line of best fit represent in a 3D scatter plot?

The slope of a line of best fit represents the rate of change between two variables in the data. In a 3D scatter plot, it represents the change in one variable as the other two variables are held constant.

4. How do you interpret the R-squared value for a line of best fit in a 3D scatter plot?

The R-squared value, also known as the coefficient of determination, represents the proportion of variation in the data that can be explained by the line of best fit. In other words, it measures how well the line fits the data points. A higher R-squared value indicates a better fit, while a lower value indicates a weaker fit.

5. Can a line of best fit be used to make predictions in a 3D scatter plot?

Yes, a line of best fit can be used to make predictions about the relationship between the variables in a 3D scatter plot. By using the equation of the line, you can input values for two variables and predict the value of the third variable. However, it is important to note that this prediction is based on the assumption that the relationship between the variables remains consistent and may not hold true for values outside of the observed data.

Similar threads

  • Nuclear Engineering
Replies
1
Views
1K
Replies
16
Views
2K
Replies
1
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
12
Views
5K
Replies
1
Views
2K
Replies
2
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
14
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
1K
  • STEM Educators and Teaching
Replies
5
Views
876
  • Calculus and Beyond Homework Help
Replies
4
Views
1K
Back
Top