Research Question

We will be evaluating several years of Algebra 1 EOC data to answer the following question:

Is there a statistically significant difference between the overall EOC performance before and after COVID? Specifically we will be weighing by submitted tests the percent of Did Not Meet scores and the Average Scaled Score to account for district size.

Throughout the paper we will be demonstrating most functions for only the 2018 year, but they are repeated for all five years. Any differences will be specified.

Initial Data Cleaning and Manipulation

We set directory and import .dat files from TEA aggregate. Converted .dat to .xlsx for ease of importing, using the same TEA naming scheme as directly obtaining the data from the website.

setwd("C:/Users/chris/Desktop/TEA Project Data")
Alg2023 <- read_excel("dfy23ea1.xlsx")

There are several sources of bias and outliers that we need to investigate. The first that we have already accounted for is the differing sizes of district. Weighing the scores prevents excessively small/large districts from skewing the mean.

Additionally, we will look for sources of missing or invalid data. Several district names are repeated throughout the data set, but they all have unique district ID numbers. Due to this we will be merging on district ID so as not to remove otherwise valid data. We will also be doing an inner join so only districts that submitted scores all 5 years are considered.

Finally, we will investigate if any districts had excessive amounts of eligible students that did not take the exam.

We begin by subsetting the data, renaming/selecting the vectors and mutating our new weighted scores.

Alg2018Dif <- Alg2018 %>%
  mutate(
    PercentNotTested = a1_all_abs_r + a1_all_oth_r,
  ) %>%
  select(
    Region = REGION,
    PercentNotTested,
    District = DNAME,
    DistrictID = DISTRICT,
    Submitted = a1_all_docs_n,
    DidNotMeet = a1_all_unsatgl_nm,
    Approaches = a1_all_approgl_nm,
    Meets = a1_all_meetsgl_nm,
    Masters = a1_all_mastrgl_nm,
    AvgScaledScore18 = a1_all_rs,
    PercentDidNotMeet = a1_all_unsatgl_rm,
  ) %>% 
  filter(complete.cases(.)
  ) %>%
  distinct(DistrictID, .keep_all = TRUE
  ) %>%
  mutate(
    PercentDidNotMeet18 = PercentDidNotMeet / 100,
    WeightedPercentDidNotMeet18 = PercentDidNotMeet * (Submitted / sum(Submitted)),
    WeightedScaledScore18 = AvgScaledScore18 * (Submitted / sum(Submitted))
  )

For simplicity we create a new dataframe holding the average weighted values for each year

Average Weighted Scores by Year
Year AverageWeightedScaledScore AverageWeightedPercentDidNotMeet
2018 4105.715 16.80329
2019 4186.409 16.40054
2021 3921.899 29.04753
2022 4001.566 26.61438
2023 3992.521 21.96495

By inspection, we can see that it follows the anecdotal pattern we expect: a decrease from 2019-2021, with the data from 2020 being invalidated for all districts.

Missing Data from Districts

We previously identified districts with many eligible students not taking the exam as a potential source of bias. However, if these missing scores were random throughout the eligible population, it will not affect our overall data. Outside of the scope of this study would be to collect campus-level data and determine if the demographics of the students who did not take the exam were truly randomly distributed.

## # A tibble: 5 × 3
##   District        Submitted PercentNotTested
##   <chr>               <dbl>            <dbl>
## 1 LEANDER ISD          3558               50
## 2 FRENSHIP ISD          791               43
## 3 HUMBLE ISD           3802               38
## 4 LIBERTY HILL IS       386               37
## 5 RAVEN SCHOOL           40               35
## Percentage of Observations Removed: 0.08328352

## # A tibble: 5 × 3
##   District        Submitted PercentNotTested
##   <chr>               <dbl>            <dbl>
## 1 PROMESA PUBLIC         73               79
## 2 KARNES CITY ISD       287               55
## 3 WINFREE ACADEMY       164               51
## 4 ZAPATA COUNTY I       183               51
## 5 EVANT ISD              43               42
## Percentage of Observations Removed: 0.3691463

By inspection we can see that the post-COVID year was particularly affected by missing submissions. We will not remove this large amount of data without further justification.

Checking Assumptions for Analysis of Weighted Scores

To begin with we will look at the Weighted Scaled Score across all years. We will merge by DistrictID, repeating for each year:

ScoresbyYear <- Alg2018Dif %>%
  select(District, DistrictID, WeightedScaledScore18) %>%
  distinct(District, DistrictID, WeightedScaledScore18) %>%
  inner_join(
    Alg2019Dif %>% select(District, DistrictID, WeightedScaledScore19) %>% distinct(), by = "DistrictID"
  )

Before we begin we must check the assumptions for ANOVA:

  1. Independence: Each year a new cohort of students takes the exam. There will be some repeats but we can effectively consider each year scores independent.

  2. Random Sampling: Due to the missing student scores, we have effectively a random sample from each district. This is assuming that the missing scores are evenly distributed.

  3. Homogeneity of Variances:

