Skip to content

Main content

Paired T-Test Calculator Source Code

Browse the implementation files for Paired T-Test Calculator.
tool.ts typescript
import { calculatePairedTTest as calculatePortablePairedTTest } from '@tool.io/tools/statistics/paired-t-test';

export const calculatePairedTTest = (
	first: unknown,
	second: unknown
): string => {
	const result = calculatePortablePairedTTest({
		first,
		second
	});
	return result.ok
		? JSON.stringify(result.output, null, 2)
		: '';
};

export const Tool: TypeTool = {
	name: 'Paired T-Test Calculator',
	slug: 'statistics/paired-t-test',
	intro:
		'Calculate the paired-samples t statistic from two matched numeric series.',
	tool: calculatePairedTTest,
	i: [
		{
			example: '10, 12, 9, 11, 13',
			label: 'Before Values',
			placeholder: 'First matched series',
			render: 'textarea',
			type: 'text'
		},
		{
			example: '8, 11, 10, 9, 12',
			label: 'After Values',
			placeholder: 'Second matched series',
			render: 'textarea',
			type: 'text'
		}
	],
	o: [
		{
			example: '{ "tStatistic": 1.8257 }',
			label: 'Paired T-Test',
			placeholder: 'Statistic will appear here...',
			render: 'textarea',
			type: 'text'
		}
	]
};

export default Tool;

Description

Browse the implementation files for Paired T-Test Calculator.

References

  1. Tool.io on GitHub
  2. Tool.io TypeScript tools library

Similar or alternative tools