An open API service indexing awesome lists of open source software.

https://github.com/shaikats/python-assignment

Simulation and Modeling Lab assignments using Python, NumPy, Matplotlib, and Jupyter Notebook.
https://github.com/shaikats/python-assignment

jupyter-notebook matplotlib numpy python simulation-modeling

Last synced: about 1 month ago
JSON representation

Simulation and Modeling Lab assignments using Python, NumPy, Matplotlib, and Jupyter Notebook.

Awesome Lists containing this project

README

          

# 💻 Simulation & Modeling Lab – Assignment Repository

## 👤 **Personal Information**
**Name:** Shahriar Hossain Shaikat
**ID:** 2215151034
**University:** UITS (University of Information Technology and Sciences)
**Department:** Computer Science and Engineering (CSE)
**Batch:** 51
**Section:** 7A2

## 📖 **Course Details**
**Course Code:** CSE 413
**Course Name:** Simulation and Modeling Lab
**Course Teacher:** Audity Ghosh

---
## 📂 **Assignments**

📊 Assignment 1: Data Visualization and Matrix Operations

### 📝 Tasks
1. Generate two vectors with 15 random floats, plot them, and label axes.
2. Create a 4x4 random matrix, visualize as a heatmap, and label rows/columns.
3. Generate two 4x4 matrices, perform arithmetic operations, visualize with bar plots.

### 📌 Concepts Covered
- Random number generation
- Data visualization with Matplotlib
- Matrix operations with NumPy
- Heatmap visualization
- Bar plot representation of matrix computations

📂 **[View Assignment 1](https://github.com/Shaikats/Python-Assignment/blob/main/assignment-01.ipynb)**

🎲 Assignment 2: Random Matrix Generation

### 📝 Tasks
1. Use NumPy to create a 3×3 matrix of random integers between 1 and 50.
2. Run the code twice:
- Without setting a seed, allowing random values to change each time.
3. Observe and explain the differences in outputs (in a different cell as text).

### 📌 Concepts Covered
- Random integer matrix generation
- Effects of using fixed seeds in random number generation

📂 **[View Assignment 2](https://github.com/Shaikats/Python-Assignment/blob/main/assignment-02.ipynb)**

📊 Assignment 3: Statistical Analysis and Hypothesis Testing

### 📝 Tasks
1. **Task 1:** Calculate the t-statistic and p-value for a sample of data and a hypothesized mean.
2. **Task 2:** Interpret the results and visualize the sample mean against the hypothesized mean using a bar plot with error bars.

### 📌 Concepts Covered
- T-statistic and p-value calculation
- Hypothesis testing
- Data visualization (Bar plot, Error bars)

📂 **[View Assignment 3](https://github.com/Shaikats/Python-Assignment/blob/main/assignment-03.ipynb)**

🎲 Assignment 4: Normal Distribution and Two-Sample t-Test

### 📝 Tasks
1. **Task 1:** Randomly generate 50 values from a normal distribution with a chosen mean (μ1) and standard deviation.
2. **Task 2:** Randomly generate 50 values from a normal distribution with a different mean (μ2) and standard deviation.
3. **Task 3:** Perform a two-sample t-test to check if the means of the two samples are significantly different.
4. **Task 4:** Visualize the comparison using a boxplot.

### 📌 Concepts Covered
- Normal distribution sampling
- Two-sample t-test (Welch's test)
- Boxplot visualization

📂 **[View Assignment 4](https://github.com/Shaikats/Python-Assignment/blob/main/assignment-04.ipynb)**

📊 Assignment 5: One-Sample Kolmogorov-Smirnov Test on Daily Temperatures

### 📝 Tasks
1. Load the dataset of daily temperatures.
2. Extract temperature scores for analysis.
3. Center and scale the data for normal comparison.
4. Perform One-Sample K-S Test.
5. Output the hypothesis test result, p-value, and KS statistic.
6. Plot the empirical CDF vs the normal CDF.
7. Write a conclusion.

### 📌 Concepts Covered
- Kolmogorov-Smirnov test
- Hypothesis testing for distribution fitting
- Empirical vs theoretical cumulative distribution comparison

📂 **[View Assignment 5](https://github.com/Shaikats/Python-Assignment/blob/main/assignment-05.ipynb)**

📊 Assignment 6: Monte Carlo Simulation & Queueing System Analysis

### 📝 Tasks
#### ✍️ Situation 2 (Monte Carlo Simulation):
Simulate inventory behavior of LatinOrg Inc. over 60 weeks.
- a) Estimate average order size.
- b) Calculate average total cost of having the product.

#### ⌚ Single Server Queueing:
1. Perform a simulation for 200 customers with λ=3 and μ=4. Compare waiting time and server utilization.
2. Simulate a system with λ=8 and μ=6. Discuss impact of server overload.
3. Modify queue with limited capacity (max 10 customers). Analyze performance impact.

### 📌 Concepts Covered
- Monte Carlo Simulation
- Inventory cost modeling
- Queue theory (M/M/1)
- Server utilization, queue length, and system performance

📂 **[View Assignment 6](https://github.com/Shaikats/Python-Assignment/blob/main/assignment-06.ipynb)**

## 📂 **Assignment Links**

[![Assignment 1](https://img.shields.io/badge/🔗%20Assignment%201%20-Click%20Here-blue?style=for-the-badge)](https://github.com/Shaikats/Python-Assignment/blob/main/assignment-01.ipynb)
[![Assignment 2](https://img.shields.io/badge/🔗%20Assignment%202%20-Click%20Here-blue?style=for-the-badge)](https://github.com/Shaikats/Python-Assignment/blob/main/assignment-02.ipynb)
[![Assignment 3](https://img.shields.io/badge/🔗%20Assignment%203%20-Click%20Here-blue?style=for-the-badge)](https://github.com/Shaikats/Python-Assignment/blob/main/assignment-03.ipynb)
[![Assignment 4](https://img.shields.io/badge/🔗%20Assignment%204%20-Click%20Here-blue?style=for-the-badge)](https://github.com/Shaikats/Python-Assignment/blob/main/assignment-04.ipynb)
[![Assignment 5](https://img.shields.io/badge/🔗%20Assignment%205%20-Click%20Here-blue?style=for-the-badge)](https://github.com/Shaikats/Python-Assignment/blob/main/assignment-05.ipynb)
[![Assignment 6](https://img.shields.io/badge/🔗%20Assignment%206%20-Click%20Here-blue?style=for-the-badge)](https://github.com/Shaikats/Python-Assignment/blob/main/assignment-06.ipynb)

---

## 🎯 **What I Learned**
- How to generate and manipulate random numerical data in Python.
- Effective use of Matplotlib for visualizing mathematical operations.
- Understanding of matrix operations and their effects.
- Hypothesis testing with t-statistics, p-values, and K-S test.
- Best practices for structuring a professional GitHub repository.
- Inventory simulation and queue performance modeling with Monte Carlo.

---

## ⚡ **Run This in Google Colab**

1. Download the `.ipynb` File or Clone the repository:
```bash
git clone https://github.com/shaikats/Simulation-and-Modeling-Lab.git
```
2. Open [Google Colab](https://colab.research.google.com/).
3. Click on **"File" > "Upload Notebook"** and select the `.ipynb` file, or create a new notebook and Paste the Code.