Least-square-method statistic (EDIT IN MY LAST ANSWER)

107 Views Asked by At

Good evening, I have a problem with the least-square-method in statistic:

I've looked for an example and I found this: In the book << Springer Series in Statistics >> by D. Brillinger, page 294, there is a table. This table shows an average concentration of Sulfur dioxide from 1956 to 1974.Sulfur dioxide average concentration

The following graph shows the values of monthly maxima as "x" and yearly maxima as "o". Observed d.f. of monthly maxima (x), yearly maxima (o) from 1956 to 1974

Now, assuming a double exponential distribution for annual maximum, one can estimate parameters $\alpha$ and $\beta$ by maximum-likelihood method. The parameters $\alpha$ and $\beta$ were calculated by an variant of the least-squares method, so: $\alpha = 0.0824$ and $\beta=-2.6058$.

But now I have other values for $\alpha$ and $\beta$. My step-by-step solution:

1. To calculate $\beta$, I use the following formula:

$$\beta=\frac{\sum_{i=1}^n(x_i-\bar{x})(y_i-\bar{y})}{\sum_{i=1}^n(x_i-\bar{x})^2},$$

while $\bar{x}=\frac{1}{n}\sum_{i=1}^n x_i$ and $\bar{y}=\frac{1}{n}\sum_{i=1}^n y_i$.

$x_i$ are the sorted databases of annual maxima and $y_i$ are the databases of the empirical distribution function.

So: \begin{align*} \bar{x} &= \frac{1}{19}\sum_{i=1}^{19} x_i = \frac{1}{19}\cdot 721 = 37.9474.\\ \bar{y} &= \frac{1}{19}\sum_{i=1}^{19} y_i = \frac{1}{19}\cdot 9.5 = 0.5.\\ \sum_{i=1}^n (x_i-\bar{x})^2 &= 3082.9474.\\ \sum_{i=1}^n (x_i-\bar{x})(y_i-\bar{y}) &= 64.55.\\ \Rightarrow \beta &= \frac{64.55}{3082.9474}= 0.0209. \end{align*}

2. To calculate $\alpha$, I use the following formula:

$$\alpha = \bar{y}-\beta\cdot\bar{x}.$$

So, $\alpha = 0.5-0.0209\cdot 37.9474=-0.2945$ and $y=\alpha+\beta\cdot x =-0.2945+0.0209\cdot x$

3. Drawing $(x_i,y_i)$ with the linear regression $y=\alpha+\beta\cdot x$:

enter image description here

Could you help me, where my mistake is, please?

1

There are 1 best solutions below

1
On

Okay, I've found out how they calculate $\alpha$ and $\beta$:

\begin{align*} \frac{i}{n+1}&=\exp(-\exp(-\alpha x_i-\beta))\\ \Leftrightarrow -\ln\left(\frac{i}{n+1} \right) &=\exp(-\alpha x_i-\beta)\\ \Leftrightarrow y_i:=-\ln\left(-\ln\left(\frac{i}{n+1} \right)\right) &=\alpha x_i+\beta. \end{align*}

And with the least-square method, I've got

$$\alpha=0.0824,\qquad\beta=-2.6058.$$ EDIT: I got it! enter image description here

Last question: How can I get the orange line as a straight line in Excel?