UNPKG

atlas-mean

Version:

Calculates the expectation value of a set of data points.

10 lines (8 loc) 278 B
const { describe, it } = require("mocha") const { expect } = require("chai") const mean = require("../src/mean") describe("mean", function(){ it("should calculate the expectation value of the array", function(){ expect(mean([1,2,3,4,5,6,7,8,9,10])).to.equal(5.5) }) })