Free tool · Version 1.5
AskDimitri Stats
Open your spreadsheet, let it suggest the right test, run it, and take away the figure, the two sentences for your manuscript and the citation. Made for surgeons, residents and international medical graduates who want statistics done properly without a statistics degree.
Everything is computed in your browser. Nothing you type or paste is sent anywhere. Even so, do not paste identifiable patient data: no names, initials, record numbers or dates of birth. Codes and numbers are enough.
For your manuscript
How to cite AskDimitri Stats
Cite the version you used. Version 1.6 is archived on Zenodo with its own DOI, so a reader can check the very code that ran. The methods sentence goes in your methods, the citation in your references.
Step one
Your data
Open your Excel or CSV file: you pick its columns, nothing is retyped. It works best with one row per patient, one column per variable and the column names in the first row.
Drop an Excel or CSV file here, or
Your file is read on this page, in your browser. Nothing is uploaded or sent anywhere. Even so, do not load identifiable patient data: remove names, record numbers, dates of birth, addresses and phone numbers first, and use study codes.
Excel (.xlsx), CSV, or tab-separated text (.tsv, .txt), up to 20 MB and 100,000 rows. An old .xls file: save it as .xlsx or CSV first. No file to hand? Every analysis below has an example sheet, and takes pasted values too.
Step two
Which test should I run?
First write down your question: the population, the endpoint, the comparison, the time frame and the summary you want to estimate. For the main analysis of a study, involve your statistician.
Answer up to eight short questions about your study. The answer names the analysis, says why in one line and takes you to it. With a spreadsheet open, you pick its columns instead and most questions answer themselves.
Step three
Choose an analysis
Each analysis opens on its own: it says when to use it, takes your columns (or pasted values) and gives the answer first, then the figure, the sentences for your manuscript and how to cite it.
Describe
Describe one variable
When to use it First, for any measurement: it gives the mean (SD) and the median (IQR), with a histogram and rough shape checks to help you choose.
Table 1: baseline characteristics
When to use it You need the table of patient characteristics for a paper or a report: several variables at once, for all patients or by group. One row per patient.
One group against a value
When to use it One group and a number to compare it with: a target, a normal value or a published figure. For example: is our operating time different from the 180 minutes reported in the literature? Or: is our 80% complication rate different from a published 60%?
A measurement against a value
One proportion against a fixed rate
Events out of a total in one group, against a target or a published percentage: 40 of 50 patients against 60%. If each patient has a predicted risk from a model, use observed against expected instead.
Categories against expected shares: chi-square goodness of fit
When to use it One group sorted into categories, and shares fixed in advance to compare with: a published distribution, or a design that planned them. To compare groups with each other, use Chi-square and Fisher.
Compare groups
Compare a measurement between two groups
When to use it A measurement (blood loss, length of stay, a score) in two groups of patients, or the same patients measured twice. The t-test compares means. With skewed data, choose by what you planned to compare: the means (permutation Welch), trimmed means (Yuen-Welch) or the medians, for two independent groups, or whether values tend to be higher in one group (Brunner-Munzel or Mann-Whitney), which is a different question.
Compare a measurement across three or more groups
When to use it A measurement in three or more groups of different patients (open, laparoscopic and robotic, for example). It tells you whether the groups differ, and which from which.
Chi-square and Fisher's exact test
When to use it The outcome is yes or no, or a category, in groups of different patients (a leak after stapled or hand-sewn anastomosis). For a 2 x 2 table you also get the risk ratio, odds ratio, risk difference and the number needed to treat.
Mortality
When to use it To compare death rates between two groups, or your observed deaths with the number a risk score (EuroSCORE II, STS, NSQIP) expected.
Two groups
Observed against expected
Paired and agreement
Paired yes or no: McNemar's test
When to use it The same patients answer a yes-or-no question twice (anaemic before surgery and at discharge), or matched pairs. A chi-square test would be wrong here: it ignores the pairing.
Yes or no, three or more times: Cochran's Q
When to use it The same patients answer a yes-or-no question on three or more occasions (pain at day 1, day 7 and day 30). It asks whether the chance of a yes is the same on every occasion; exact McNemar tests, Holm-adjusted, show which pairs differ. For two occasions use McNemar.
Three or more measurements on the same patients: Friedman test
When to use it The same patients are measured three or more times, and you ask whether values tend to rank higher on some occasions. It does not test means or medians. A repeated-measures model, which can test means, needs a statistician and is not on this page.
A category measured twice: Stuart-Maxwell and Bowker
When to use it The same patients are sorted into three or more categories on two occasions. The page reports two tests, because they answer two questions: did the totals change (Stuart-Maxwell), and did as many patients move each way between every pair of categories (Bowker)?
Agreement between two raters: Cohen's kappa
When to use it Two raters sort the same cases into categories (grades, yes or no) and you want to know how well they agree beyond chance. For ordered grades, weighted kappa gives partial credit for near misses.
Agreement on a measurement: ICC and Bland-Altman
When to use it Two or more raters, or two methods, measure the same cases on a scale (a diameter in mm, a score). Not a correlation: two readers can correlate perfectly and still disagree by 5 mm every time.
Associations
Correlation between two measurements
When to use it Two measurements on the same patients that may rise and fall together (age and length of stay). It measures the strength of the association, not cause, and not agreement.
Regression
Logistic regression: a yes or no outcome, adjusted for other variables
When to use it The outcome is yes or no (complication, readmitted, died in hospital) and you want its association with a group or a measurement, with other variables such as age or ASA grade held fixed. Choose the covariates in advance. Each row must be one patient. For time to an event with censoring, use Cox regression.
Linear regression: a measurement, adjusted for other variables
When to use it The outcome is a measurement (length of stay, blood loss) and you want its association with a group or another measurement, with other variables such as age or ASA grade held fixed. Choose the covariates in advance. Each row must be one patient. Look at the residuals against the fitted values before you trust the CIs.
Propensity score
Propensity score: weighting and matching
When to use it Two treatment groups that were not randomized, and you want to compare an outcome between them after balancing the groups on what was measured before the treatment was chosen. It balances only the covariates you give it, and it needs enough patients: at least 20 in each group, and the intervals are approximate below about 200. The outcome is a yes or no, a measurement, or the time to an event. Each row must be one patient.
Survival
Survival: Kaplan-Meier and the log-rank test
When to use it The outcome is the time until an event (death, recurrence) and some patients have not had it yet (censored). Up to six groups. To adjust for age or risk, use Cox regression. Only have a published curve? Reconstruct the patient data from the Kaplan-Meier curve.
Cox regression: survival adjusted for other variables
When to use it You compare survival, but other factors (age, ASA grade) also differ between the groups. Each hazard ratio is adjusted for the others. With few events per covariate the estimates are unstable; 10 per covariate is only a rough guide.
Meta-analysis
Meta-analysis: pool published studies
When to use it You have the results of several published studies of the same question and want one pooled estimate: a forest plot, how much the studies disagree (heterogeneity), and whether small studies tell a different story (a funnel plot). Hazard ratios you reconstructed from Kaplan-Meier curves can be pooled here too.
Risk-of-bias figures
When to use it You have judged each study's risk of bias with a published tool or your own checklist, and want the two figures journals ask for: the traffic-light plot (every study in every domain) and the summary bar plot. The judgements are yours; the page only draws them.
Every label is yours: the domain names, the scale and the tool's name you type. Cite the tool you used in your manuscript. The figures follow the layout of robvis (McGuinness and Higgins 2021), which the references cite.
PRISMA 2020 flow diagram
When to use it You have run the searches and the screening of a systematic review and need the flow diagram PRISMA 2020 asks for. Type the number in each box: the page checks that they add up from box to box and draws the diagram for your manuscript.
The boxes and their labels follow the PRISMA 2020 flow diagram templates (Page MJ, et al. BMJ 2021;372:n71; prisma-statement.org), published under the Creative Commons Attribution licence (CC BY 4.0). The diagram carries the attribution line the licence asks for.
Plan a study
Sample size and power
When to use it Before a study with two groups, or with the same patients measured twice: how many patients you need to detect the difference that matters, or how much power the patients you can get will give you.
Check your inbox to confirm.
We sent a confirmation link to . Open it within 48 hours and press Confirm on the page it opens: the letters start, and your access to the assistant opens.
Nothing after a few minutes? Look in Promotions or Spam.
How it works
Cite it. If you use an analysis or a figure from this page in a manuscript, please cite the tool: how to cite AskDimitri Stats. Every result also carries the citation with today's date, and its methods sentence names the tool and its version.
Checked against standard software. Every calculation is written for this page and tested against R or Python: SciPy, statsmodels and lifelines, and R packages where those lack a method. Where the page differs from them on purpose, the methods archived on Zenodo say why. The version number changes whenever a calculation changes.
Figures for journals. The figures are drawn by code from your numbers: no AI, no logo, no watermark. White background, Inter, editable title and axis labels, a colour-blind-safe palette or greyscale, 89 mm or 180 mm wide, saved as PNG at 300 or 600 dpi, TIFF or SVG.
Colab notebooks. Each result can be downloaded as a notebook with your data and the Python code that reproduces the numbers and the figure, for you or a statistician to check and extend. To open it: go to colab.research.google.com, choose File > Upload notebook and pick the file, then Runtime > Run all. The notebook is written on this page; nothing is uploaded until you do it yourself.
What it does not do. No repeated-measures ANOVA. Logistic, linear and Cox regression fit the covariates you choose in advance; nothing here selects them for you, and none of them handles repeated measurements or clustered patients. For a study's main analysis, involve a statistician early.
Built by Dr. Dimitrios Magouliotis for the doctors who read Dimitri's Letters. See the Privacy policy.
AskDimitri Stats version 1.6 doi:10.5281/zenodo.24546187 How to cite
Made with the free AskDimitri Stats: askdimitri.net/tools/stats