Online Statistical Hypothesis Testing Tool

Statistical Hypothesis Testing Tool

Perform t-tests and chi-squared tests to analyze your data.

Data Input

Enter numerical data for two independent groups, separated by commas.

T-Test Results

Your t-test results will appear here.

This means there is ${results.isSignificant ? 'a' : 'no'} significant association between the categorical variables.

`; }; // --- PDF DOWNLOAD --- downloadPdfBtn.addEventListener('click', () => { if (!lastResults.type) { alert("Please run a test before downloading results."); return; } const { jsPDF } = window.jspdf; const doc = new jsPDF(); doc.setFontSize(22); doc.text('Hypothesis Test Results', 105, 20, { align: 'center' }); doc.setFontSize(16); doc.text(lastResults.type, 105, 28, { align: 'center' }); if (lastResults.type === 'T-Test') { const { tStatistic, df, criticalT, isSignificant, mean1, mean2, n1, n2 } = lastResults.data; doc.autoTable({ startY: 40, head: [['Metric', 'Value']], body: [ ['Test Type', 'Independent Samples T-Test'], ['Group 1 Sample Size (n1)', n1], ['Group 1 Mean', mean1.toFixed(3)], ['Group 2 Sample Size (n2)', n2], ['Group 2 Mean', mean2.toFixed(3)], ['T-Statistic', tStatistic.toFixed(3)], ['Degrees of Freedom', df], ['Conclusion', `Statistically ${isSignificant ? 'Significant' : 'Not Significant'} (p < 0.05)`] ] }); } else if (lastResults.type === 'Chi-Squared Test') { const { chiSquared, df, criticalChi, isSignificant } = lastResults.data; doc.autoTable({ startY: 40, head: [['Metric', 'Value']], body: [ ['Test Type', 'Chi-Squared Test of Independence'], ['Chi-Squared (χ²) Value', chiSquared.toFixed(3)], ['Degrees of Freedom', df], ['Conclusion', `Statistically ${isSignificant ? 'Significant' : 'Not Significant'} (p < 0.05)`] ] }); } doc.save('statistical-test-results.pdf'); }); });
Scroll to Top