Subjects simulation and modelling

Simulation Modelling

Step-by-step solutions with LaTeX - clean, fast, and student-friendly.

Search Solutions

Simulation Modelling


1. **Problem 1(a): Generate 1000 values using the formula** The formula given is $$-10 \times \ln(\text{RAND}())$$ where RAND() generates a uniform random number between 0 and 1. This formula generates values from an exponential distribution with rate parameter $\lambda = \frac{1}{10}$. **Descriptive statistics to compute:** minimum, maximum, mean, median, standard deviation. 2. **Explanation of descriptive statistics:** - Minimum: smallest value in the data. - Maximum: largest value in the data. - Mean: average value, calculated as $$\bar{x} = \frac{1}{n} \sum_{i=1}^n x_i$$. - Median: middle value when data is sorted. - Standard deviation: measure of spread, calculated as $$s = \sqrt{\frac{1}{n-1} \sum_{i=1}^n (x_i - \bar{x})^2}$$. 3. **Problem 1(b): Tabulate values into 10 bins of width 5 starting at 0, plus an 11th overflow bin.** Bins: [0-5), [5-10), [10-15), ..., [45-50), and overflow for values $\geq 50$. Count how many values fall into each bin. 4. **Problem 1(c): Histogram resemblance** Since the data is generated by an exponential distribution, the histogram should resemble an exponential distribution curve, which is right-skewed with a high frequency near 0 and decreasing frequency as values increase. 5. **Problem 2: Monte Carlo estimation of $\pi$ using a quarter circle inside a unit square** - The area of a quarter circle with radius 1 is $$A = \frac{\pi \times 1^2}{4} = \frac{\pi}{4}$$. - The area of the unit square is 1. - Randomly generate points $(x,y)$ where $x,y \in [0,1]$. - Count points inside the quarter circle: those satisfying $$x^2 + y^2 \leq 1$$. - The ratio of points inside the quarter circle to total points approximates $$\frac{\pi}{4}$$. - Estimate $$\pi$$ as $$\pi \approx 4 \times \frac{\text{number of points inside}}{\text{total points}}$$. 6. **Summary:** - Use Excel to generate 1000 random values with the formula. - Calculate descriptive statistics. - Create bins and count frequencies. - Recognize the exponential distribution shape. - Use Monte Carlo simulation with random points in a unit square to estimate $\pi$. This completes the assignment tasks.