Pidgey Evolution: Effects on Combat Power and Hit Points (Updated)

I was evolving some Pokemon in Pokemon Go and wondered how much the Pokemon’s attributes change after evolution. The attributes of interest were combat power (CP) and hit points (HP). I focused my analysis from Pidgeys because I had the most data points for this species. I collected data from a couple of days’ evolution, available for viewing here. Both times I was using a Lucky Egg. x <- read. [Read More]

Birthday Problem at Work

My coworker keeps a list of our coworkers’ birthdays so she can plan a monthly celebration. There are 36 of us in the office, and it turns out that none of us have the same birthday. My coworker wondered what was the chance of that happening. As it turns out, the birthday problem is a classic probability question. Given a certain number of people, what is the probability that two of them have the same birthday? [Read More]

Electric Vehicle Parking at Honolulu International Airport

In Hawaii, electric cars park for free at state owned parking lots. This is a big benefit when we travel since the airport parking lot is normally $18 per day. I wondered how much money the state loses on the electric car parking at the airport. Because I travel to Maui every week for work, I was able to collect some data to try to answer this question. Methods I made video recordings of parked cars while driving through the Honolulu International Airport interisland parking structure between November 29, 2016 and December 28, 2016. [Read More]

Pidgey Evolution: Effects on Combat Power and Hit Points

I was evolving some Pokemon in Pokemon Go today and wondered how much the Pokemon’s attributes change after evolution. The attributes of interest were combat power (CP) and hit points (HP). I focused my analysis from Pidgeys because I had the most data points for this species. I collected data from one day’s evolution, available for viewing here. x <- read.csv("../datasets/evolution.csv") x <- tbl_df(x) pidgeys <- filter(x, pokemon == "Pidgey") pidgeys ## # A tibble: 12 × 7 ## pokemon CP_pre HP_pre kg_pre CP_post HP_post kg_post ## <fctr> <int> <int> <dbl> <int> <int> <dbl> ## 1 Pidgey 270 NA NA 533 NA NA ## 2 Pidgey 267 NA NA 515 NA NA ## 3 Pidgey 259 NA NA 526 NA NA ## 4 Pidgey 212 NA NA 413 NA NA ## 5 Pidgey 209 43 2. [Read More]

Simple Secret Santa Picker

A post about automating Secret Santa assignments popped up in my Facebook feed the other day. This being the Christmas season, I took a look. It seemed a bit complex, and I wondered if I could make it more efficient. The original function took in a list of people (e.g., Ann, Bill, Chris). Using a nested while-for loop, it randomly picked a name (Bill), and matched it to the first person in the list (Ann:Bill). [Read More]
random 

An Unlucky Fantasy Football Season Is Over

The regular fantasy football season just finished, and as usual, my team underperformed. I had the 3rd most points in the league and finished 7 out of 8 teams with a record of 4-8. I wondered what were the chances of such a bad record. This called for a simulation! Methods I transcribed all the scores for each game into a spreadsheet and loaded it into R. library(dplyr) ## ## Attaching package: 'dplyr' ## The following objects are masked from 'package:stats': ## ## filter, lag ## The following objects are masked from 'package:base': ## ## intersect, setdiff, setequal, union dat <- read. [Read More]

Convection vs. Conventional Electric Oven Speed in Roasting Turkey

It’s the day after Thanksgiving, and we have data on another turkey. This year our electricity went out just before I was going to put the turkey in our old electric oven so I had to go to my parents’ house to cook the turkey. They just got a fancy new oven with convection roasting, and they claimed it would be faster. This called for an analysis! Methods Like last year, I took measurements of the probe thermomenter inserted into the deepest part of the breast. [Read More]

Will I Pass My Board Exam?

I am in the process of studying for my pediatrics board recertification and the pass rate is rumored to be about 75% of the questions correct. I got 163/199 (82%) of the questions correct on my practice exam. What is the probability that I will get at least 75% on my 200 question board exam based on this performance? Here’s the exact binomial way to figure it out. The idea is that if my probability of getting any question right is 0. [Read More]

Scale Model of Solar System

One of my son’s Cub Scout “adventures” requires him to create a scale model of the solar system. We sketched the calculations on the back of a receipt over lunch. We started with the distance we figured that we would use (length of our street, 387 feet) and then calculated the distances to each planet based on this. I figured it would be neat to create a function in R that would return a table of the relative distances based on a given model solar system radius. [Read More]

Most Yards of Offense by a College Football Team in a Shutout Loss

Introduction The purpose of this document is to explore the most yards in a shutout loss for a college football team. It was inspired after the University of Hawai`i gave up 462 yards in shutting out San Jose State on November 15, 2014. I wanted to see if I could use the dplyr package to explore this question. library(dplyr) ## Warning: Installed Rcpp (0.12.12) different from Rcpp used to build dplyr (0. [Read More]