Git Product home page Git Product logo

mann-whitney-utest's Introduction

Mann-Whitney U Test

Build Status Build Status npm npm npm

This is an NPM module that allows you to perform the Mann-Whitney U test on numeric samples. The Mann-Whitney U test is a nonparametric statistical test that does not assume a normal distribution.

To use it, simply install via NPM and include it in your project file.

	var mwu = require('mann-whitney-utest');

Then, to test an array of samples, use the test method.

	var samples = [ [30, 14, 6], [12, 15, 16] ];
	console.log(mwu.test(samples)); // [ 4, 5 ]

To test whether the result is significant, use the significant method. This tests the U-value against an approximate critical value.

	var u = mwu.test(samples);
	if (mwu.significant(u, samples)) {
		console.log('The data is significant!');
	} else {
		console.log('The data is not significant.');
	}

You can check your answers using the check method. This exploits a property of the Mann-Whitney test that ensures the sum of the U values does not exceed the product of the number of observations.

	var u = mwu.test(samples);
	if (mwu.check(u, samples)) {
		console.log('The values are correct');
	}

mann-whitney-utest's People

Contributors

lukem512 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

tainakanchu

mann-whitney-utest's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.