```python
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
from scipy.integrate import quad
from sympy.solvers import solve
from sympy import Symbol
import numpy as np
from pandas import Series
```


```python
print(expon.cdf(x=4, scale=1/3))
```

    0.9999938557876467



```python
1-norm.cdf(x=130, loc=100, scale=15)
```




    0.02275013194817921




```python
norm.ppf(q=[0.025,0.975], loc=100, scale=15)
```




    array([ 70.60054023, 129.39945977])




```python
norm.cdf(x=115, loc=100, scale=15)-norm.cdf(x=85, loc=100, scale=15)
```




    0.6826894921370859




```python
f = lambda x: x * (15-x/4)
ans, _ = quad(f, 0,60)
print(ans)
```

    9000.0



```python
x = Symbol('x')
solve(x**2/9000*(15/2),x)
```




    [0.0]




```python
expon.cdf(x = 2/0.04, scale=1/0.04)
```




    0.8646647167633873




```python
f = lambda x: x * np.e**(-(1/1000)*x)
ans, _ = quad(f)
print(ans)
```


```python
1/(1/1000)
```




    1000.0




```python
1/(1/1000)
```




    1000.0




```python
1-(expon.cdf(x = 200, scale=1/0.04))*(expon.cdf(x = 200, scale=1/0.1000))
```




    0.0003354646883646506




```python
Series(norm.rvs(loc=32, scale=6, size=100000)).plot(kind="hist", bins=100)

```


```python
norm.cdf(x=40, loc=32, scale=6)
```




    0.9087887802741321



# Aufgabe 3.4 kann erst später gelöst werden


```python
norm.cdf(x=27, loc=32, scale=6)
```




    0.20232838096364308




```python
1-norm.cdf(x=0.9, loc=0, scale=0.45)
```




    0.02275013194817921




```python
norm.cdf(x=0.9, loc=1.8, scale=0.45)
```




    0.022750131948179195




```python
a,b = norm.cdf(x=[0.2485,0.2515], loc=0.2508, scale=0.0015)
```


```python
b-a
```




    0.6170339363078196




```python
norm.cdf(x=0.2515, loc=0.2508, scale=0.0005) - norm.cdf(x=0.2485, loc=0.2508, scale=0.0005)
```




    0.91924122831152




```python
norm.cdf(x=0.2515, loc=0.2500, scale=0.0005) - norm.cdf(x=0.2485, loc=0.2500, scale=0.0005)
```




    0.9973002039367398




```python
norm.ppf(q=0.9)
```




    1.2815515655446004




```python
norm.cdf(x=2)
```




    0.9772498680518208




```python
norm.cdf(x=-2)
```




    0.022750131948179195




```python
norm.cdf(x=2)+norm.cdf(x=-2)
```




    1.0




```python
from scipy.integrate import quad
f = lambda x: 1/10 - x/200
ans, _ = quad(f, 0, 5)
print(ans)
```

    0.43750000000000006



```python
print(5/10 - 25/400)
```

    0.4375



```python


```

9b74125a0f9fd737716d3866cc5ff236f0f35a2b
ipynb
Jupyter Notebook
Lernphase/SW03/Skript.ipynb
florianbaer/STAT
7cb86406ed99b88055c92c1913b46e8995835cbb
MIT
Lernphase/SW03/Skript.ipynb
florianbaer/STAT
7cb86406ed99b88055c92c1913b46e8995835cbb
MIT
Lernphase/SW03/Skript.ipynb
florianbaer/STAT
7cb86406ed99b88055c92c1913b46e8995835cbb
MIT
Qwen/Qwen-72B
1. YES
2. YES