[ Using Linear Regression on ios: #Numbers ]

Basic course :

**Contents of Using Functions**

**1. CORREL:** Calculates the correlation between two data sets based on linear

regression analysis.

**2. FORECAST:** Calculates the y (dependent) value that corresponds to a chosen x

(independent) value by using linear regression analysis of known value pairs.

**3. INTERCEPT:** Calculates the y-intercept of the best-fit line for a data set using linear regression analysis.

**4. SLOPE:** Finds the slope of the best-fit line for a data set based on linear regression analysis.

**1. CORREL**

The CORREL function calculates the correlation between two data sets based on linear

regression analysis.

CORREL(y-range, x-range)

- y-range: A range of cells containing the dependent variable (y).
- x-range: A range of cells containing the independent variable (x).

Examples

Given the following table:

// Numbers Codes: CORREL(D2:D7, E2:E7) returns 1. CORREL(B2:B7, A2:A7) returns 0.977265.

**2. FORECAST**

The FORECAST function uses linear regression analysis of known value pairs to find the

y (dependent) value that corresponds to a chosen x (independent) value.

FORECAST(x, y-values, x-values)

- x: The x value for which you want to find a corresponding y value.
- y-values: A range of cells containing the known y values. Must be the same size as xvalues.
- x-values: A range of cells containing the known x values.

Notes

You can use the SLOPE and INTERCEPT functions to find the equation used to calculate forecast values.

Examples

Given the following table:

Numbers Codes: FORECAST(9, A3:F3, A2:F2) returns 19.

**3. INTERCEPT**

The INTERCEPT function calculates the y-intercept of the best-fit line for the data set

using linear regression analysis.

INTERCEPT(y-range, x-range)

- y-range: A list of values for the dependent variable y. Must be the same size as xrange.
- x-range: A range of cells containing values for the independent variable x. Must be the same size as y-range.

Notes

To find the slope of the best-fit line, use the SLOPE function.

Examples

Given the following table:

Numbers Code: INTERCEPT(A2:F2, A1:F1) returns 1. SLOPE(A2:F2, A1:F1) returns 2. INTERCEPT(A5:F5, A4:F4) returns 2.392.

**4. SLOPE**

The SLOPE function calculates the slope of the best-fit line for the data set based on linear regression analysis.

SLOPE(y-range, x-range)

- y-range: A range of cells containing the dependent variable y. Must be the same size as x-range.
- x-range: A range of cells containing the independent variable x. Must be the same size as y-range.

Notes

To find the y-intercept of the best-fit line, use the INTERCEPT function.

Examples

Given the following table:

// Numbers Codes: SLOPE(A2:F2, A1:F1) returns 2. INTERCEPT(A2:F2, A1:F1) returns 1. SLOPE(A5:F5, A4:F4) returns 0.402.

**Total Examples**

// Numbers Codes: // y = ax + b SLOPE(B3:F3,B2:F2) // a INTERCEPT(B3:F3,B2:F2) // b // Linear Regression line FORECAST(B2,B3:F3,B2:F2) FORECAST(C2,B3:F3,B2:F2) FORECAST(D2,B3:F3,B2:F2) FORECAST(E2,B3:F3,B2:F2) FORECAST(F2,B3:F3,B2:F2)

**Application (To Expect the Size of muscle in the future)**

(Using Linear Function: y = ax + b )

// Numbers Codes: // 1. Arm size: SLOPE(E6:E10,A6:A10) INTERCEPT(E6:E10,A6:A10) FORECAST(A10,E6:E10,A6:A10) // 2. Forearm size: SLOPE(I6:I10,A6:A10) INTERCEPT(I6:I10,A6:A10) FORECAST(A10,I6:I10,A6:A10)

END

#numbers #linearregression #stat #correl #forecast #intercept #slope