WellSpotted
mass = concentration × volume × MW
g/mol

Example loaded: NaCl (58.44 g/mol) at 150 mM in 500 mL.

What this calculator does

It compares groups of measurements, such as a control and one or more treatments, and tells you whether the differences between them are bigger than you would expect by chance. You get a summary of each group (mean, SD, SEM, 95% confidence interval, CV, median and range), the right test with its p-value, and a dot plot showing every value with the mean and error bars.

Choosing a test

Your dataCompare meansCompare ranks (non-parametric)
Two independent groupsWelch's t-test (or Student's)Mann-Whitney test
Two paired groups (before and after, matched samples)Paired t-testWilcoxon signed-rank test
Three or more independent groupsOne-way ANOVA, then pairwise comparisons or comparisons with a controlKruskal-Wallis test, then Dunn's test

Groups are paired when each value in one group belongs with a value in the other: the same animal before and after treatment, or two assays run on the same sample. Pairing removes the variation between subjects, so a paired test can find smaller differences. Otherwise the groups are independent.

Compare means when your values are roughly symmetrical, as most instrument readings are. Means tests cope well with moderate departures from normality, especially with 10 or more values per group. Compare ranks when values are clearly skewed or have outliers, such as cell counts or titres; or analyse the log of the values, which often makes skewed data symmetrical.

For two independent groups, Welch's t-test is the safer default because it doesn't assume the groups have the same spread. Student's t-test assumes equal SDs and gives nearly the same answer when they are similar.

Reading the results

The p-value is the chance of seeing a difference at least this large if the groups really had the same mean. Below 0.05 the difference is called statistically significant, and the stars show how small p is: * below 0.05, ** below 0.01 and *** below 0.001. All tests here are two-sided, so they look for a difference in either direction.

Comparing each group with a control

Often only one question matters: which treatments, or which concentrations in a dilution series, differ from the control? Choose Each group with a control under After ANOVA, compare, and pick the control group, such as the 0 (negative) concentration. Each group is then compared only with the control. With 8 concentrations that's 7 comparisons instead of 28, so each one keeps more power to find a real difference. When the group names are concentrations, the result also tells you the lowest concentration that differs from the control, and the chart shows stars above each group.

There are two ways to adjust the p-values for making several comparisons:

The lowest concentration that differs is not a limit of detection. It describes this experiment: these replicates, on this plate or run. It moves with the number of replicates and the multiple-comparison method, and a concentration that just misses significance here may differ in a larger experiment. A validated limit of detection needs a dedicated study, typically many blank and low-concentration replicates across several runs and reagent lots, following a guideline such as CLSI EP17.

Both are good choices; pick one before looking at the results, and say which you used. For ranks, the Kruskal-Wallis test is followed by Dunn's test against the control, with Holm-Šídák adjustment. From the IC50 calculator, Compare to negative control sends your dose–response data here, one column per concentration, already set up to compare each with 0.

When the groups have different SDs

Ordinary ANOVA, and both Holm-Šídák and Dunnett's comparisons after it, use one SD pooled from all the groups, which assumes every group has the same spread. Assay signals often don't: the SD usually grows with the signal, so a negative control and low concentrations are tight while high concentrations are more variable. The pooled SD then sits in between. It is too large for comparing the low concentrations with the negative, which can hide the lowest concentration that really differs, and too small for the high ones.

