Difference between revisions of "Manuals/calci/SLOPE"

From ZCubes Wiki
Jump to navigation Jump to search
(Created page with "<div id="6SpaceContent" class="zcontent" align="left"> <font face="Arial, sans-serif"><font size="2">'''SLOPE'''</font></font><font face="Arial, sans-serif"><font size="2">...")
 
 
(15 intermediate revisions by 4 users not shown)
Line 1: Line 1:
<div id="6SpaceContent" class="zcontent" align="left">
+
<div style="font-size:30px">'''SLOPE (KnownYArray,KnownXArray)'''</div><br/>
 +
*<math> KnownYArray </math> is the set of dependent values.
 +
*<math> KnownXArray </math> is the set of independent  values.
 +
**SLOPE(), returns the slope of the linear regression line.
  
<font face="Arial, sans-serif"><font size="2">'''SLOPE'''</font></font><font face="Arial, sans-serif"><font size="2">(</font></font><font face="Arial, sans-serif"><font size="2">'''ky's'''</font></font><font face="Arial, sans-serif"><font size="2">,</font></font><font face="Arial, sans-serif"><font size="2">'''kx's'''</font></font><font face="Arial, sans-serif"><font size="2">)</font></font>
+
==Description==
 +
*This function gives the slope of the linear regression line through a set of given points.
 +
*The slope of a regression line (b) represents the rate of change in <math> y </math> as ,math> x </math> changes.
 +
*To find a slope we can use the least squares method.
 +
*Slope is  found by calculating b as the co-variance of <math>x</math> and <math>y</math>, divided by the sum of squares (variance) of <math>x</math>.
 +
*In <math>SLOPE (KnownYArray,KnownXArray)</math>, <math>KnownYArray </math> is the array of the numeric dependent values and <math> KnownXArray </math> is the array of the independent values.
 +
*The arguments can be be either numbers or names, array, constants or references that contain numbers.
 +
*Suppose the array contains text, logical values or empty cells, like that values are not considered.
 +
*The equation for the slope of the regression line is
 +
:<math>b = \frac {\sum (x-\bar{x})(y-\bar{y})} {\sum(x-\bar{x})^2}</math>
 +
where <math>\bar{x}</math> and <math>\bar{y}</math> are the sample mean x and y.
 +
*This function will return the result as error when
 +
  1. Any one of the argument is non-numeric.
 +
  2. <math>KnownYArray</math> and <math>KnownXArray</math> are empty or that have a different number of data points.
  
<font face="Arial, sans-serif"><font size="2"></font></font><font face="Arial, sans-serif"><font size="2">'''Where ky's'''</font></font><font face="Arial, sans-serif"><font size="2">   is an array or cell range of numeric dependent data points and </font></font><font face="Arial, sans-serif"><font size="2">'''Kx's'''</font></font><font face="Arial, sans-serif"><font size="2">   is the set of independent data points.</font></font>
+
==Examples==
 +
1.
 +
{| class="wikitable"
 +
|+Spreadsheet
 +
|-
 +
! !! A !! B !! C !! D!! E
 +
|-
 +
! 1
 +
| 4 || 9 || 2 ||6 || 7
 +
|-
 +
! 2
 +
| 1 || 5 || 10 || 3 || 4
 +
|}
 +
=SLOPE(A1:E1,A2:E2) = -0.305309734513
 +
2.
 +
{| class="wikitable"
 +
|+Spreadsheet
 +
|-
 +
! !! A !! B !! C !! D!! E !!F
 +
|-
 +
! 1
 +
| 2 || 9 || 3 ||8 || 10 ||17
 +
|-
 +
! 2
 +
| 4 || 5 || 11 || 7 || 15 ||12
 +
|}
  
</div>
+
=SLOPE(A1:F1,A2:F2) = 0.58510638297
----
 
<div id="1SpaceContent" class="zcontent" align="left"> <font face="Arial, sans-serif"><font size="2">It calculates the slope of the linear regression line through data points in ky's and kx's. </font></font></div>
 
----
 
<div id="7SpaceContent" class="zcontent" align="left"><font size="2" color="#7f7f7f" face="Arial">The equation for the slope of the regression line is: </font>
 
  
<br /><br />
+
3.
 +
{| class="wikitable"
 +
|+Spreadsheet
 +
|-
 +
! !! A !! B !! C
 +
|-
 +
! 1
 +
| 0 || 9 || 4
 +
|-
 +
! 2
 +
| -1 || 5 || 7
 +
|}
 +
=SLOPE(C1:C3) = 0.730769230769
  
<font size="2" color="#7f7f7f" face="Arial">where x and y are the sample means AVERAGE(kx’s) and AVERAGE(ky’s).</font><br />
+
==Related Videos==
  
