Calculates the statistics for a line by using the 'least squares' method to calculate a straight line that best fits your data.
تعمل هذه الدالة في Google Sheets كما تعمل في Excel تمامًا — بالصياغة والوسائط نفسها.
LINEST(known_ys, [known_xs], [const], [stats])The LINEST function calculates the linear regression parameters for a set of data points. It returns an array of values describing the line, such as the slope and y-intercept, and can optionally provide additional regression statistics.
=LINEST({10,20,30}, {1,2,3})النتيجة: {10, 0}
Calculates the slope (10) and the y-intercept (0) for the given data points.
If you are not using an array-enabled version of Excel, you must select the output range before entering the formula and press Ctrl+Shift+Enter.