Returns the value of a linear regression fit line.
Find a line that fits the known array known_y’s and known_x’s (by least square method)
Returns the y value of the specified array new_x’s on the line.
grammar
TREND(known_y’s,known_x’s,new_x’s,const)
■Known_y’s set of known y values in the relational expression y = mx + b.
If the array known_y’s is in a separate column, then each column of known_x’s is treated as an independent variable.
If the array known-y’s is in a single row, then each row of known-x’s is treated as an independent variable.
■Known_x’s set of known optional x values in the relational expression y = mx + b.
The array known_x’s can contain one or more sets of variables. If only one variable is used, as long as known_y’s and known_x’s have the same dimension, they are
It can be any shape area. If multiple variables are used, known_y’s must be a vector (that is, it must be a row or column).
If known_x’s is omitted, the array is assumed to be {1,2,3,… }, which is the same size as known_y’s.
■New_x’s requires the TREND function to return the new x value of the corresponding y value.
New_x’s, like known_x’s, each independent variable must be a separate row (or column).
Therefore, if known_y’s is single-column, known_x’s and new_x’s should have the same number of columns.
If known_y’s is single-row, known_x’s and new_x’s should have the same number of rows.
If new_x’s is omitted, it is assumed to be the same as known_x’s.
If known_x’s and new_x’s are both omitted, they are assumed to be arrays {1,2,3,… }, the same size as known_y’s.
■Const A logical value that specifies whether to force the constant b to 0.
If const is TRUE or omitted, b is calculated as normal.
If const is FALSE, b will be set to 0 (zero) and m will be adjusted so that y = mx.
Instructions
■ For more information about linear fitting of data to WPS tables, see the LINEST function.
■ For formulas that return an array, they must be entered as array formulas.
■ You can use the TREND function to calculate the regression values of different powers of the same variable to fit a polynomial curve.
For example, suppose that column A contains y values and column B contains x values. You can put x^2 in column C, x^3 in column D, and so on, and then according to column A,
Regression calculation for columns B to D.
■ When entering array constants for arguments such as known_x’s, you should use commas to separate data in the same line and semicolons to separate data in different lines.
I want to create a clean, concise and efficient office reference manual, in order to maintain a good reference experience, I did not add any third-party advertisements in my blog, of course, if you are willing, you can watch the following video, it can bring me some income, so that I can better maintain the server to provide higher quality service, thank you for your help and support.
You can choose any link below to watch my videos and I will earn some money to strengthen the site and resist DDOS attacks that may happen at any time, thank you for your support!
(Please note: Please do not maliciously click on links or video ads to increase invalid traffic, as this can result in lower or no revenue.)
Learn to consult the manual video
(Will be released in the later period with the consult the manual article, please pay attention.)
My Febspot video list (Learn after-school relaxation videos)
https://suu.us/sponsor
My Febspot video home page
https://www.febspot.com/leet4477/