Statistical Analysis and Predictive Modeling on the Breast Cancer Wisconsin Dataset
A comprehensive statistical study combining hypothesis testing, exploratory analysis, and logistic regression for breast cancer diagnosis classification, implemented in both Python and R with an interactive Streamlit dashboard.
This project performs a rigorous statistical analysis of the Breast Cancer Wisconsin (Diagnostic) dataset, which contains 569 samples of fine needle aspirate (FNA) features computed from digitized images of breast masses. The analysis spans descriptive statistics, inferential testing, and predictive modeling.
- Feature distributions and summary statistics
- Correlation analysis between 30 numeric features
- Box plots and violin plots comparing benign vs. malignant groups
- PCA visualization for dimensionality reduction
- t-tests (independent samples) comparing feature means between diagnosis groups
- Chi-squared tests for categorical associations
- ANOVA for multi-group comparisons
- Normality tests (Shapiro-Wilk, D'Agostino)
- Levene's test for homogeneity of variances
- Multiple testing correction (Bonferroni, Benjamini-Hochberg)
- Logistic Regression with L1/L2 regularization
- Feature selection via statistical significance and regularization
- Model evaluation: accuracy, sensitivity, specificity, AUC-ROC
- Calibration analysis and confusion matrix
- Streamlit web app for interactive exploration
- Dynamic filtering and feature selection
- Real-time visualization updates
- Model prediction interface
| Tool | Usage |
|---|---|
| Python | Primary analysis language |
| R | Complementary statistical analysis |
| pandas / NumPy | Data manipulation |
| SciPy | Statistical tests |
| statsmodels | Regression and inference |
| scikit-learn | ML models and evaluation |
| Matplotlib / Seaborn | Static visualizations |
| Plotly | Interactive charts |
| Streamlit | Web dashboard |
git clone https://github.com/Pol4720/BCW-Project.git
cd BCW-Project
pip install -r requirements.txt
# Run the dashboard
streamlit run app.py
# Or run the R analysis
Rscript analysis.R- 30 features analyzed; top discriminators:
concave points_worst,perimeter_worst,area_worst - Logistic regression achieves >95% accuracy with strong AUC-ROC
- All 30 features show statistically significant differences (p < 0.001) between benign and malignant groups
Developed as a Statistics course project at the University of Havana, Faculty of Mathematics and Computer Science (MATCOM).
This project is licensed under the MIT License.