Understanding the Calculator
A permutation test is a direct resampling method. It asks a clear question. Would the observed group difference look unusual if labels were random? The calculator answers that question with exact or simulated shuffles.
Why Permutation Testing Helps
Many tests rely on distribution rules. Those rules can fail with small samples. They can also fail with skewed values. A permutation test uses the observed data itself. It keeps the values fixed. It only rearranges group membership. This makes the method useful for classroom work, audits, experiments, and quick checks.
What This Tool Summarizes
The tool compares two samples. You can paste control values and treatment values. You can choose a statistic. Mean difference is common. Median difference is robust. Sum difference is useful for totals. A Welch style statistic standardizes the mean difference. The page then reports group counts, averages, medians, spreads, the observed statistic, and a permutation p value.
Exact Versus Simulated Runs
Exact mode checks every possible reassignment when the data set is small enough. That gives a complete reference distribution. Random mode uses many shuffled samples. It is faster for larger data. More repetitions usually reduce simulation noise. A fixed seed makes results repeatable.
Reading the P Value
The p value measures how often shuffled data produced a statistic as extreme as the observed statistic. A small value suggests the observed grouping is not easily explained by random labels. It does not prove a cause. Good design, clean data, and subject knowledge still matter.
Practical Workflow
Start with the example data. Then replace it with your values. Select the statistic and tail direction. Use two sided testing when either direction matters. Use right or left tests only when the direction was planned before analysis. After calculation, download the CSV or PDF summary. Save the table with your notes, so the result stays reproducible.
Stata Style Thinking
Stata users often think in commands, returned statistics, and summaries. This page follows that habit. It shows the observed statistic first. Then it shows the resampling distribution. It also lists tail choice, repetitions, seed, and alpha. These details help you compare runs and explain the calculation in reports. It is not a replacement for careful statistical judgment alone.