Introduction

In this assignment, I chose to work with data that shows people are superstitious to have a baby on Friday the 13th. I chose this topic as I was born on Friday the 13th and wanted to see how many births were on Friday the 13th from 1994 to 2003. You can read more about at https://fivethirtyeight.com/features/some-people-are-too-superstitious-to-have-a-baby-on-friday-the-13th/

Load .CSV file into a data.frame

USbirth <- read.csv("https://raw.githubusercontent.com/fivethirtyeight/data/refs/heads/master/births/US_births_1994-2003_CDC_NCHS.csv")

Rename the columns to match data

colnames(USbirth) <- c("Year", "Month", "Date", "Day", "Birth")

Create subset of data including only Friday the 13th births

This shows a table of births only on Friday the 13th, where the months are in ascending order (ex. January = 1, February = 2…)

Friday13th <- subset(USbirth, Date == 13 & Day == 5, select = c(Year, Month, Birth) )

print(Friday13th)
##      Year Month Birth
## 133  1994     5 11085
## 378  1995     1 11071
## 651  1995    10 11078
## 987  1996     9 12019
## 1078 1996    12 10623
## 1260 1997     6 11214
## 1505 1998     2 11203
## 1533 1998     3 11120
## 1778 1998    11 10968
## 2051 1999     8 11924
## 2478 2000    10 11468
## 2660 2001     4 10741
## 2751 2001     7 11978
## 3178 2002     9 12786
## 3269 2002    12 11378
## 3451 2003     6 11821

Conclusion

In conclusion, the subset data narrows down the births to only Friday the 13th. To show whether people are superstitious of Friday the 13th birthdays, one can compare the surrounding birthday dates. More data on birthdays would be useful as the 13th day rarely falls on a Friday.