Skip to main content
Module

x/simplestatistics/src/sum_nth_power_deviations.js>default

simple statistics for node & browser javascript
Latest
function default
import { default } from "https://deno.land/x/simplestatistics@v7.8.3/src/sum_nth_power_deviations.js";

The sum of deviations to the Nth power. When n=2 it's the sum of squared deviations. When n=3 it's the sum of cubed deviations.

Examples

var input = [1, 2, 3]; // since the variance of a set is the mean squared // deviations, we can calculate that with sumNthPowerDeviations: sumNthPowerDeviations(input, 2) / input.length;

Parameters

x
n

power