Trend (Spatial Analyst) - Chi-square value

I have to calculate the slope of a line based on a dataset of points with a height value.

I am doing this by calculating the slope over a raster created using the trend function (linear 1st order). when i create the raster using the trend function I get also an RMSE value and the chi^2 value. I understand how the RMSE value is created, but I dont understand how the chi^2 is calculated. Is there someone who can explain to me how this value is calculated, and/or can tell me how to find out the degrees of freedom so i can interpret this value?

• Both of them are goodness of fit measures derived from using different calculation techniques. I cannot remember exact details but chi-square compares how the estimated values (your 1 st order linear model) fit to observations (your slope raster). This page may help en.wikipedia.org/wiki/Goodness_of_fit. Since you have 1 st order linear model, therefore you have one fit parameter, df should be equal to number of cells that your line transverses, minus 1 (fit parameter) minus 1. Jul 23 '15 at 14:00
• Thanks for your answer, I still have the problem not knowing the degrees of freedom. Because i need to know the amount of bins (with expected frequencies) used in the calculation, but arcgis is making those bins so i dont know how many it uses in the calculations. Jul 23 '15 at 14:31
• The standard formulas for degrees of freedom often do not apply to rasters due to high spatial correlation among the residuals. That is almost always of no concern, though, because there is usually such a large number of values that any test of a trend will appear to be hugely "significant." Thus you probably don't need a chi-squared statistic or a DF value to interpret the results. Jul 23 '15 at 14:47