Skip to content

Latest commit

 

History

12 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BCW Project — Breast Cancer Wisconsin Statistical Analysis

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.

Python R Streamlit


Overview

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.

Analysis Pipeline

1. Exploratory Data Analysis (EDA)

  • 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

2. Hypothesis Testing

  • 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)

3. Predictive Modeling

  • 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

4. Interactive Dashboard

  • Streamlit web app for interactive exploration
  • Dynamic filtering and feature selection
  • Real-time visualization updates
  • Model prediction interface

Tech Stack

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

Getting Started

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

Results Summary

  • 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

Academic Context

Developed as a Statistics course project at the University of Havana, Faculty of Mathematics and Computer Science (MATCOM).

License

This project is licensed under the MIT License.

About

Análisis estadístico de la base de datos: Breast Cancer Wisconsin(Diagnostic).

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages