dataFrame.columns.stat — sumSquaresBetween()

Description

The sumSquaresBetween() method of the stat object computes the between-group sum of squares (SSB) for the selected columns.

Signature

dataFrame.columns(...columnNames).stat.sumSquaresBetween()
Scope
columns
Family
stat
Returns
number

Argument

...columnNames ( string[] )
The name of the columns from which to compute the between-group sum of squares.

Returns

ssb (number)
The computed between-group sum of squares.

Notes

  • The method requires at least two selected columns.
  • The statistic measures the variability explained by differences between group means.
  • Larger values indicate greater separation between group means.
  • The statistic is commonly used in analysis of variance (ANOVA).
  • The between-group sum of squares contributes to the computation of F-statistics, eta squared, and omega squared.
  • The value depends on both the magnitude of mean differences and the number of observations.

Example

// calculate the SSB from the values of 2 columns of the dataFrame
var ssb = dataFrame.columns('group_1', 'group_2').stat.sumSquaresBetween();

// log the SSB
notebook.log(ssb);