‘standardDeviation’method returns standard deviation of a column.
Example
int[] numbers = { 23, 45, 6, 32, 1, 43, 1, 45, 6, 1, 1 };
IntColumn numbersColumn = IntColumn.create("My Numbers", numbers);
double standardDeviation = numbersColumn.standardDeviation();
package com.sample.app;
import tech.tablesaw.api.IntColumn;
public class App {
public static void main(String args[]) {
int[] numbers = { 23, 45, 6, 32, 1, 43, 1, 45, 6, 1, 1 };
IntColumn numbersColumn = IntColumn.create("My Numbers", numbers);
double standardDeviation = numbersColumn.standardDeviation();
System.out.println("standardDeviation : " + standardDeviation);
}
}
Output
standardDeviation : 19.35129781882154
No comments:
Post a Comment