Returns values along a linear trend.
Cú pháp
TREND(known_ys, [known_xs], [new_xs], [const])Đối số
known_ysbắt buộc
The set of y-values you already know in the relationship y = mx + b.
known_xstùy chọn
The optional set of x-values you already know.
new_xstùy chọn
The new x-values for which you want to return corresponding y-values.
consttùy chọn
A logical value specifying whether to force the constant b to equal 0.
The TREND function calculates a linear trend line through a given set of data points using the least squares method. It returns the y-values along that line for the specified new x-values.
=TREND({10,20,30}, {1,2,3}, {4})→40Predicts the y-value for x=4 based on the linear trend of the provided data.
Prepare your data
Organize your known y-values and x-values into separate columns or rows.
Apply the function
Enter the TREND function referencing your data ranges to calculate the predicted values.
If omitted, it is assumed to be the array {1, 2, 3, ...} of the same size as known_ys.