# Math and Statistics Descriptive statistics, correlation, probability distributions, confidence intervals, t-tests, A/B tests, sample sizes, combinatorics and number theory. ## How to pay Machine-payable over x402. USDC on: Base (eip155:8453), Solana (solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp), Polygon (eip155:137), Arbitrum One (eip155:42161). No accounts. No API keys. No signup. The paying wallet is the account. ## Machine-readable - OpenAPI: https://math-stats.x402tookit.com/openapi.json - x402 manifest: https://math-stats.x402tookit.com/.well-known/x402 - Catalog (free): https://math-stats.x402tookit.com/catalog - Health (free): https://math-stats.x402tookit.com/health - Uptime (free): https://math-stats.x402tookit.com/uptime ## Endpoints (10) ### GET /ab-test — $0.02 A/B conversion test: rates, relative lift, two-proportion z-test p-value, confidence interval and a significance verdict. Params: visitorsA: number, conversionsA: number, visitorsB: number, conversionsB: number, alpha?: number Example: https://math-stats.x402tookit.com/ab-test?visitorsA=1000&conversionsA=200&visitorsB=1000&conversionsB=250 ### GET /combinatorics — $0.02 Exact counts: factorial, combinations, permutations, with repetition, derangements and Catalan numbers, as big integers. Params: n: integer, k?: integer Example: https://math-stats.x402tookit.com/combinatorics?n=52&k=5 ### GET /confidence-interval — $0.02 Confidence interval for a mean (t interval from a list) or a proportion (Wilson and Wald from successes and trials). Params: kind: string, values?: string, successes?: number, trials?: number, confidence?: number Example: https://math-stats.x402tookit.com/confidence-interval?kind=proportion&successes=50&trials=100&confidence=0.95 ### GET /correlation — $0.02 Pearson and Spearman correlation of two lists with p-values, plus the least-squares line, R squared and an optional prediction. Params: x: string, y: string, predictAt?: number Example: https://math-stats.x402tookit.com/correlation?x=1%2C2%2C3%2C4%2C5&y=2%2C4%2C5%2C4%2C5&predictAt=6 ### GET /distribution — $0.02 Probability density or mass, cumulative probability and quantiles for normal, binomial, Poisson and Student t distributions. Params: dist: string, x?: number, p?: number, mean?: number, sd?: number, n?: number, prob?: number, lambda?: number, df?: number Example: https://math-stats.x402tookit.com/distribution?dist=normal&x=1.96 ### GET /gcd-lcm — $0.02 Greatest common divisor, least common multiple, Bezout coefficients and modular inverse for integers of any size. Params: numbers: string, modulus?: string Example: https://math-stats.x402tookit.com/gcd-lcm?numbers=48%2C18 ### GET /prime-factor — $0.02 Primality test and prime factorization of integers up to 10^19, with divisor count, divisor sum, Euler totient and number type. Params: n: integer Example: https://math-stats.x402tookit.com/prime-factor?n=600851475143 ### GET /sample-size — $0.02 Required sample size for a survey (margin of error, optional finite population) or an A/B test (baseline, lift, power). Params: mode: string, margin?: number, population?: number, proportion?: number, baseline?: number, target?: number, confidence?: number, power?: number Example: https://math-stats.x402tookit.com/sample-size?mode=survey&margin=0.05&confidence=0.95 ### GET /stats-describe — $0.02 Descriptive statistics for a list of numbers: mean, median, mode, spread, quartiles, outliers, skewness and kurtosis. Params: values: string Example: https://math-stats.x402tookit.com/stats-describe?values=2%2C4%2C4%2C4%2C5%2C5%2C7%2C9 ### GET /t-test — $0.02 Welch two-sample or one-sample t-test: t statistic, degrees of freedom, p-value, confidence interval and Cohen's d. Params: a: string, b?: string, mu?: number, alpha?: number Example: https://math-stats.x402tookit.com/t-test?a=27.5%2C21.0%2C19.0%2C23.6%2C17.0%2C17.9%2C16.9%2C20.1%2C21.9%2C22.6%2C23.1%2C19.6%2C19.0%2C21.7%2C21.4&b=27.1%2C22.0%2C20.8%2C23.4%2C23.4%2C23.5%2C25.8%2C22.0%2C24.8%2C20.2%2C21.9%2C22.1%2C22.9%2C20.5%2C24.4 ## Terms All results are computed locally with standard numerical methods and provided as is; numeric answers are accurate to about 10 significant digits for ordinary inputs. Statistical tests rest on assumptions (independence, rough normality, adequate sample size) that this service cannot verify, and a significant result is not proof of cause. Not professional statistical, medical or financial advice. Inputs travel in the query string, so keep data lists short and never send personal data.