<p><div><div><div><div data-width="100" data-show-faces="false" data-send="true" data-layout="button_count" data-height="21" data-href="http://www.r-bloggers.com/most-probable-birth-month/"></div></div><div><a data-url="http://www.r-bloggers.com/most-probable-birth-month/" data-counturl="http://www.r-bloggers.com/most-probable-birth-month/" data-count="horizontal" data-text="Most Probable Birth Month" class="twitter-share-button" data-via="rbloggers" href="https://twitter.com/share"></a></div><div></div></div><div></div></div>
<div>
(This article was first published on <strong><a href="http://www.exegetic.biz/blog/2016/07/most-probable-birth-month/"> R – Exegetic Analytics</a></strong>, and kindly contributed to <a rel="nofollow" href="http://www.r-bloggers.com/">R-bloggers)</a> </div>
<p>In a <a target="_blank" href="http://www.exegetic.biz/blog/2016/07/major-league-baseball-birth-months/">previous post</a> I showed that the data from <a target="_blank" href="http://www.baseball-reference.com/">www.baseball-reference.com</a> support Malcolm Gladwell’s contention that more professional baseball players are born in August than any other month. Although this might be explained by the 31 July cutoff for admission to baseball leagues, it was suggested that it could also be linked to a <a target="_blank" href="http://www.livescience.com/32728-baby-month-is-almost-here-.html">larger proportion of babies being born in August</a>.</p>
<p>In order to explore this idea I gathered data from <a target="_blank" href="http://www.exegetic.biz/blog/2016/07/most-probable-birth-month/">http://www.cdc.gov/</a> for births in the USA between 1994 and 2014. These data as well as the baseball data have been published as a R package <a target="_blank" href="https://github.com/DataWookie/lifespan">here</a>. Install using</p>
<pre>
> devtools::install_github(&quot;DataWookie/lifespan&quot;)
> library(lifespan)
</pre>
<p>Let’s explore the hypothesis regarding non-uniform birth months.</p>
<pre>
> library(dplyr)
> group_by(births, month) %>% summarise(count = sum(count))
Source: local data frame [12 x 2]

    month   count
   (fctr)   (int)
1     Jan 6906798
2     Feb 6448725
3     Mar 7080880
4     Apr 6788266
5     May 7112239
6     Jun 7059986
7     Jul 7461489
8     Aug 7552007
9     Sep 7365904
10    Oct 7220646
11    Nov 6813037
12    Dec 7079453
</pre>
<p>There is definitely significant non-uniformity:</p>
<pre>
> chisq.test(.Last.value$count)

	Chi-squared test for given probabilities

data:  .Last.value$count
X-squared = 149000, df = 11, p-value &lt;2e-16
</pre>
<p>We can dig into that a little deeper and see the total number of births between 1994 and 2014 broken down by month. The aggregate for August is certainly higher than any other month, but only marginally larger than that for July.<br>
<img sizes="(max-width: 800px) 100vw, 800px" srcset="http://i0.wp.com/www.exegetic.biz/blog/wp-content/uploads/2016/07/births-totals.png?resize=456%2C342 800w, http://www.exegetic.biz/blog/wp-content/uploads/2016/07/births-totals-624x468.png 624w" alt="births-totals" class="wp-image-3662" src="http://i0.wp.com/www.exegetic.biz/blog/wp-content/uploads/2016/07/births-totals.png?resize=456%2C342" data-recalc-dims="1"><br>
Delving still deeper we find that the monthly counts exhibit significant variation from year to year and that August has some appreciable outliers.<br>
<img sizes="(max-width: 800px) 100vw, 800px" srcset="http://i1.wp.com/www.exegetic.biz/blog/wp-content/uploads/2016/07/births-boxplot.png?resize=456%2C342 800w, http://www.exegetic.biz/blog/wp-content/uploads/2016/07/births-boxplot-624x468.png 624w" alt="births-boxplot" class="wp-image-3661" src="http://i1.wp.com/www.exegetic.biz/blog/wp-content/uploads/2016/07/births-boxplot.png?resize=456%2C342" data-recalc-dims="1"><br>
Specifically, August in 2006 and 2007 appear to have been bumper births months. Interesting!</p>
<pre>
> group_by(births, year, month) %>% summarise(count = sum(count)) %>% ungroup() %>%
+   arrange(desc(count))
Source: local data frame [252 x 3]

    year  month  count
   (int) (fctr)  (int)
