This repository contains a statistical analysis case study that evaluates ping pong serve precision through a reproducible R pipeline and a lightweight web dashboard. The goal is to move from raw experimental observations to validated statistical outputs, exported artifacts, and a browser-based summary that makes the results easier to review.
The public version focuses on:
- reproducible statistical processing in R
- exported JSON and PNG outputs for dashboard delivery
- inferential tests that validate model fit and timing behavior
- a clear analytical summary for technical and non-technical review
| Challenge | Solution | Impact |
|---|---|---|
| Validate whether serve attempts fit a defendable statistical model | Built an R pipeline with descriptive and inferential analysis, including goodness-of-fit testing | The Negative Binomial fit was accepted with p = 0.6603 |
| Manual analysis made results harder to reproduce and communicate | Automated JSON and PNG exports from the analysis script | The dashboard can load consistent outputs without rewriting results by hand |
| Static notebooks and raw tables were harder to scan quickly | Delivered a lightweight dashboard that presents charts and key metrics in one place | Statistical findings became easier to review and share |
| Metric | Value | Interpretation |
|---|---|---|
| Sample size | 309 observations | Experimental dataset used for the full analysis |
| Chi-square p-value | 0.6603 | Goodness-of-fit accepted for the selected model |
| Mean serve time | 1.945s | Average time stayed below the 2-second threshold |
| Right-handed share | 64.4% | Population split is documented in the exported results |
| Correlation | 0.0494 | Weak relationship between attempts and serve time |
Raw CSV data
->
R analysis script (scripts/ping_pong_analysis.R)
->
JSON metrics + PNG charts
->
Web dashboard summary
| Layer | Technologies | Output |
|---|---|---|
| Data input | CSV experiment data | Raw observations |
| Analysis | R, tidyverse, ggplot2, jsonlite | Statistical results and visualizations |
| Delivery | HTML, CSS, JavaScript | Interactive dashboard that reads exported outputs |
The analysis workflow includes:
- descriptive statistics for serve time and attempts
- chi-square goodness-of-fit validation
- one-sample t-test against the 2-second threshold
- correlation analysis between attempts and serve time
- exported charts and JSON summaries for dashboard delivery
| Layer | Technologies |
|---|---|
| Data processing | R, tidyverse, ggplot2, jsonlite |
| Visualization | ggplot2, ggsave |
| Frontend | HTML5, CSS3, JavaScript |
| Hosting | GitHub Pages |
# clone repository
git clone https://github.com/Sam-24-dev/Analisis-Ping-Pong.git
cd Analisis-Ping-Pong
# install required R packages
R -e "install.packages(c('tidyverse','jsonlite','here'))"
# run the analysis pipeline
Rscript scripts/ping_pong_analysis.R
# or use the existing Makefile
make pipeline
make serveAnalisis-Ping-Pong/
|- data/
| |- raw/ # Original experiment files
| `- ping_pong_experiment_data.csv
|- docs/ # Technical architecture notes
|- scripts/ # R analysis pipeline
|- web/
| |- images/ # Exported PNG charts
| |- results/ # JSON statistical outputs
| |- index.html # Dashboard entrypoint
| |- script.js
| `- styles.css
|- Makefile
|- LICENSE
`- README.md
- Technical architecture: docs/architecture.md
- Main analysis script: scripts/ping_pong_analysis.R
- Exported results: web/results/analysis_results.json
If this analysis was useful or interesting, consider starring the repository.