```python
from sympy import symbols, Eq, solve
import numpy as np
class Beta:


    def __init__(self, data):
        self.x = data
        self.calc_mean()
        self.calc_std()
        self._calc_paramters()

    def calc_mean(self):
        self.mean = np.mean(self.x)

    def calc_std(self):
        self.std = np.std(self.x)

    def _calc_paramters(self):
        self.alpha, self.beta = symbols("x y")
        eq1 = Eq(self.alpha/(self.alpha + self.beta), self.mean)
        eq2 = Eq((self.alpha * self.beta)/ (((self.alpha + self.beta)**2)*(self.alpha + self.beta + 1)), self.std**2)
        parameters = solve((eq1, eq2), (self.alpha, self.beta))
        self.alpha = float(parameters[self.alpha])
        self.beta = float(parameters[self.beta])


    def get_beta(self):
        return self.beta

    def get_alpha(self):
        return self.alpha
    
```

7a6697c907c719229ef05e1ad10e2c4dbf25d28a
ipynb
Jupyter Notebook
distributions/beta/Python/beta_by_data.ipynb
amirhkiani77/Risk-Management
f6a868200fb90bdae21c14381084f8f01f6faf6c
MIT
distributions/beta/Python/beta_by_data.ipynb
amirhkiani77/Risk-Management
f6a868200fb90bdae21c14381084f8f01f6faf6c
MIT
distributions/beta/Python/beta_by_data.ipynb
amirhkiani77/Risk-Management
f6a868200fb90bdae21c14381084f8f01f6faf6c
MIT
Qwen/Qwen-72B
1. YES
2. YES

