setwd("/Users/isaiahmireles/Desktop/Misconceptions")
cohorts <- read.csv("cohorts.csv")

1 Relevant questions :

  • Which Questions are students often getting wrong?

    • Are there common themes across terms?
  • What is the relationship between problems

  • Does each Question positively correlate to an exam performance

  • Are there performance differences for different sections?

2 Midterm, Final Perf. Corr.

library(tidyverse)
## Warning: package 'dplyr' was built under R version 4.4.3
## ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
## ✔ dplyr     1.2.0     ✔ readr     2.1.5
## ✔ forcats   1.0.0     ✔ stringr   1.5.1
## ✔ ggplot2   4.0.0     ✔ tibble    3.2.1
## ✔ lubridate 1.9.3     ✔ tidyr     1.3.1
## ✔ purrr     1.1.0     
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## ✖ dplyr::filter() masks stats::filter()
## ✖ dplyr::lag()    masks stats::lag()
## ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
cohorts |> 
  filter(unidentified!=T) |> 
  select(-unidentified) |> 
  count(term,exam) |> 
  mutate(cumsm = cumsum(n))
  • here we see a decent balance of std. for each quarter; ignoring non-identifiable students
cohort_pairs <- 
  cohorts |> 
  filter(unidentified!=T) |>
  select(term, student_id, exam, pct) |>
  pivot_wider(
    names_from = exam,
    values_from = pct
  ) 
cohort_pairs |> nrow()
## [1] 744
cohort_pairs <- cohort_pairs |> drop_na(Midterm, Final)
plot(cohort_pairs$Midterm, cohort_pairs$Final)

  • looking at things as a whole – seems like a relatively linear relationship (disregarding particular exam & term)
cohort_pairs |>
  ggplot(aes(x = Midterm, y = Final)) +
  geom_point(alpha = 0.6) +
  geom_smooth(
    method = "lm",
    se = TRUE
  ) +
  facet_wrap(~ term) +
  scale_x_continuous(labels = scales::percent) +
  scale_y_continuous(labels = scales::percent) +
  labs(
    x = "Midterm Score",
    y = "Final Score",
    title = "Midterm vs. Final Performance by Term"
  )
## `geom_smooth()` using formula = 'y ~ x'

  • it looks like for each, the slope is approx the same

3 Passing Variable (x>=70%)

cohorts <- cohorts |> mutate(pass_lgc = pct >= .7)
cohorts