Introduction to SQL (for an R user)

Although SQL is commonly used in industry, it’s not something that’s often used or taught in academia. I learned it on my own a few years ago, but since I don’t use it regularly, it’s hard to retain. To resolve this, I’ve created the following guide for basic SQL commands along with their equivalents in R/dplyr. Hopefully, this will allow me to pick it back up again more quickly in the future.

Probability of Winning an NBA Game: A Minute-by-Minute Breakdown

Your NBA team is down 17 points and there are only 8 minutes left in the game. What is the probability that they pull a comeback and win the game? It’s possible to answer this using historical data (i.e. in the past, how many teams have won after being in this situation). Given that sports commentators love to provide super specific, seemingly arbitrary statistics (e.g. no team has won Game 7 of an ECF after losing Game 6 by more than 10 points), I knew that I should be able to access the relevant data somewhere and calculate these probabilities.

Advice for Prospective PhD Students (in biostatistics)

It’s application season for graduate admissions again! As a current PhD student, I thought I would share some advice for prospective students. I’d previously written on whether you should get a PhD. In this post, I will talk about things you can do to prepare for a biostatistics PhD and the application process. As with any advice I give on this blog, it is based on my personal experience – I was a math and statistics major in undergrad at UChicago and I’m now a biostatistics PhD student at Johns Hopkins – so your mileage may vary.

What is the Effect of Increasing Voter Turnout in the U.S.?

On campaign trails across the U.S., the same message is often repeated: vote! Their goal is to encourage more people to vote, especially the people who are likely to vote for them. But which party benefits more from increasing overall voter turnout? The conventional wisdom today is that it benefits the Democratic party more than the Republican party. This is based on the working knowledge that young people of color are believed to have lower voting turnouts and are also more likely to vote for Democratic candidates.

Learning to Use Vim

Even though vim has been my default text editor for a couple of years now, I’m still woefully ignorant about how to actually use it. Because 95% of my coding time is spent in RStudio, I really only use vim to briefly edit some bash scripts and therefore my unfamiliarity with it isn’t an urgent issue. Nonetheless, I tried to rectify this shortcoming a few months ago by changing my RStudio settings to “vim mode” and forcing myself to use vim commands all the time.