##   Years  Variance
## 1  2018 106.05066
## 2  2019 107.94982
## 3  2021  94.39478
## 4  2022  97.34564
## 5  2023  98.56086

We can see that the variances are very similar for the pre-group and the post-group. This suggests what we will need to use a Welch’s ANOVA with unequal variance.

  1. Normality: Each underlying vector must be normally distributed. We will look at the Q-Q Plot and p-Value of the Shapiro Test of Normality.
##   Years    Normality
## 1  2018 8.546399e-52
## 2  2019 1.332610e-51
## 3  2021 1.369674e-51
## 4  2022 1.752778e-51
## 5  2023 1.331680e-51

This demonstrates that the weighted scaled scores are not normally distributed. This now tells us that we will be using a non-parametric test. We will pick the Krushkal test.

Repeating the process for Percent Did Not Meet yields similar results.

##   Years    Normality
## 1  2018 2.518900e-53
## 2  2019 7.867856e-53
## 3  2021 8.779624e-53
## 4  2022 6.214668e-53
## 5  2023 2.323851e-53
##   Years    Variance
## 1  2018 0.002323360
## 2  2019 0.002016476
## 3  2021 0.006921178
## 4  2022 0.005878454
## 5  2023 0.004377214

Dataframe Conversion and Analysis

We can now apply the appropriate test to determine if the scores (both Average Scaled and Percent Did Not Meet) are statistically significantly different between any of the five years. If so, we will conduct a post-hoc test to determine which.

We begin by transforming the data into long form for the analysis.

## # A tibble: 5 × 3
##   DistrictID Year                        WeightedPercentDidNotMeet
##        <dbl> <chr>                                           <dbl>
## 1       1902 WeightedPercentDidNotMeet18                  0.000694
## 2       1902 WeightedPercentDidNotMeet19                  0.00185 
## 3       1902 WeightedPercentDidNotMeet21                  0.000730
## 4       1902 WeightedPercentDidNotMeet22                  0.000227
## 5       1902 WeightedPercentDidNotMeet23                  0.000407
## # A tibble: 5 × 3
##   DistrictID Year                  WeightedScaledScore
##        <dbl> <chr>                               <dbl>
## 1       1902 WeightedScaledScore18               0.422
## 2       1902 WeightedScaledScore19               0.453
## 3       1902 WeightedScaledScore21               0.379
## 4       1902 WeightedScaledScore22               0.333
## 5       1902 WeightedScaledScore23               0.451

We will be using the Krushkal Test to determine the existance of a significant difference, and the related Dunn Post-Hoc. Because of the small number of pair-wise comparisons and large number of observations we will use the Holm Correction.

## Did Not Meet p_value 9.183305e-05
## Average Scaled Score p_value 0.6031911

This demonstrates that there is not a significant differences between any of the years for the Average Scaled Score, but there does exist a significant difference somewhere for the Average Percent Did Not Meet.

Post-Hoc Testing and Conclusion

The Dunn Post-Hoc test shows us the pairwise corrected p-Values for significant difference. Using an alpha level of 0.05 we will filter out any result with a p-Value greater than 0.05. The remaining entries are significant differences.

##                                                  Comparison      pValue
## 1 WeightedPercentDidNotMeet18 - WeightedPercentDidNotMeet21 0.003356845
## 2 WeightedPercentDidNotMeet19 - WeightedPercentDidNotMeet21 0.002638208
## 3 WeightedPercentDidNotMeet18 - WeightedPercentDidNotMeet22 0.013611356
## 4 WeightedPercentDidNotMeet19 - WeightedPercentDidNotMeet22 0.012801682
## 5 WeightedPercentDidNotMeet21 - WeightedPercentDidNotMeet23 0.003085292
## 6 WeightedPercentDidNotMeet22 - WeightedPercentDidNotMeet23 0.013738161

The results show that there is a significant difference between the Average Percent Did Not Meet before and after COVID. An interesting result that is worth following up on is that 2018 and 2019 were not significantly difference than 2023. While this is only one data point, it suggests that there may be a recovery to pre-COVID rates. This is further supported by the fact that 2021 and 2022 are also significantly different than 2023.

Sources of Error, Bias and Further Investigation

A major issue is the lack of contextual data for test design, and more detailed information about the missing scores immediately after COVID. The fact that there is no significant difference between the scaled scores while there is between the percent of Did Not Meet suggests that there was some sort of change to the score formula. If the threshold of passing increased, it would explain why the scores stayed the same with more failures.

Additionally, the weighing system for scores was based solely off of the percentage of submitted tests compared to the total submitted in all districts. This is sensitive to the same missing score issue.

Further study topics would focus primarily in these missing scores and their distribution. If that source of bias or error is removed with no change to the conclusion, the next would be to investigate test design and how the scoring and standards changed over each year.