Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
chi-square-a-b-testing
Advanced tools
Npm module for calculating chi-square test that gives us p-value for statistical significance with practical use in A/B testing.
Npm module for calculating chi-square test that gives us p-value for statistical significance with practical use in A/B testing.
`npm install --save-dev chi-square-a-b-testing`
Let's consider we have two ad variations - each variation has been displayed 50 times. The first ad was clicked 1, whereas the second ad was clicked 5 times. Is the difference statistically significant? Let's find out using chi-square test
* * * * * * * * * * *
* SAMPLE | CLICKED *
* 50 | 1 * - ad variation 1
* 50 | 5 * - ad variation 2
* * * * * * * * * * *
var test = require('chi-square-a-b-testing');
// Set up our sample values
const table = [
[50, 1],
[50, 5]
];
// Calculate the p-value
let pValue = test(table); // 0.9078770365273039
In this case the pValue = 0.9078770365273039
, which means we cannot consider the difference between those two variations statistically significant if we set our threshold to 0.5 (which is usually the case for a standard experiment).
The JavaScript implementation of chi-square test was done by http://stats.theinfo.org/ (Aaron Swartz and Ben Wikler)
FAQs
Npm module for calculating chi-square test that gives us p-value for statistical significance with practical use in A/B testing.
The npm package chi-square-a-b-testing receives a total of 6,920 weekly downloads. As such, chi-square-a-b-testing popularity was classified as popular.
We found that chi-square-a-b-testing 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.