Student's t-test Statistical Hypothesis Testing
JSON →ttest is a focused JavaScript library for performing Student's t-hypothesis tests. It supports both one-sample and two-sample t-tests, and accommodates scenarios with both equal and unequal variances by defaulting to Welch's t-test for two-sample cases. The library offers flexibility in data input, accepting raw arrays of values, `Summary` objects, or plain objects containing `mean`, `variance`, and `size`. Users can configure critical test parameters such as the null hypothesis mean (`mu`), the significance level (`alpha`), and the alternative hypothesis (e.g., 'less', 'greater', 'not equal'). The current stable version is 4.0.0. It provides a programmatic API to retrieve key statistical outcomes including the t-value (`testValue`), p-value (`pValue`), confidence interval (`confidence`), and degrees of freedom (`freedom`), along with a `valid()` method to check significance against alpha. Its main differentiator is its concise API specifically tailored for t-test computations.
Traffic · last 30 days ↓25% vs prev 7d
top countries 🇺🇸 United States · 🇨🇦 Canada · 🇩🇪 Germany · 🇳🇴 Norway