Is there a way to insert a 'line of best fit' column in excel based on data in other columns
For example if you were assessing ratings and had columns with rating / runs / wins / strike rate, and the strike rate was not exactly linear, could you add a fifth column with a suggested linear pattern
I want to do this without using graphs or charts if at all possible
You could use FORECAST if there is only one pair of variables.
For example your new column of linear fit values would be
=FORECAST(rating,column of strike rate, column of rating)
You could use FORECAST if there is only one pair of variables.For example your new column of linear fit values would be=FORECAST(rating,column of strike rate, column of rating)
I've realised I used the wrong term in my OP, i dont want the results to be linear, rather they should represent the line of best fit from the data
FORECAST isnt working for me, the strike rate column is running into negative values whereas it should obviously stick at zero or a bit higher for low ratings.
any alternative or fix?.. many thanks
I've realised I used the wrong term in my OP, i dont want the results to be linear, rather they should represent the line of best fit from the dataFORECAST isnt working for me, the strike rate column is running into negative values whereas it should
You can use the INSERT tab to insert a graph of the data. And then if you right click on the line you can "add trendline" and then fiddle about with the best linear, logarthimic, exponential, polynomial fits. Tick the box to show the equation and the R squared and off you go.
And you just delete the graph afterwards if you want.
You can use the INSERT tab to insert a graph of the data. And then if you right click on the line you can "add trendline" and then fiddle about with the best linear, logarthimic, exponential, polynomial fits. Tick the box to show the equation and the
"i dont want the results to be linear, rather they should represent the line of best fit from the data"
of all the possible lines the one which fits best is a line exactly through all your data points. If this is what you want then the scatter chart can do one, either smoothed or unsmoothed.
If you want a fitted line then you need to give the computer a choice of the type of line - probably either linear or from eye-balling using the method described by silverback.
"i dont want the results to be linear, rather they should represent the line of best fit from the data"of all the possible lines the one which fits best is a line exactly through all your data points. If this is what you want then the scatter chart
thanks for everyones input during the day, yes thats what we're talking about toprated but big sample size so not erratic
also the second rated is fixed at 0 with very large sample size so thats going to be more or less 'accurate'. a straight line is not going to represent that properly
i dont want to mess up with a chart, an example would be :-
the sample sizes in this set of data are 5000 for zero, 1000's for the lower ratings, 500-800 for the higher. the sample sizes are smaller for high ratings but they are the ones i need to get more or less 'right'
hope this helps you to help me??
cheers
thanks for everyones input during the day, yes thats what we're talking about toprated but big sample size so not erraticalso the second rated is fixed at 0 with very large sample size so thats going to be more or less 'accurate'. a straight line is
that download looks perfectly manageable. 'lowess smoothing' does it for me ..never thought i'd say that in public
Still doesnt quite hit the mark .. in practise i will be keeping the zero value from the raw data described above, then use the tool twice, one for positive values, one for negative values)
that download looks perfectly manageable. 'lowess smoothing' does it for me ..never thought i'd say that in publicStill doesnt quite hit the mark .. in practise i will be keeping the zero value from the raw data described above, then use the tool twi