</div>
+
{{#ev:youtube|MeU-KzdCBps|280|center|SLOPE}}
----
 
<div id="12SpaceContent" class="zcontent" align="left"><div class="ZEditBox" align="left">
 
  
SLOPE
+
==See Also==
 +
*[[Manuals/calci/INTERCEPT | INTERCEPT]]
 +
*[[Manuals/calci/RSQ  | RSQ ]]
 +
*[[Manuals/calci/PEARSON | PEARSON ]]
  
</div></div>
+
==References==
----
+
*[http://stattrek.com/regression/slope-test.aspx?Tutorial=AP Linear regression line]
<div id="8SpaceContent" class="zcontent" align="left"> 
 
  
<font color="#000000"><font face="Arial, sans-serif"><font size="3"><nowiki>=SLOPE(B2:B8,C2:C8) is 0.3993</nowiki></font></font></font>
 
  
</div>
 
----
 
<div id="10SpaceContent" class="zcontent" align="left"><div class="ZEditBox" align="justify">Syntax </div><div class="ZEditBox"><center></center></div></div>
 
----
 
<div id="4SpaceContent" class="zcontent" align="left"><div class="ZEditBox" align="justify">Remarks </div></div>
 
----
 
<div id="3SpaceContent" class="zcontent" align="left"><div class="ZEditBox" align="justify">Examples </div></div>
 
----
 
<div id="11SpaceContent" class="zcontent" align="left"><div class="ZEditBox" align="justify">Description </div></div>
 
----
 
<div id="5SpaceContent" class="zcontent" align="left"><div>
 
  
{| id="TABLE1" class="SpreadSheet blue"
+
*[[Z_API_Functions | List of Main Z Functions]]
|- class="even"
 
| class="    " |
 
<div id="5Space_Copy" title="Click and Drag over to AutoFill other cells."></div>
 
| class=" " | Column1
 
| class=" " | Column2
 
| class="  " | Column3
 
| class=" SelectTD" |
 
<div id="5Space_Handle" title="Click and Drag to resize CALCI Column/Row/Cell. It is EZ!"></div><div id="5Space_Copy" title="Click and Drag over to AutoFill other cells."></div>Column4
 
|- class="odd"
 
| class=" " | Row1
 
| class="sshl_f " | 5
 
| class="sshl_f " | 16
 
| class="sshl_f" | 0.3993
 
| class="sshl_f" |
 
|- class="even"
 
| class="  " | Row2
 
| class="sshl_f" | 6
 
| class="sshl_f" | 12
 
| class="sshl_f" |
 
| class="sshl_f" |
 
|- class="odd"
 
| Row3
 
| class="sshl_f" | 9
 
| class="sshl_f" | 8
 
| class="sshl_f" |
 
| class="sshl_f" |
 
|- class="even"
 
| Row4
 
| class="sshl_f" | 10
 
| class="sshl_f" | 5
 
| class="    sshl_f      " |
 
<div id="5Space_Copy" title="Click and Drag over to AutoFill other cells."></div>
 
| class="sshl_f" |
 
|- class="odd"
 
| class=" " | Row5
 
| class="sshl_f" | 18
 
| class="sshl_f" | 17
 
| class="sshl_f " |
 
<div id="5Space_Copy" title="Click and Drag over to AutoFill other cells."></div>
 
| class="sshl_f" |
 
|- class="even"
 
| class="sshl_f" | rOW6
 
| class="sshl_f" | 4
 
| class="sshl_f" | 9
 
| class="sshl_f  " |
 
| class="sshl_f  " |
 
|- class="odd"
 
| class="sshl_f" | Row7
 
| class="  " | 3
 
| class="sshl_f  " | 9
 
| class=" " |
 
<div id="5Space_Copy" title="Click and Drag over to AutoFill other cells."></div>
 
|
 
|}
 
  
<div align="left">[[Image:calci1.gif]]</div></div>
+
*[[ Z3 |  Z3 home ]]
----
 
</div>
 

Latest revision as of 16:12, 1 August 2018

SLOPE (KnownYArray,KnownXArray)


  • is the set of dependent values.
  • is the set of independent values.
    • SLOPE(), returns the slope of the linear regression line.

Description

  • This function gives the slope of the linear regression line through a set of given points.
  • The slope of a regression line (b) represents the rate of change in as ,math> x </math> changes.
  • To find a slope we can use the least squares method.
  • Slope is found by calculating b as the co-variance of and , divided by the sum of squares (variance) of .
  • In , is the array of the numeric dependent values and is the array of the independent values.
  • The arguments can be be either numbers or names, array, constants or references that contain numbers.
  • Suppose the array contains text, logical values or empty cells, like that values are not considered.
  • The equation for the slope of the regression line is

where and are the sample mean x and y.

  • This function will return the result as error when
 1. Any one of the argument is non-numeric. 
 2.  and  are empty or that have a different number of data points.

Examples

1.

Spreadsheet
A B C D E
1 4 9 2 6 7
2 1 5 10 3 4
=SLOPE(A1:E1,A2:E2) = -0.305309734513

2.

Spreadsheet
A B C D E F
1 2 9 3 8 10 17
2 4 5 11 7 15 12
=SLOPE(A1:F1,A2:F2) = 0.58510638297

3.

Spreadsheet
A B C
1 0 9 4
2 -1 5 7
=SLOPE(C1:C3) = 0.730769230769

Related Videos

SLOPE

See Also

References