Editing Is it chance? Use a T-Test to identify how likely an intervention worked
Jump to navigation
Jump to search
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 1: | Line 1: | ||
− | + | 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”<ref>https://en.wikipedia.org/wiki/Student%27s_t-test</ref>, which provides you with a ''p-value'' after doing the t-test. Generally, statisticians use the concept of ''p-value''s 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''<nowiki/>' 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]]. | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | === t-tests in Excel=== | ||
− | Here’s an example for how to do | ||
+ | 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: | Your simple spreadsheet might look like this: | ||
Line 42: | Line 21: | ||
Track your sleep under two columns: one for nights when you took the supplement, and the other for nights you didn’t. | 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 <code>T.TEST</code> will calculate the | + | The built-in Excel statistical function <code>T.TEST</code> will calculate the P-Value when you give it two ranges<ref>https://support.microsoft.com/en-us/office/t-test-function-d4e08ec3-c545-485f-962e-276f7cbed055</ref>, 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): | The formula for doing the t-test is this (see the screenshot for the exact formula in the example): | ||
Line 48: | Line 27: | ||
<code>=T.TEST(array1,array2,tails,type)</code> | <code>=T.TEST(array1,array2,tails,type)</code> | ||
− | Enter a <code>1</code> for <code>tails</code> (because we’re only interested in one | + | Enter a <code>1</code> for <code>tails</code> (because we’re only interested in one measurement, sleep) and a <code>2</code> for type (because in this case our samples are not of the same length). |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | The P Value in this example, <code>0.24</code>, is above <code>0.05</code> and therefore we will assume that any difference in sleep between the nights is due to pure chance. | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | </ | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
==References== | ==References== | ||
<references /> | <references /> | ||
− | + | {{Topic Queries}} | |
− | [[Category: | + | [[Category:Topics]] |