When the largest group SD is more than 3 times the smallest, the calculator says so. Under Group SDs, choose Can differ (Welch's ANOVA). Welch's ANOVA tests for any difference without assuming equal SDs, and each comparison is then a Welch t-test that uses only the two groups' own SDs, with Holm-Šídák adjustment. Dunnett's test assumes equal SDs, so it isn't used with this option. With only 2 or 3 replicates an SD is a rough estimate, so SDs can differ by chance; if you know your assay's spread rises with the signal, choose Welch's ANOVA anyway.

Replicates: wells, strips and independent runs

The tests treat every value in a group as an independent replicate. If your values are wells on one plate, or lateral flow strips from one run, the result describes that plate or run: it shows the difference is larger than the well-to-well or strip-to-strip noise. To claim that the assay itself gives different results, repeat the experiment on separate days, plates or batches, and use one value per run, such as the mean of its wells.

How the tests work

The t-tests divide the difference in means by its standard error and compare the result with Student's t distribution. Welch's version estimates the standard error from each group's own variance and adjusts the degrees of freedom to match, which is why its degrees of freedom are often not a whole number. The paired t-test works on the differences within each pair.

One-way ANOVA compares the spread between the group means with the spread within the groups (the F ratio). The pairwise comparisons are t-tests that use the pooled SD from all the groups, with the p-values adjusted by the Holm-Šídák method: the smallest p-value is adjusted most strictly and the rest step down in turn, which keeps the overall false-positive rate at 5% while losing less power than a Bonferroni correction.

The rank-based tests replace each value with its rank, so a single extreme value counts no more than any other high value. Tied values share their average rank. The Mann-Whitney and Wilcoxon tests give exact p-values for small groups without ties, and otherwise use the normal approximation with corrections for ties. In the Wilcoxon test, pairs with no difference are left out, as in Wilcoxon's original method. After a Kruskal-Wallis test, Dunn's test compares each pair of groups by their mean ranks, again with Holm-Šídák adjustment.

Worked example

The example loaded on this page has a control and two treatments, with six replicates each. The means are 1.002, 1.243 and 1.022. One-way ANOVA gives F(2, 15) = 21.50, p < 0.0001, so at least one group differs. The pairwise comparisons show that Treatment A differs from the control (difference 0.2417, adjusted p < 0.0001) and from Treatment B (adjusted p = 0.0001), while Treatment B and the control don't differ (adjusted p = 0.632).

Comparing just the control and Treatment A with Welch's t-test gives t = 5.93 with 9.98 degrees of freedom, p = 0.0001, and a difference of 0.2417 (95% confidence interval 0.1508 to 0.3325).

SD, SEM or 95% confidence interval?

Error bars can show different things, so always say which. The SD describes how spread out the values are. The SEM is the SD divided by the square root of n: it shows how precisely the mean is known, and shrinks as you add replicates. The 95% confidence interval of the mean is roughly two SEMs either side for moderate group sizes, and wider for small ones. To show the variability of your data, use the SD; to compare means, the 95% confidence interval is the clearest. Because every value is plotted, readers can always see the raw data too.

Getting your data in

Put each group in its own column, with the group's name in the first row, and paste straight from Excel, or open a CSV or Excel (.xlsx) file. Groups can have different numbers of values, and cells that aren't numbers are left out and counted. For paired data, keep each pair on the same row; rows with a value in only one group are left out of the paired test. Your data stay in your browser.

What's free and what's Bench

The group summaries, the dot plot and the two-group t-tests (Welch's, Student's and paired) are free and will stay free. ANOVA with pairwise comparisons or comparisons with a control, the rank-based tests, the test chooser and figure downloads are part of Bench, and are free to use while Bench is in early access. See pricing.

Accuracy

Every statistic and p-value on this page is compared with SciPy on 21 datasets: two to ten groups, equal and very unequal sizes, small and large groups, tied values, paired data with and without zero differences, a control in different columns, and very small p-values. The pairwise comparisons and comparisons with a control are checked against an independent calculation of the published formulas, and Welch's ANOVA against statsmodels; all agree to at least eight significant figures. Dunnett's p-values are checked against an independent calculation of Dunnett's integral to at least six significant figures, and against SciPy's own Dunnett's test to the precision of its sampling.

This calculator is checked against independent calculations before every release. How the calculators are checked.

References

Send feedback

Suggest a tool, ask for an improvement or report a problem.

Your message is emailed to me. I only see what you send here, and I use your email address only to reply. Privacy.