Conceptual Overview
Perhaps the simplest form of relationship mining
Finding substantial correlations between variables
In a large set of variables
r(A,B) =
When A’s value changes, does B change in the same direction?
Assumes a linear relationship
1.0 – perfect
0.0 – none
-1.0 – perfectly negatively correlated
In between – depends on the field
1.0 – perfect
0.0 – none
-1.0 – perfectly negatively correlated
In between – depends on the field
In physics – correlation of 0.8 is weak!
In education – correlation of 0.3 is good
From Denis Boigelot, available on Wikipedia
Anscombe’s Quartet
The correlation, squared
Also a measure of what percentage of variance in dependent measure is explained by a model
If you are predicting A with B,C,D,E r2 is often used as the measure of model goodness rather than r (depends on the community)
Rank correlation
Turn each variable into ranks 1 = highest value, 2 = 2nd highest value, 3 = 3rd highest value, and so on
Then compute Pearson’s correlation
(There’s actually an easier formula, but not relevant here)
Interpreted exactly the same way as Pearson’s correlation
1.0 – perfect
0.0 – none
-1.0 – perfectly negatively correlated
More robust to outliers
Determines how monotonic a relationship is, not how linear it is
You have 100 variables, and you want to know how each one correlates to a variable of interest
You have 100 variables, and you want to know how they correlate to each other
Studying relationships between questionnaires on traditional motivational constructs (goal orientation, grit, interest) and student reasons for taking an online course
Correlating features of the design of mathematics problems to a range of outcome measures
Correlating features of schools to a range of outcome measures
You run 100 correlations (or 10,000 correlations)
9 of them come up statistically significant
Which ones can you “trust”?
Set p=0.05
Then, assuming just random noise
5% of your correlations will still turn up statistically significant
FWER – Familywise Error Rate
FDR – False Discovery Rate
The classic approach to FWER correction is the Bonferroni Correction
Ironically, derived by Miller rather than Bonferroni
Ironically, derived by Miller rather than Bonferroni
Also ironically, there appear to be no pictures of Miller on the internet
A classic example of Stigler’s Law of Eponomy
A classic example of Stigler’s Law of Eponomy
“No scientific discovery is named after its original discoverer”
Stigler’s Law of Eponomy was proposed by Robert Merton
If you are conducting n different statistical tests on the same data set
Adjust your significance criterion α to be α / n
E.g. For 4 statistical tests, use statistical significance criterion of 0.0125 rather than 0.05
Five tests
Five corrections
All p compared to α= 0.01
None significant anymore
p=0.04 seen as being due to chance
Five tests
Five corrections
All p compared to α= 0.01
None significant anymore
p=0.04 seen as being due to chance
Does this seem right?
Five tests
Five corrections
All p compared to α= 0.01
Only p=0.001 still significant
Five tests
Five corrections
All p compared to α= 0.01
Only p=0.001 still significant
Does this seem right?
Advantages
You can be “certain” that an effect is real if it makes it through this correction
Does not assume tests are independent
Disadvantages
Massively over-conservative
Throws out everything if you run a lot of correlations
Which ones are still significant?
0.1 0.05
0.01 0.005
0.001 0.0005
0.0001 0.00005
Arguments for rejecting the sequential Bonferroni in ecological studies. MD Moran - Oikos, 2003 - JSTOR
Beyond Bonferroni: less conservative analyses for conservation genetics. SR Narum - Conservation Genetics, 2006 – Springer
What’s wrong with Bonferroni adjustments. TV Perneger - Bmj, 1998 - bmj.com
p Value fetishism and use of the Bonferroni adjustment. JF Morgan - Evidence Based Mental Health, 2007
Holm Correction/Holm’s Step-Down (Toothaker, 1991)
Tukey’s HSD (Honestly Significant Difference)
Sidak Correction
Still generally very conservative
Lead to discarding results that probably should not be discarded
(Benjamini & Hochberg, 1995)
p<0.05
A test is treated as rejecting the null hypothesis if there is a probability of under 5% that the results could have occurred if there were only random events going on
This paradigm accepts from the beginning that we will accept junk (e.g. Type I error) 5% of the time
p<0.05
Each test is treated as rejecting the null hypothesis if there is a probability of under 5% divided by N that the results could have occurred if there were only random events going on
This paradigm accepts junk far less than 5% of the time
p<0.05
Across tests, we will attempt to accept junk exactly 5% of the time
Order your n tests from most significant (lowest p) to least significant (highest p)
Test your first test according to significance criterion α * 1 / n
Test your second test according to significance criterion α * 2 / n
Test your third test according to significance criterion α*3 / n
Quit as soon as a test is not significant
Five tests
Five tests
First correction
p = 0.001 compared to α= 0.01
Still significant!
Five tests
Second correction
p = 0.011 compared to α= 0.02
Still significant!
Five tests
Third correction
p = 0.02 compared to α= 0.03
Still significant!
Five tests
Fourth correction
p = 0.03 compared to α= 0.04
Still significant!
Five tests
Fourth correction
p = 0.04 compared to α= 0.05
Still significant!
Five tests
Five tests
First correction
p = 0.04 compared to α= 0.01
Not significant; stop
Much less conservative than Bonferroni Correction
Much more conservative than just accepting p<0.05, no matter how many tests are run
Which ones are still significant?
0.05 0.04
0.03 0.02
0.01 0.008
0.006 0.004
If your stat tests have negative regression dependency
i.e. if one of your tests being significant makes it less likely that other tests are significant
This shows up, for example, when you are studying the relationships between one variable and a group of mutually exclusive variables
Then you can’t use B&H and have to use another (more complex) control, Benjamini & Yekutieli (2001)
p = probability that the results could have occurred if there were only random events going on
q = probability that the current test is a false discovery, given the post-hoc adjustment
q can actually be lower than p
In the case where there are many statistically significant results
Benjamini & Hochberg is my preferred post-hoc test
But for some inexplicable reason, there are many r and python packages that say they do B&H but secretly do something else
Use alpha.correction.bh or do it by hand
Correlation mining can be a powerful way to see what factors are mathematically associated with each other
Important to get the right level of conservatism