Skip to content

Instantly share code, notes, and snippets.



Created Oct 21, 2009
What would you like to do?
===== Places vs Place, 1 variable; Significance/Strength of Difference =====
Given the data for each county in one state and each county in another
(two samples), determine whether crime rate (one variable) is significantly
higher (in a statistics sense) in one state versus the other.
We're testing *one* variable, technically, but if we have a function written
up for this, we could actually forloop this and list various demographics --
population, crime rate, education, etc -- and show the difference between the
two states, and whether this difference is significant.
See the results for a SunSpider test for an example of what I mean by this:
(Run it in two browsers and paste the URL of one result into the "compare"
box on the results page of the other.)
===== Variable vs Variable, National; Correlation =====
Given the data for each individual county in the US (sample size or
population, I guess), we want to calculate how well high school graduation
rate (variable A) and poverty level (variable B) correlate.
Theoretically, you could do this within a state (instead of the whole US) to
show whether two demographics (say, income level and pregnancy rate) correlate
on a local level level.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment