Skip to content

solmaznsr/simulation-analysis-Int

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

Simulation and Random Number Analysis

This project simulates a queuing system, generates random numbers, and analyzes their distribution using statistical tests and visualizations. I did it as my simulation course on 2019

Script: simulation_and_analysis.R

Description

  1. Queuing System Simulation:

    • Simulates a single-server queuing system using a Linear Congruential Generator (LCG) for random number generation.
    • Exports simulation results to Excel files (table2-8.xlsx, table2-9.xlsx, table2-10.xlsx).
  2. Random Number Analysis:

    • Generates random numbers from a normal distribution and standardizes them.
    • Computes descriptive statistics and visualizes the data using boxplots and histograms.
  3. Uniform Random Number Analysis:

    • Generates uniform random numbers using an LCG and tests their uniformity using the Kolmogorov-Smirnov (KS) test.
    • Transforms uniform random numbers into integers between 8 and 24 and visualizes their distribution.

Usage

  1. Clone the repository.
  2. Open the R script simulation_and_analysis.R in RStudio or any R environment.
  3. Run the script to perform the simulation, generate random numbers, and create visualizations.

Output

  • Excel Files:
    • table2-8.xlsx: Random numbers and time between arrivals.
    • table2-9.xlsx: Random numbers and service times.
    • table2-10.xlsx: Full simulation results.
  • Plots:
    • boxplot_x.png, histogram_x.png: Boxplot and histogram of normal random numbers.
    • boxplot_rnd.png, histogram_rnd.png: Boxplot and histogram of LCG random numbers.
    • boxplot_transformed.png, histogram_transformed.png: Boxplot and histogram of transformed uniform random numbers.

Dependencies

  • R (version 4.0 or higher)
  • openxlsx package (for exporting data to Excel)

Author

Your Name

License

This project is licensed under the MIT License. See the LICENSE file for details.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages