Question 1

x <- read.csv("https://raw.githubusercontent.com/tmatis12/datafiles/refs/heads/main/RadDat_IMSE.csv")

x <- x[x$Ordered.to.Complete...Mins >= 0, ]

medicare <- x$Ordered.to.Complete...Mins[x$PatientAge >= 65]

Q1 <- quantile(medicare, 0.25)
Q3 <- quantile(medicare, 0.75)

medicare.iqr <- medicare[medicare >= Q1 & medicare <= Q3]

hist(medicare.iqr,
     breaks = 15,
     main = "Time to Fill X-rays",
     xlab = "Time in Minutes",
     ylab = "Frequency",
     col = "green",
     border = "blue")

The shape of this histogram is normally distributed with a slight skew to the right. I noticed that the skew appears more pronounced when using a larger number of bins.

Question 2

median(x$Ordered.to.Complete...Mins[x$Radiology.Technician == 62])
## [1] 80
median(x$Ordered.to.Complete...Mins[x$Radiology.Technician == 65])
## [1] 27

In this case, I am not sure how to interpret the comparison for multiple reasons. First, the median completion times are vastly different, which makes me wonder if these technicians are even following the same process. Second, this may not be a fair comparison because the technicians could be working in different areas of the hospital or handling different types of X-ray orders.

Question 3

Stat <- x$PatientAge[x$Priority == "STAT"]
Routine <- x$PatientAge[x$Priority == "Routine"]

boxplot(Stat, Routine,
        names = c("Stat", "Routine"),
        main = "Patient Age W.R.T Priority",
        xlab = "Priority",
        ylab = "Age")

The boxplots show that the STAT category has a wider range of patient ages, while the Routine group has several outliers.

Question 4

Floor3 <- x$Ordered.to.Complete...Mins[x$Loc.At.Exam.Complete == "3W"]
Floor4 <- x$Ordered.to.Complete...Mins[x$Loc.At.Exam.Complete == "4W"]

mean(Floor3)
## [1] 1463.051
sd(Floor3)
## [1] 3894.639
mean(Floor4)
## [1] 1675.451
sd(Floor4)
## [1] 4387.644

The means and standard deviations are similar but not equal. Since Floor 3 has the lower mean completion time, we can assume that, on average, they finish their X-rays faster. This difference could be due to the floor layout,or the effort and efficiency of the technicians working on that floor.