Skip to main content
Module

x/simplestatistics/index.js>rms

simple statistics for node & browser javascript
Go to Latest
function rms
import { rms } from "https://deno.land/x/simplestatistics@v7.7.5/index.js";

The Root Mean Square (RMS) is a mean function used as a measure of the magnitude of a set of numbers, regardless of their sign. This is the square root of the mean of the squares of the input numbers. This runs in O(n), linear time, with respect to the length of the array.

Examples

rootMeanSquare([-1, 1, -1, 1]); // => 1

Parameters

x

a sample of one or more data points