![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
chi-squared-test
Advanced tools
A simple function for calculating the chi-squared probability for a given observation set and expected set"
This package provides a small function for calculating a chi-squared test on a given dataset. Given an observed set of
frequencies observations
, an expected set of frequencies expectations
, and the number of degrees of freedom reduced
in the measurement, calculates the probability that the observations came from the same probability distribution.
For example, let's check a die for fairness:
var chiSquaredTest = require('chai-squared-test');
// We expect a fair die
var expected = [2, 2, 2, 2, 2, 2];
// Looks pretty unfair...
var observed = [6, 3, 3, 0, 0, 0];
// Reduction in degrees of freedom is 1, since knowing 5 categories determines the 6th
var reduction = 1;
var probability = chiSquaredTest(observed, expected, reduction);
// Gives 0.010362, which indicates that it's unlikely the die is fair
// However, something a little more likely
observed = [2, 2, 4, 4, 2, 2];
probability = chiSquaredTest(observed, expected, reduction);
// Gives back 0.549416, which is indicates that they did come from the same distribution (by most statistical standards)
FAQs
A simple function for calculating the chi-squared probability for a given observation set and expected set"
The npm package chi-squared-test receives a total of 0 weekly downloads. As such, chi-squared-test popularity was classified as not popular.
We found that chi-squared-test demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.