Free tool · Version 1.1

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.

  1. Your dataOpen a spreadsheet, or paste
  2. Which test?Say what you want to know
  3. ResultsFigure, sentences, citation
Jump to a section

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?

Answer up to six 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.

    What do you want to do?

    Step three

    Run the analysis

    Each analysis 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 tells you whether to report the mean (SD) or the median (IQR), and why.

    No data to hand?

    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 mean. For example: is our operating time different from the 180 minutes reported in the literature?

    Test

    No data to hand?

    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 for roughly symmetric data, the rank tests for skewed data.

    Design
    Test

    No data to hand?

    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.

    Test

    No data to hand?

    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.

    Groups in the rows, the outcome in the columns, the event first.

    No data to hand?

    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

    1 2

    No data to hand?

    Observed against expected

    Expected deaths come from

    No data to hand?

    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.

    Count the pairs: rows are the first measurement, columns the second. The two shaded cells are the patients who changed.

    Second: yesSecond: no
    First: yes
    First: no

    No data to hand?

    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.

    Your data

    Rows: rater 1. Columns: rater 2. The diagonal is where they agree.

    No data to hand?

    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.

    No data to hand?

    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.

    Coefficient

    No data to hand?

    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.

    No data to hand?

    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. Keep about 10 events per covariate.

    Tied event times

    No data to hand?

    How to cite, and how it works

    Cite it. If you use an analysis or a figure from this page in a manuscript, please cite the tool. Every result carries the citation with today's date and a Copy button. The methods sentence names the tool and its version.

    Checked against standard software. Every calculation is written for this page and tested against SciPy, statsmodels and lifelines, the Python libraries statisticians use. 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 logistic or linear regression, no repeated-measures ANOVA and no sample size calculation. The chooser says so when that is what you need. 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.

    Made with the free AskDimitri Stats: askdimitri.net/tools/stats