Ask HN: What programming language to learn for a statistician?
My SO, is currently a statistician/data research, she primarily that works in excel/vba/sql.
As she works in the public sector, we would like to broaden her employment prospects and looking at most J/Ds for Data Scientists or similar stats based roles programming is a must.
So which is the most suitable language to learn? Python? R?
TLDR; Data Scientists, what did you start out learning? What worked? What would you do differently?
13 comments
[ 3.3 ms ] story [ 38.0 ms ] threadFive years ago I would have said "R", but Python enthusiasts have been replicating what R does in Python at a frantic pace, and R will never really replicate what Python brings to the table.
The holy grail is something like: feed in some data, or parameters and have an algorithm generate the corresponding correct Bayesian inference and posterior distribution. It's very easy for scientists, even with years of knowledge and experience, to implement things incorrectly ;)
Check out Stan and Figaro:
http://mc-stan.org/
https://www.cra.com/technical-expertise/probabilistic-modeli...
If you can learn more than one I would recommend learning R as well, rather than other technologies such as octave or matlab..
Python is good for data engineering or pipelining, etc - but R is the best for analysis:
- Rstudio is a much more friendly interface than IPython/Jupyter notebooks
- Python's visualization libraries can't come close to ggplot2
- Python lacks an effective grammar of data manipulation better similar to dplyr or magrittr.
I think HN is more engineering focused, hence increased exposure to Python. At the places I've worked/interviewed for data science, 1 was full Python (though they have a high eng bar for data scientists, and very few data engineers), and the rest had a reasonable split of R and Python. Your SO will be fine either way but might find R more intuitive and better suited to statistics work.
Perl was also the bioinformatics golden child for a while, and I expect there are still people using it for that purpose in industry.
That said, looking beyond the public sector I'd look at Python as broadening her prospects more then anything else, just because it's more broadly used in a variety of industries, and general understanding of it is more broadly applicable.
I'd suggest she also learn enough R to import stuff and export stuff. If there are R scripts she needs to use, python can be used to script R from the command line, and she can import data, process it, and be able to export the results back into python as an intermediate step.
On the other side knowing how to work with data is IMHO more important. Being an SQL pro, knowing how to think in data sets instead of data records, when to use flat tables, how to use vectorization and matrix manipulation even for all day tasks especially in "in memory" systems is essential.
I would say SQL + R/python makes a good combination. With that you can solve a lot of problems at least two different ways. R gets integrated step by step in DWHs, what makes a lot easier. I hope SAS dies a short and painful death, but could be also a valid choice.