This examples demonstrates (i) a rich-get-richer phenomenon in the form of a multiplicative random process, and an (ii) aggregation of multiple random factors in the form of an additive random process.

**
Read carefully what you need to accomplish for this exercise. You need to submit your source code and
5 plots all-together. The instruction for plots are written in bold in the text below. For plotting
use the provided functions in the Python template.
**

This example consists of two parts. For both parts you first need to create and randomly initialize a square grid:

- Implement a 2d regular square lattice (i.e. a grid) with 100x100 cells.
- Initialize each cell with a number drawn uniformly at random from the interval [0, 1).

You will simulate a growth of investments in market stocks. Each grid cell represents an investment and in each simulation step an investment can gain or lose up to 20% in value. For this part, use a random grid that you created as described above. Then, for this simulation implement a simple multiplicative process.

- Iterate over 2) and 3) 30 times
- Draw a 100x100 growth matrix of random numbers in the range [0.8, 1.2). This represents your growth rate.
- Multiply element-wise your growth matrix from 2) with your grid cells and store the results in your grid. The new grid values keep the updated investments after this simulation step.
**Plot the grid as a heat-map.****Plot the distribution of the values in your grid.**

You will slightly modify the growth of investments in market stocks. Each investment is insured for a certain minimal value, i.e. a threshold. If an investment falls below the threshold the insurance company pays the money and resets it to the threshold value. For this part, use a random grid that you created as described above. Then, for this simulation implement a simple multiplicative process.

- Reset all values below threshold to the threshold value. Take 1.0 as your threshold value.
- Iterate over 3), 4) and 5) 30 times
- Draw a 100x100 growth matrix of random numbers in the range [0.8, 1.2). This represents your growth rate.
- Multiply element-wise your growth matrix from 3) with your grid cells and store the results in your grid. The new grid values keep the updated investments after this simulation step.
- Reset all values below threshold to the threshold value.
**Plot the grid as a heat-map.****Plot the distribution of the values in your grid.**

Suppose now we want to calculate the aggregate value of a random sample of a given number of investments. For this part use the final grid that you created in the Part B of "Rich-Get-Richer" example and then implement an additive random process:

- Draw 10000 random samples of size 100 from the grid.
- Calculate the sum of each of 10000 samples.
**Plot the distribution of the sample sums.**

Submit your source code and 5 plots. You will need to
understand **what do you see in your plots** and most importantly you will need to understand
**why do you see that in your plots**.