Is it chance? Use a T-Test to identify how likely an intervention worked

From Personal Science Wiki
Jump to navigation Jump to search

A frequent problem in personal science is that you tried an intervention and want to see if it worked. But you are unsure whether any differences you observed are maybe just by chance. So how can you see how likely is it that the results were chance?

Solution

One of the simplest tests is a T-Test, sometimes called a “Student T Test”[1], which provides you with a p-value after doing the t-test. Generally, statisticians use the concept of p-values to discuss how often you would expect to observe the effect you did observe just by chance. A a simplified example, a p-value of 0.05 means that you would randomly observe this effect in 5 out of 100 retries of your intervention just by pure chance. While this crude measure doesn’t describe all the ways something might happen due to chance, generally the lower the p-value, the better.

Professional scientists, especially those who understand statistics, are skeptical of claiming a result based purely on p-values, but for Personal Science purposes, it’s a good start. There is no “correct” p-value cutoff that determines whether an effect is not due to chance alone, but traditionally people assume that any p-value that is smaller than 0.05 deserves a closer look and indicates that is probably a 'real' effect.

What you need

To be able to perform a t-test you need your numerical data which is split into exactly two conditions.

t-tests in Excel

Here’s an example for how to do this in Excel.

Suppose you would like to know if taking a Melatonin supplement will help you sleep longer. You’ve measured your daily sleep, taking the supplements on some days (the “intervention”) and not on others (“control”).

Your simple spreadsheet might look like this:

Excel screen shot showing T Test Data
Compare an intervention with its affect on sleep.

Track your sleep under two columns: one for nights when you took the supplement, and the other for nights you didn’t.

The built-in Excel statistical function T.TEST will calculate the P-Value when you give it two ranges[2], one for the “intervention” (the nights we took Melatonin) and the “control” (the nights without).

The formula for doing the t-test is this (see the screenshot for the exact formula in the example):

=T.TEST(array1,array2,tails,type)

Enter a 1 for tails (because we’re only interested in one measurement, sleep) and a 2 for type (because in this case our samples are not of the same length).

The P Value in this example, 0.24, is above 0.05 and therefore we will assume that any difference in sleep between the nights is due to pure chance.

References

Linked content on this wiki

(The content in the table below is automatically created. See Template:Topic Queries for details. If newly linked pages do not appear here, click on "More" and "Refresh".)

Tools related to this topic  
Excel
Projects related to this topic  
Self researchers related to this topic  
We talked about this topic in the following meetings