Page tree

You are viewing an old version of this page. View the current version.

Version 2

Release 7.1.2

Contents:

This example illustrates the following two-column statistical functions:

• `CORREL` - Correlation co-efficient between two columns. See CORREL Function.
• `COVAR` - Calculates the covariance between two columns. See COVAR Function.
• `COVARSAMP` - Calculates the covariance between two columns using the sample population method. See COVARSAMP Function.

Source:

The following table contains height in inches and weight in pounds for a set of students.

StudentheightInweightLbs
170134
267135
367147
467160
572136
673146
771135
863145
967138
1066138
1171161
1270131
1374131
1467157
1573161
1670133
1763132
1864153
1964156
2072154

Transformation:

You can use the following transformations to calculate the correlation co-efficient, the covariance, and the sampling method covariance between the two data columns:

Transformation Name `New formula` `Single row formula` `round(correl(heightIn, weightLbs), 3)` `'corrHeightAndWeight'`

Transformation Name `New formula` `Single row formula` `round(covar(heightIn, weightLbs), 3)` `'covarHeightAndWeight'`

Transformation Name `New formula` `Single row formula` `round(covarsamp(heightIn, weightLbs), 3)` `'covarHeightAndWeight-Sample'`

Results:

StudentheightInweightLbscovarHeightAndWeight-SamplecovarHeightAndWeightcorrHeightAndWeight
1701340.5110.4850.014
2671350.5110.4850.014
3671470.5110.4850.014
4671600.5110.4850.014
5721360.5110.4850.014
6731460.5110.4850.014
7711350.5110.4850.014
8631450.5110.4850.014
9671380.5110.4850.014
10661380.5110.4850.014
11711610.5110.4850.014
12701310.5110.4850.014
13741310.5110.4850.014
14671570.5110.4850.014
15731610.5110.4850.014
16701330.5110.4850.014
17631320.5110.4850.014
18641530.5110.4850.014
19641560.5110.4850.014
20721540.5110.4850.014

• No labels