Systems of Equations - calculate avg $x$ & $y$ given $x$ & $y$ are normally distributed

116 Views Asked by At

Given a number of equations (say, 30), and assuming x & y are normally distributed, how would I go about determining the average value of x & y?

$10x_{1} + 60y_{1} = 5900$

$20x_{2} + 80y_{2} = 7400$

$...$

$30x_{30} + 140y_{30} = 16100$

What I'm after is the average value of x & y. I'm assuming that getting the exact average value of x & y is impossible, so how would I go about getting pretty close (or figuring out what sort of range x & y are in)?

(note: programmer running into this problem; my math skills are up to 3rd semester calc about a decade ago in college)

2

There are 2 best solutions below

2
On

If align to $\dfrac 1{30}$ all coefficients at x in equations and then take sum getting equations, we can estimate linear relation between averages of x and y. So we provide average x with the definition verasity and good approaching for average of y.

0
On

Your question is not clear. Some suggestions

Let $z_i = a_i x_i+ b_i y_i - c_i$ where $x_i,y_i$ are normally distributed and the coefficients are known. Let $\mu_x=E(x_i)$, $\mu_y=E(y_i)$, $\sigma^2_x=Var(x_i)$, $\sigma^2_y=Var(y_i)$, $\sigma_{xy}=Cov(x_i,y_i)$.

Then $z_i$ is normal with $\mu_{z_i}=a_i \mu_x+b_i \mu_x - c_i$ and $\sigma^2_{z_i}=a_i^2 \sigma^2_x +b_i^2 \sigma^2_y+2a_i b_i \sigma_{xy}$

Then the log-likelihood of the data ($z_i=0$) is

$$L= - \sum \frac{\mu_i^2}{2\sigma_i^2}- \frac{1}{2}\sum \log(\sigma_i^2) $$

You could try to maximize this (as function of the parameters), but it looks quite cumbersome.

Another semi-heuristic recipe, given that minimizing squared errors with linear models goes typically hand in hand with gaussian models:

  1. Normalize each linear equation, dividing by $\sqrt{a_i^2+b_i^2}$, so that the normalized coefficients verify $a_i^2+b_i^2=1$

  2. The squared distance of a point $(X,Y)$ to the line $a_i x + b_i y - c_i=0$ is now given by $(a_i X + b_i Y - c_i)^2$. Hence, if we want to minimize the total squared distance, we'd like to "solve" the equation

$$A X =C$$ where $A$ is a $30 \times 2$ matrix ($a_i$ as first columne, $b_i$ as second column), $X=(x,y)^t$ is a $2 \times 1$ matrix, $C$ is a $30 \times 1$ matrix ($c_i$ as a column). Of course, this system of 30 equations with 2 variables has (in general) no exact solution, but it can be "solved" in a least-squared sense via the pseudoinverse matrix. Typically we'd compute:

$$X = (A^t A)^{-1}A^t C$$