1.0.1 • Published 10 months ago

@sukuasoft/stat-js v1.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months ago

Stat JS

  • It is a lightweight and easy-to-use library for Node.js that offers basic functions essential for simple statistical analysis

Test average

console.log(average([
    1, 7, 8, 4,
]))

//result: 5

Test median

console.log(median([
    1, 7, 8, 4, 9
]))

//result: 7

Test weighted average

console.log(average_weighted([
1, 23, 3
],  [
    4, 
    5, 1
]))

//result: 12.2

Test mode

console.log(mode([
    1, 2, 3, 4, 1, 3, 4, 5, 1, 3, 1.2, 1.2, 1.2, 1.2, 3
]))

//result: [3, 1.2]
1.0.1

10 months ago

1.0.0

10 months ago