```python
from statsmodels.tsa.seasonal import seasonal_decompose
import matplotlib.pyplot as plt
import scipy.stats as st
import seaborn as sns
import pandas as pd
from scipy.stats import norm, uniform, expon, t, probplot
import scipy.stats as st
from scipy.integrate import quad
from sympy.solvers import solve
from sympy import Symbol
import numpy as np
from pandas import Series, DataFrame
from statsmodels.graphics.tsaplots import plot_acf
from statsmodels.tsa.stattools import acf
from pandas.plotting import lag_plot
from statsmodels.tsa.arima_process import ArmaProcess
```


```python
np.abs(np.roots([0.1, -0.5, 0.5, 1]))
```




    array([3.25642854, 3.25642854, 0.9430113 ])




```python
ar1 = np.array([1, -.5, .5, .1])
simulated_data = ArmaProcess(ar1, ma=[1]).generate_sample(nsample=200)
plt.plot(simulated_data)
plt.xlabel("Zeit")
plt.ylabel("Wert")
plt.title("AR(3) Prozess")
plt.show()
```


```python
lag = 25
acf_theor =ArmaProcess(ar = [1, -.5, .5, .1], ma=[1]).acf(lag)
x = np.arange(lag)
plt.bar(x, acf_theor , width=.2, color="black")
plt.plot(x, acf_theor, "ro", markerfacecolor="C1")
plt.xlabel("Index")
plt.ylabel("ACF")
plt.title("ACF eines AR(3) Prozesses")
plt.show()
```


```python

```

a6593dd11c842e42775a860f09c71898718d4096
ipynb
Jupyter Notebook
Lernphase/SW13/.ipynb_checkpoints/Skript-checkpoint.ipynb
florianbaer/STAT
7cb86406ed99b88055c92c1913b46e8995835cbb
MIT
Lernphase/SW13/.ipynb_checkpoints/Skript-checkpoint.ipynb
florianbaer/STAT
7cb86406ed99b88055c92c1913b46e8995835cbb
MIT
Lernphase/SW13/.ipynb_checkpoints/Skript-checkpoint.ipynb
florianbaer/STAT
7cb86406ed99b88055c92c1913b46e8995835cbb
MIT
Qwen/Qwen-72B
1. YES
2. YES