I figure out how to figure out the regression line using fit {I need to use FIT} for one set of number. However, I have to combine two sets and figure out the regression line.
numberset1 = {1,2,3,4,5} numberset2 = {6,5,6,7,8}
I am doing this to figure out the regression line for the first set.
line = Fit[numberset1, {1, x}, x]
Then I graph both sets in a scatter plot with the regression line for set 1. However, I need to use both sets to figure out one regression line. I tried doing this
data = {data2, data1} Then line = Fit[data, {1, x}, x]
but this does not work Ive also tried
line = Fit[{numberset1,numberset2}, {1, x}, x]
did not work
Any ideas, I’ve already looked at the FIT line documentation in mathematica. None of the examples work.