```python
import matplotlib.pyplot as plt
plt.style.use('classic')
%matplotlib inline
```

# Discussion: Week 2


```python
# Import the NumPy module

```

## Exercise: Capital Evolution in the Solow Model

Suppose that capital per worker $k_t$ evolves according to the following equation:

\begin{align}
k_{t+1} & = 0.12 \cdot 100 \cdot k_t^{1/3} + 0.9\cdot k_t, \tag{1}
\end{align}

where the first term on the right-hand side implies that the economy has a 12 percent savings rate, that total factor productivity equals 100, and that there is no growth in technology (or "labor efficiency"). The second term implies that the rate of capital depreciation is 10 percent (i.e., $1-\delta = 0.9 \Rightarrow \delta = 0.1$). Assume that capital per worker in the initial period $k_0$ is given.

The *steady state* quantity of capital per worker is the number $k^*$ such that if $k_t = k^*$, $k_{t+1} = k^*$. Find $k^*$ by dropping the time subscripts in equation (1) and solving for $k$. Obtain:

\begin{align}
k^* & = \left(\frac{0.1}{0.12\cdot 100}\right)^{3/2} = 1{,}314.53414 \tag{2}
\end{align}

### Part (a): Simulate 100 Periods


```python
# Create a variable called 'k0' that stores the initial quantity of capital in the economy. Set 'k0' to 400


# Create a variable called 'T' equal to the number of periods after 0 to simulate. Set T = 100


# Use the function np.zeros to create a variable called 'capital' equal to an array of zeros of length T+1


# Print the value of 'capital'

```


```python
# Set the first element of 'capital' to the value in k0


# Print the value of 'capital'

```


```python
# Use a for loop to iterate over the additional elemnts of the 'capital' array that need to be computed.
# Hint: capital has length T+1. The first value is filled, so you need fill the remaining T values.


# Print the value of 'capital'

```


```python
# Print the value of  the last element of 'capital'

```


```python
# Plot the simulated capital per worker



```

### Part (b): Simulate 1,000 Periods


```python
# Create a variable called 'T' equal to the number of periods after 0 to simulate. Set T = 1000


# Use the function np.zeros to create a variable called 'capital' equal to an array of zeros of length T+1


# Set the first element of 'capital' to the value in k0


# Use a for loop to iterate over the additional elemnts of the 'capital' array that need to be computed.


# Print the value of  the last element of 'capital'

```

### Part (c): Evaluation

Provide answers to the follow questions in the next cell.

**Question**

1. Why is the final value of capital computed in Part (b) closer to the true steady state than the value computed in Part (a)?

**Answer**

1.  

cb63494338e5d63f2002a6904c0ee91af1706123
ipynb
Jupyter Notebook
Discussion Notebooks/Econ126_Discussion_Week_02_blank.ipynb
t-hdd/econ126
17029937bd6c40e606d145f8d530728585c30a1d
MIT
Discussion Notebooks/Econ126_Discussion_Week_02_blank.ipynb
t-hdd/econ126
17029937bd6c40e606d145f8d530728585c30a1d
MIT
Discussion Notebooks/Econ126_Discussion_Week_02_blank.ipynb
t-hdd/econ126
17029937bd6c40e606d145f8d530728585c30a1d
MIT
Qwen/Qwen-72B
1. YES
2. YES