dataFrame.column.stat — shapiroWilk()
Description
The shapiroWilk() method of the stat object evaluates whether the values of the selected column follow a normal distribution using the Shapiro-Wilk test.
Signature
dataFrame.column(columnName).stat.shapiroWilk({ sorted: false })Arguments
columnName(string)- The name of the column from which to calculate statistics.
options(object)- Shapiro–Wilk test options.
Option
sorted(boolean)- Indicates whether the values are already sorted in ascending order.
- Sorted:
true - Not sorted:
false(default)
- Sorted:
Returns
stat(object)- The Shapiro-Wilk test statistics:
SW_stat: the Shapiro-Wilk statistic.p_value: the associated p-value.
Note
Small p-values indicate stronger evidence against normality.
Example
// perform the Shapiro-Wilk test
var stat = dataFrame.column('Speed_of_Impact').stat.shapiroWilk();
// log the test stats
notebook.log(stat);