Use Scrambling to Test for Independence |
How To... > Create Simulations > Use Scrambling to Test for Independence Suppose you have two attributes that you think might be related to each other. You do an experiment, and, sure enough, there does appear to be a relationship. But you have to acknowledge that it could be just chance that has produced the result. Is the relationship real or spurious? One way to investigate this question is to use a technique called scrambling. First, you define some measure, call it relatedness, that quantifies the strength of the relationship between the two attributes. Then you scramble the values of one of the attributes, thereby breaking any relationship that does exist. You record the resulting value of the relatedness statistic. By repeating the scrambling and recording process, you see how the relatedness statistic varies when the relationship is guaranteed to be broken. Comparing the value of the relatedness statistic from the original data with the distribution of the relatedness statistic under pure chance variation allows you to estimate the probability that relatedness as extreme as the original value would have been produced purely by chance. What scrambling does is very simple. It takes all the values of an attribute of your choice and rearranges them randomly. The other attributes are left untouched. Whatever relationship you observe between the scrambled attribute and other attributes after scrambling has to be due to chance. See also |