<div>
<p>Over the last two years I’ve occasionally been giving a very basic tutorial to Bayesian statistics using R and <a target="_blank" rel="nofollow" href="http://mc-stan.org/">Stan</a>. At the end of the tutorial I hand out an exercise for those that want to flex their newly acquired skills. I call this exercise <em>Bayesian computation with Stan and Farmer Jöns</em> and it’s pretty cool! Now, it’s not cool because of <em>me</em>, but because the expressiveness of Stan allowed me to write a small number of data analytic questions that quickly takes you from running a simple binomial model up to running a linear regression. Throughout the exercise you work with the same model code and each question just requires you to make a <em>minimal</em> change to this code, yet you will cover most models taught in a basic statistics course! Well, briefly at least… <img alt="🙂" class="wp-smiley" src="https://s.w.org/images/core/emoji/2/72x72/1f642.png"> If you want to try out this exercise yourself, or use it for some other purpose, you can find it here:</p>
<p><a target="_blank" rel="nofollow" href="http://www.sumsar.net/files/posts/2017-01-15-bayesian-computation-with-stan-and-farmer-jons/stan_exercise.html">Beginners Exercise: Bayesian computation with Stan and Farmer Jöns</a> (<a target="_blank" rel="nofollow" href="http://www.sumsar.net/files/posts/2017-01-15-bayesian-computation-with-stan-and-farmer-jons/stan_exercise.Rmd">R-markdown source</a>) <br>
<a target="_blank" rel="nofollow" href="http://www.sumsar.net/files/posts/2017-01-15-bayesian-computation-with-stan-and-farmer-jons/stan_exercise_answers.html">Solutions to Bayesian computation with Stan and Farmer Jöns</a> (<a target="_blank" rel="nofollow" href="http://www.sumsar.net/files/posts/2017-01-15-bayesian-computation-with-stan-and-farmer-jons/stan_exercise_answers.Rmd">R-markdown source</a>)</p>
<p>My friend and colleague Christophe Carvenius also helped me translate this exercise into Python: </p>
<p><a target="_blank" rel="nofollow" href="https://github.com/rasmusab/bayesianprobabilitiesworkshop/blob/master/Exercise%203.ipynb">Python Beginners Exercise: Bayesian computation with Stan and Farmer Jöns</a> <br>
<a target="_blank" rel="nofollow" href="https://github.com/rasmusab/bayesianprobabilitiesworkshop/blob/master/Exercise%203%20-%20solutions.ipynb">Python Solutions to Bayesian computation with Stan and Farmer Jöns</a></p>
<p>Now, this exercise would surely have been better if I’d used real data, but unfortunately I couldn’t find enough datasets related to cows… Finally, here is a depiction of farmer Jöns and his two lazy siblings by the great master Hokusai.</p>
<p><img alt="" src="https://i0.wp.com/www.sumsar.net/images/posts/2017-01-15-bayesian-computation-with-stan-and-farmer-jons/hokusai_farmers.jpeg?w=456" data-recalc-dims="1"></p>
<p></p>
<p>
<div>
<div>To <strong>leave a comment</strong> for the author, please follow the link and comment on their blog: <strong><a href="http://www.sumsar.net/blog/2017/01/bayesian-computation-with-stan-and-farmer-jons/"> Publishable Stuff</a></strong>.</div>
<hr>
<a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers.com</a> offers <strong><a rel="nofollow" href="https://feedburner.google.com/fb/a/mailverify?uri=RBloggers">daily e-mail updates</a></strong> about <a title="The R Project for Statistical Computing" rel="nofollow" href="https://www.r-project.org/">R</a> news and <a title="R tutorials" rel="nofollow" href="https://www.r-bloggers.com/search/tutorial">tutorials</a> on topics such as: <a title="Data science" rel="nofollow" href="https://www.r-bloggers.com/search/data%20science">Data science</a>, <a title="Big Data" rel="nofollow" href="https://www.r-bloggers.com/search/Big%20Data">Big Data, <a title="R jobs" rel="nofollow" href="https://www.r-users.com/">R jobs</a>, visualization (<a title="ggplot and ggplot2 tutorials" rel="nofollow" href="https://www.r-bloggers.com/search/ggplot2">ggplot2</a>, <a title="Boxplots using lattice and ggplot2 tutorials" rel="nofollow" href="https://www.r-bloggers.com/search/boxplot">Boxplots</a>, <a title="Maps and gis" rel="nofollow" href="https://www.r-bloggers.com/search/map">maps</a>, <a title="Animation in R" rel="nofollow" href="https://www.r-bloggers.com/search/animation">animation</a>), programming (<a title="RStudio IDE for R" rel="nofollow" href="https://www.r-bloggers.com/search/RStudio">RStudio</a>, <a title="Sweave and literate programming" rel="nofollow" href="https://www.r-bloggers.com/search/sweave">Sweave</a>, <a title="LaTeX in R" rel="nofollow" href="https://www.r-bloggers.com/search/LaTeX">LaTeX</a>, <a title="SQL and databases" rel="nofollow" href="https://www.r-bloggers.com/search/SQL">SQL</a>, <a title="Eclipse IDE for R" rel="nofollow" href="https://www.r-bloggers.com/search/eclipse">Eclipse</a>, <a title="git and github, Version Control System" rel="nofollow" href="https://www.r-bloggers.com/search/git">git</a>, <a title="Large data in R using Hadoop" rel="nofollow" href="https://www.r-bloggers.com/search/hadoop">hadoop</a>, <a title="Web Scraping of google, facebook, yahoo, twitter and more using R" rel="nofollow" href="https://www.r-bloggers.com/search/Web+Scraping">Web Scraping</a>) statistics (<a title="Regressions and ANOVA analysis tutorials" rel="nofollow" href="https://www.r-bloggers.com/search/regression">regression</a>, <a title="principal component analysis tutorial" rel="nofollow" href="https://www.r-bloggers.com/search/PCA">PCA</a>, <a title="Time series" rel="nofollow" href="https://www.r-bloggers.com/search/time+series">time series</a>, <a title="finance trading" rel="nofollow" href="https://www.r-bloggers.com/search/trading">trading</a>) and more...
<img height="1" alt="" width="1" src="http://feeds.feedburner.com/~r/RBloggers/~4/ltoJAB2ghHU"></a></div></div>