Statistical Functions for Two Attributes

These functions have to do with association between two attributes. They are all aggregate functions so you can use them in formulas for attributes or for measures.

Note: All of these functions take an optional last argument, a Boolean expression. That modifies the function so that it applies only to those cases where the condition is true. For example, correlation( engineSize, fuelUsage, carSize = "compact") finds the correlation between engineSize and fuelUsage for the subset of cars in the collection that are compact.

correlation( x, y )

The correlation coefficient of y and x.

rSquared( x, y)

The square of the correlation coefficient of y and x. It represents the proportion of the variation of y that is accounted for by a least-squares regression line. It takes on values between 0 and 1.

linRegrIntercept( x, y)

Returns the intercept of the least-squares regression line with x as the independent attribute and y as the dependent attribute.

linRegrSlope( x, y )

Returns the slope of the least-squares regression line with x as the independent attribute and y as the dependent attribute.

 

Categories of Functions