# Math Help - Mean values for TWO variables

1. ## Mean values for TWO variables

I've been out of college for several years now and although I did well in math, I cannot remember how to approach this problem. Could you help?

Here's what I have, a data set with a good sample size, N=2234. Each entry has quantities q(A), q(B), Total weight of A + B combined. I'm trying to find the average weight of A and the average weight of B.

If that's confusing, let me try this another way:
44 of object A, 39 of object B, total weight 6781 pounds
61 of object A, 42 of object B, total weight 9102 pounds

I have the quantities of A and B, and the total weight, but I'm interested in the average values of A and B over the course of 2234 observations.

2. Originally Posted by seligman28
I've been out of college for several years now and although I did well in math, I cannot remember how to approach this problem. Could you help?

Here's what I have, a data set with a good sample size, N=2234. Each entry has quantities q(A), q(B), Total weight of A + B combined. I'm trying to find the average weight of A and the average weight of B.

If that's confusing, let me try this another way:
44 of object A, 39 of object B, total weight 6781 pounds
61 of object A, 42 of object B, total weight 9102 pounds

I have the quantities of A and B, and the total weight, but I'm interested in the average values of A and B over the course of 2234 observations.
You have a system of linear equations.

$44A+39B=6781$
$61A+42B=9102$

$\displaystyle\begin{bmatrix}44&39&6781\\61&42&9102 \end{bmatrix}$

After you rowreduce, divide A by 44. That will be the avg weight for those 44 objects.

Do the same for B and then do it for the other equation. If the weights of all A and B are equal, then you won't need to.

*This will only be the avg of the weights for the specified amount of A and B unless every A and B are the same.*

3. Originally Posted by seligman28
If that's confusing, let me try this another way:
44 of object A, 39 of object B, total weight 6781 pounds
61 of object A, 42 of object B, total weight 9102 pounds
So these are the first 2 lines of 2234?

At first this looks like a system of equations i.e. 44A+39B=6781 and 61A+42B=9102. But that implies all A and B are always the same weight and the average will be that exactly.

If object A and object B have different weights throughout the entire dataset it is not possible to find the average value as you need the total weight of all A and the total weight of all B.

4. Yes, it's the first two rows out of 2234.

I already know from hands-on experience that the average weight of A is 135-143 pounds, and B is 30-37 pounds but I'd like to find something more exact.

5. Originally Posted by seligman28
I've been out of college for several years now and although I did well in math, I cannot remember how to approach this problem. Could you help?

Here's what I have, a data set with a good sample size, N=2234. Each entry has quantities q(A), q(B), Total weight of A + B combined. I'm trying to find the average weight of A and the average weight of B.

If that's confusing, let me try this another way:
44 of object A, 39 of object B, total weight 6781 pounds
61 of object A, 42 of object B, total weight 9102 pounds

I have the quantities of A and B, and the total weight, but I'm interested in the average values of A and B over the course of 2234 observations.
This is essentially a regression problem of finding A' and B' that best fits the observations. For this kind of problem the matrix left divide operator in Matlab will give the least squares solution.

CB