1   2007    Aug 391117
2   2006    Aug 388481
3   2007    Jul 380356
4   2008    Jul 376105
5   2006    Sep 375389
6   2008    Aug 374028
7   2007    Oct 370069
8   2005    Aug 370045
9   2009    Jul 369117
10  2008    Sep 368660
..   ...    ...    ...
</pre>
<p>Of course, a peak in overall births in August does not mean that there’s a direct causative link to the peak in professional baseball players’ births. But the contribution cannot be ignored.</p>
<p><div><div><div><div data-width="55" data-show-faces="false" data-send="true" data-layout="box_count" data-height="62" data-href="http://www.r-bloggers.com/most-probable-birth-month/"></div></div><div><a data-url="http://www.r-bloggers.com/most-probable-birth-month/" data-counturl="http://www.r-bloggers.com/most-probable-birth-month/" data-count="vertical" data-text="Most Probable Birth Month" class="twitter-share-button" data-via="rbloggers" href="https://twitter.com/share"></a></div><div></div></div><div></div></div>
<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.exegetic.biz/blog/2016/07/most-probable-birth-month/"> R – Exegetic Analytics</a></strong>.</div>
<hr>
<a rel="nofollow" href="http://www.r-bloggers.com/">R-bloggers.com</a> offers <strong><a rel="nofollow" href="http://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="http://www.r-project.org/">R</a> news and <a title="R tutorials" rel="nofollow" href="http://www.r-bloggers.com/?s=tutorial">tutorials</a> on topics such as: <a title="Data science" rel="nofollow" href="http://www.r-bloggers.com/?s=data%20science">Data science</a>, <a title="Big Data" rel="nofollow" href="http://www.r-bloggers.com/?s=Big%20Data">Big Data, <a title="R jobs" rel="nofollow" href="http://www.r-users.com/">R jobs</a>, visualization (<a title="ggplot and ggplot2 tutorials" rel="nofollow" href="http://www.r-bloggers.com/?s=ggplot2">ggplot2</a>, <a title="Boxplots using lattice and ggplot2 tutorials" rel="nofollow" href="http://www.r-bloggers.com/?s=boxplot">Boxplots</a>, <a title="Maps and gis" rel="nofollow" href="http://www.r-bloggers.com/?s=map">maps</a>, <a title="Animation in R" rel="nofollow" href="http://www.r-bloggers.com/?s=animation">animation</a>), programming (<a title="RStudio IDE for R" rel="nofollow" href="http://www.r-bloggers.com/?s=RStudio">RStudio</a>, <a title="Sweave and literate programming" rel="nofollow" href="http://www.r-bloggers.com/?s=sweave">Sweave</a>, <a title="LaTeX in R" rel="nofollow" href="http://www.r-bloggers.com/?s=LaTeX">LaTeX</a>, <a title="SQL and databases" rel="nofollow" href="http://www.r-bloggers.com/?s=SQL">SQL</a>, <a title="Eclipse IDE for R" rel="nofollow" href="http://www.r-bloggers.com/?s=eclipse">Eclipse</a>, <a title="git and github, Version Control System" rel="nofollow" href="http://www.r-bloggers.com/?s=git">git</a>, <a title="Large data in R using Hadoop" rel="nofollow" href="http://www.r-bloggers.com/?s=hadoop">hadoop</a>, <a title="Web Scraping of google, facebook, yahoo, twitter and more using R" rel="nofollow" href="http://www.r-bloggers.com/?s=Web+Scraping">Web Scraping</a>) statistics (<a title="Regressions and ANOVA analysis tutorials" rel="nofollow" href="http://www.r-bloggers.com/?s=regression">regression</a>, <a title="principal component analysis tutorial" rel="nofollow" href="http://www.r-bloggers.com/?s=PCA">PCA</a>, <a title="Time series" rel="nofollow" href="http://www.r-bloggers.com/?s=time+series">time series</a>, <a title="finance trading" rel="nofollow" href="http://www.r-bloggers.com/?s=trading">trading</a>) and more...
<img height="1" alt="" width="1" src="http://feeds.feedburner.com/~r/RBloggers/~4/eqY1LyMKuOE"></a></div>