A collection of Python-based homework assignments focused on fundamental concepts in Statistics, Probability, Data Analysis, and Visualization.
This repository contains standalone scripts developed as part of coursework exercises. Each file typically demonstrates a specific statistical concept through simulation, computation, and graphical visualization.
The repository includes multiple homework assignments covering topics such as:
- Data visualization (bar charts, pie charts, histograms)
- Effect of outliers on statistical measures
- Gaussian (Normal) distributions
- Probability Density Functions (PDF)
- Cumulative Distribution Functions (CDF)
- Data normalization and scaling
- Statistical testing and analysis
Each script is independent and can be executed individually.
Example files included in the project:
HW1-q1.py
HW1-q2.py
HW2.py
HW3-ch4q*.py
HW3-ch8q*.py
HW4-ch9q*.py
HW5-ch6-q*.py
HW3-reports.pdf
Naming convention:
HW→ Homework number\chX→ Chapter number\qY→ Question number
- Python 3.9+ (recommended)
Required libraries (depending on the script):
- numpy
- matplotlib
- scipy
- scikit-learn
It is recommended to use a virtual environment:
python -m venv venvActivate the environment:
Linux / macOS
source venv/bin/activateWindows
venv\Scripts\activateInstall dependencies:
pip install numpy matplotlib scipy scikit-learnEach file can be executed independently:
python HW2.py
python HW3-ch8q6.py
python HW5-ch6-q1.pyMost scripts generate visual outputs using matplotlib. Some scripts
also print numerical results in the terminal.
Several scripts rely on random number generation. To ensure reproducible results, you may add a random seed at the beginning of the script:
import numpy as np
np.random.seed(42)Mahan Baneshi
Developed as part of academic coursework in statistics and data analysis using Python.