## Performing and reporting statistical tests

Doing a statistical analysis often involves several steps. The steps often depend on whether one is doing one test (comparing two vectors) or multiple tests (like differential expression analysis). Much of this is ideally discussed before the experiment is performed. In brief:

- Understand the details of the experiment
- Look at the raw data
- Produce a draft figure showing the desired comparison
- Determine the statistical test(s)
- Organize the data
- Perform the statistical test(s)
- Do multiple hypothesis correction (if needed)
- Interpret the statistical test
- Report the results and the detailed methods

In more detail:

**Understand the details of the experiment**

- What is the big picture? What is begin studied? Why was the experiment performed?
- What is the experimental design? Is there biological and/or technical replication?
- What measurements were taken?
- Is there any missing data? How should that be handled?
- What specific question is the statistics hoping to address? This can be tricky, as slightly different questions may require completely different tests.

**Look at the raw data**

- Do some kind of scatterplot to show all the data.
- What does a global look at the data tell you?
- Did the experiment work?
- How are the values distributed?
- Are there any obvious problems?
- Are there obvious batch effects?
- Are there any obvious "outliers" due to some technical (or biological) reason? Be very careful about removing these (and be prepared to report how/why they were removed).
- Could the data need some form of normalization or scaling to make factors more comparable?

**Produce a draft figure showing the desired comparison**

- What comparisons should be made?
- Does it look to the eye that there's something going on? It may not be worth going any further is summary measures show nothing interesting.

**Determine the statistical test(s)**

- What test best addresses the question the scientist is asking?
- Is there a standard test for this method?
- Does you data meet all assumptions required of the test?
- Given the answers to the above question, the best test may be the simplest one.
- GraphPad (makers of Prism) has a nice but brief presentation about How to Choose the Right Statistical Test that's a good place to start. Prism documentation includes lots of additional informative details for scientists who aren't experts in statistics.

**Organize the data**

- Is the data in a format that can be used by the statistical software? R, for example, has a concept of "wide" and "long" data formats.
- Does it make sense to scale, normalize, or transform (such as with logs) the data? This is generally recommended to make the data more amenable to the assumptions (requirements) of the statistical test.

**Perform the statistical test(s)**

- Run the analysis with a tool like R, Prism, or Excel.
- Capture all of the appropriate results and details of the test, often more than just the p-value.
- Does the software produce any warnings? If so, how should you react?

**Do multiple hypothesis correction**

- If more than one test is performed, you probably need multiple hypothesis correction.
- Which is better: Bonferroni, FDR, or another test?
- Be prepared to explain why this is necessary.

**Interpret the statistical test(s)**

- What does the p-value and/or the confidence interval tell you?
- Does the statistical model of the data effectively describe the data? How valid is the p-value?
- Does the statistics imply that the result is biologically meaningful (Perhaps the hardest question)?

**Report the results and the detailed methods**

- What figure(s) best displays the data and summarizes the analysis? Unless there are lots of data points (> 10 or 100, for example), display them all (perhaps along with summary metrics).
- Describe and/or show the confidence interval, the effect size, and/or another measure of the magnitude of an effect/change (and not just the p-value).
- What can be concluded from the analysis? How generally does this apply?
- How many significant figures should be reported?
- Report the method with enough detail so that, with the original data, a knowledgeable person could replicate the statistical analysis.

Through all of this, resist any temptation to bias the analysis to produce the result one wants or expects.

### Some journals explicitly state statistics guidelines

- Check with a statistician as early as possible in the project, preferably in the planning stage.
- Some of these guidelines (such as sample size / power calculations) are designed to optimize your experimental design. Performing these analyses after the experiment is performed is not very helpful to the experimenter.
- Nature Reporting Checklist, Manuscript checklist, and Reporting Life Sciences Research
- Journals of the American Society of Microbiology Infection and Immunity Instructions to Authors (See "Statistics" on page 19)
- Science Translational Medicine Instructions for authors of new research articles (see "Experimental Design and Statistics Guidelines")