Come utilizzare la funzione SLOPE di Excel -

Sommario

Sommario

La funzione PENDENZA di Excel restituisce la pendenza di una linea di regressione in base a valori y noti e valori x noti. Una linea di regressione è una linea di "adattamento migliore" basata su punti dati noti.

Scopo

Ottieni la pendenza della linea di regressione lineare

Valore di ritorno

Pendenza calcolata come numero

Sintassi

= SLOPE (known_ys, known_xs)

argomenti

  • known_ys - Una matrice o un intervallo di punti dati numerici (valori dipendenti).
  • known_xs - Un array o un intervallo di punti dati numerici (valori indipendenti).

Versione

Excel 2003

Note sull'utilizzo

The SLOPE function returns the slope of a regression line based on known y values and known x values. A regression line is a "best fit" line based on known data points.

The slope of a line is a measure of steepness. Mathematically, slope is calculated as "rise over run", or change in y over the change in x. For example, if a line has a slope of 2/1 (2), then if y increases by 2 units, x increases by 1 unit.

Example

In the example shown, the formula in E5 is:

=SLOPE(B5:B9,C5:C9) // returns -2

This formula returns -2, based on known_ys in C5:C9, and known_xs in B5:B9.

Equation

In statistics, a best fit line does not normally lie exactly on the known x and y points. The equation used by the SLOPE function in Excel is based on the mean of known x's and y's:

For the example shown, this formula can be manually recreated like this:

=SUM((B5:B9-AVERAGE(B5:B9))*(C5:C9-AVERAGE(C5:C9)))/SUM((B5:B9-AVERAGE(B5:B9))^2)

Il risultato calcolato dalla funzione PENDENZA e la formula manuale sono gli stessi.

Appunti

  • Se è presente un solo set di punti, SLOPE restituirà # DIV / 0!
  • Se il conteggio di y noto è diverso da known_xs, SLOPE restituisce # N / A

Articoli interessanti...