Projects
Introduction
We were tasked with improving the metric provided to identify the defensive players who were closest to the player of interest/ had the shortest distance from them . We then were tasked with comparing this data and visualizing the results
Description of Project
To modify the metric used to calculate distance from the player, we used the arrange function to sort the players from greatest to least distance from the player of interest. We then isolated the last three players from these results, the players with the shortest distance to the player per frame. To analyze this metric and the metric provided to us, we used a t test to compare.
Description of Project
To modify the metric used to calculate distance from the player, we used the arrange function to sort the players from greatest to least distance from the player of interest. We then isolated the last three players from these results, the players with the shortest distance to the player per frame. To analyze this metric and the metric provided to us, we used a t test to compare.
Data Visualization
Statistical Test 1:
To visualize the comparison/ analysis done with the t test, we created a density plot to model the difference between the given and developed results
Statistical Test 1: A t test that compares the average distance to target player vs the distance of the closest three players two sample t test to compare if there's a significance difference in the average distance and closest
Visualization 2:
Three density plots that show the comparison of the original metric, average distance, and the closest three players
#density graph histogram
T test and correlation test
We also used a Pearson correlation test to determine the correlation between the average distance the three closest players. The results were as follows: a strong positive correlation : .99 indicating a strong positive correlation between the two variables p-value: <2.2e-16 very low p value indicating strong likelihood that the correlation is not random and supports the hypothesis that this is a meaningful relationship
confidence interval of 95% from 0.9901746 to 0.9915846, which is very close to 1 and indicates true correlation being close to .99
Conclusion
After filtering and sorting the data to units of interest, we were able to plot and visualize the different densities of the mean distance vs the closest three players’ distance. We found that the Closest 3 players, as expected had shorter distances to the target player overall in comparison to the mean distance of the players.
Again as expected the mean distance has a larger distribution across the graph, peaking at 12-15 units and again at 50
There is significant overlap around 12-15 units, suggesting correlation between the mean and the closest three players around that time
These plots suggests that players mean distance includes farther players leading to a spread out distribution, but upon consolidating the data of interest to the closest three players, results in consistently shorter distances. This is relevant in certain tactical contexts like analyzing traffic in this example and/or close player interactions or pressure
