midterm 2 Flashcards
what are the formulas for regression?
- y = mx + b (slope intercept form of a line)
- m = nΣxy - ΣxΣy / nΣx^2 - (Σx^2) (slope of line of best fit)
- b = ȳ - mx̄ (y-intercept of the line of best fit)
what is the formula for spearman’s coefficient?
s = 1 - 6ΣD^2 / n(n^2 - 1)
what is the formula for exponential smoothing?
F(t+1) = αy(t) + (1 - α)F(t)
what is the formula to calculate simple averages
simple average = Sum of all data points / Number of data points
what is the formula to calculate moving averages?
moving average (eg. 3 months) = Sum of data points in last 3 periods / 3
how do you calculate sum of squared errors (SSE)?
- find the errors - for each data point, subtract the forecasted/line of best fit value from the observed value: Error(i) = Actual(i) - Predicted(i)
- square each error: Error(i)^2
- Sum the squared errors: SSE = Σ(Error(i))^2
what is the formula for the correlation coefficient?
r = nΣ(xy) - ΣxΣy / √ (nΣx^2 - (Σx)^2) (nΣy^2 - (Σy)^2)
what are variables?
numbers that can change
what does y represent?
the value on the vertical axis (y-axis)
what does x represent?
the value on the horizontal axis (x-axis)
what does m represent?
the slope of the line of best fit (how much y changes when x increases by 1 unit)
what does b represent?
the y-intercept of the line (where the line crosses the y-axis when x = 0)
what does n represent?
the number of data points
what does Σx mean?
the sum of all the x variables
what does Σy mean?
the sum of all the y variables
what does Σxy mean?
the sum of the product of each pair of x and y values (multiply each x-value by its corresponding y-value, then add up all those results)
what does Σx^2 mean?
the sum of all the squares of x-values (for each x-value, square it, then add up all those values)
what does Σy^2 mean?
the sum of all squares of y-values (for each y-value, square it, then add up all those values)
what does (Σx)^2 mean?
the square sum of x-values (add up all the x-values, then square the total)
what does (Σy)^2 mean?
the square sum of y-values (add up all the y-values, then square the total)
what does ȳ represent?
the average of all y-values