341 points · by tomaskazemekas · 11y ago · 54 comments
On the other hand, I think there is not enough written about how to do statistics with real, large, complex data sets. I tried to write something like this (https://pavpanchekha.com/blog/stats1.html) but of course the difficulty is that investigating a complex dataset is by definition too complex to really fit into a blog post. In a large dataset, the difficulties are the how and when you make decisions about what to analyze.
It's not complex, but it requires answering scaleability questions. How do you fit the data into memory? How do you even get big data?
I managed to analyze 5.6M Hacker News comments (http://minimaxir.com/2014/10/hn-comments-about-comments/ ) by writing a scraper which dumps everything into a PostgreSQL database (https://github.com/minimaxir/get-all-hacker-news-submissions... ) because it's way too big to fit in memory. Likewise, to visualize the recent NYC taxi data, (http://minimaxir.com/2015/08/nyc-map/ ), I just used BigQuery and saved myself a load of time downloading the data and setting things up.
But in many cases, data is not easily accessible, and not cheap to store and process. I want to switch to an actual big data workflow with Spark, but running the numbers with EC2 storage and processing, it won't be cheap and I may have to set up a Patreon to subsidize things.
It really is a pity that introductions to statistics spend so much time on analytic approximations and so little on the underlying concepts.
It isn't a hack to present mathematics in an understandable way - it's a pedagogical improvement for introductory works, not a "hack".
This method of presentation makes sense to me. Most statistics classes that I've experienced were taught from the point of view of abstract math. That's certainly one way to do it, but I knew a lot of people for whom that wasn't the optimal presentation strategy. Now that computing is cheap and there is a large audience of people with programming knowledge, I think that teaching statistics through examples of simulation, bootstrapping shuffling and cross validation is a great way to learn things.
Plus, doesn't every hacker start as a script kiddie? Using something others came up with usually sparks the imagination. The next step is usually using the scripts right, followed by using the scripts extensively and finding issues, followed by making your own scripts (or improving the existing ones) to avoid these issues.
This looks pretty hackish to me.
Machine Learning for Hackers http://www.amazon.co.uk/Machine-Learning-Hackers-Drew-Conway...
Design for Hackers http://www.amazon.co.uk/Design-Hackers-Reverse-Engineering-B...
Bayesian Methods for Hackers http://www.amazon.co.uk/Bayesian-Methods-Hackers-Probabilist...
EDIT: I'm not the author, but you can find Bayesian Methods for Hackers (free, released by the author) at the link below. I think it's a great resource for anyone wanting to explore Bayesian methods using Python.
https://github.com/CamDavidsonPilon/Probabilistic-Programmin...
I've seen many, many data scientists from startups write blog posts with skewed data without using such techniques and failing to identify the potential statistical problems.
Any idiot can run a simulation, or compute "something". "Something" is only useful in context.
"If you can write a for loop, you can do statistics!" Ugh. Can nobody read anymore? It has to be a "slide deck"?
Jesus, pick up a book and ask some goddamn questions if you're interested.
Calm down.
In those cases, finding a programmatic hack around it is a very good approach for giving you reasonable results in a shorter timeframe.
http://www.meetup.com/Multithreaded-Data/events/225205209/
I think you're taking things a bit too far here.
[1]: Where poets is a possibly inaccurate metonym for "less mathematically sophisticated students"
* The Elements of Statistical Learning, by Hastie, Tibshirani and Friedman (https://web.stanford.edu/~hastie/local.ftp/Springer/OLD/ESLI...). * Probability Theory: The Logic of Science, by ET Jaynes (http://bayes.wustl.edu/etj/prob/book.pdf)
Best of luck. I can see from your post that you're thinking about performance tuning, I'm assuming you mean of software. That's a nice area - the nice part is that compared to fields like medical genetics, data on performance of software is relatively cheap to get, so a lot of issues about small sample sizes are surmountable.
Bootstrapping doesn't work for very low n (e.g. n=10) because the resamples are not smooth enough and it doesn't always work that well for estimating quantiles. But analytic methods fare pretty poorly in these circumstances too and in any case people are mostly interested in confidence intervals around the mean anyway.
See also here: http://stats.stackexchange.com/questions/172920/bootstrap-me... They give example of non pathologic distribution for which bootstrap doesn't provide good estimate. It's unform(0, theta)
https://izbicki.me/blog/how-to-create-an-unfair-coin-and-pro...
George Bernard Shaw would refer to this individual as an unreasonable man, but I prefer hacker.