How do I determine the average carbon oxidation numbers in ethanol and ethanal? I have an assignment (I quote it word by word):  


  Determine the oxidation number of carbon in (A) ethanol and (B) ethanal. Answers are (A) -2 and (B) -1.


I reviewed similar question at SE: Oxidation of Carbons
and I found first answer to be clear and links given in this answer to be useful.
I also found a good  Khan Academy video, which basically confirms all in this answer

Now, here is my problem: There are two carbons in ethanol. Oxidation number of carbon which is connected to three hydrogens is $-3$; oxidation number of carbon which is connected to two hydrogens and one oxygen is $-1$. How do we get answer $-2$ out of it then? (Do we add $-3 + (-1)$ and then divide by 2?)

And again there are two carbons in ethanal. Oxidation number of carbon which is connected to three hydrogens is $-3$; oxidation number of carbon which is connected to one hydrogen and one oxygen (but with double bond) is $+1$. How do we get answer $-1$ out of it? (Do we add $-3 + 1$ and divide it by 2?)

Overall, my question does not seem to concentrate on one of the carbons present in ethanol (or ethanal). And answers given look like there is oxidation number of first carbon added to oxidation number of second carbon and then divided by 2. This situation seems to be true for ethanol, and again the same happens for ethanal.
Where can I read about adding two oxidation states and then calculating average (I have never heard of it)? Or maybe these calculations done in some other way? Thank you very much in advance for answering.
What you have been asked to calculate is what is called an average oxidation number. This is often used in inorganic chemistry (not because it is rather powerful, but because you can easily get away with it) but lesser in organic chemistry.

To properly determine oxidation states, you should do the calculation on a per-atom basis. And doing that would give you $\mathrm{-III}$ and $\mathrm{-I}$ for ethanol’s two carbons and $\mathrm{-III}$ and $\mathrm{+I}$ for ethanal’s. This method has a number of advantages:


you are always dealing with integers; no need for any fractional states
it is easy to see exactly which carbon’s oxidation state changed.


The downside of this method is that you cannot use it if you don’t know the structural formula. Consider if, for example, you only saw $\ce{C2H6O}$ or $\ce{C2H4O}$ — especially the first one could represent two different structures with different properties. This is were average oxidation states come in handy: you calculate an average of all the atoms of a single element. You may remember that oxygen is typically given $\mathrm{-II}$, hydrogen $\mathrm{+I}$ (except in peroxides and hydrides, respectively; although oxofluorides should get a special mention). You may also remember that the sum of oxidation states of a neutral compound must be $\pm 0$ that allows you to calculate the average oxidation states as follows:

$$\begin{align}\text{For }\ce{C2H6O}\text{:}&amp;\\
0 &amp;= 2 x + 6 \times (+1) + (-2)\\
0 &amp;= 2x + 6 - 2\\
0 &amp;= 2x + 4\\
-4 &amp;= 2x\\
x &amp;= -2\\
\\
\text{For }\ce{C2H4O}\text{:}&amp;\\
0 &amp;= 2 x + 4 \times (+1) + (-2)\\
0 &amp;= 2x + 4 - 2\\
0 &amp;= 2x + 2\\
-2 &amp;= 2x\\
x &amp;= -1\end{align}$$

Since these are averages, you can also arrive at the same conclusion by taking the arithmetic mean of all carbon atoms’ oxidation state; you will obviously arrive at the same result:

$$\begin{align}\ce{C2H6O}\text{:}&amp;\\
\bar{x} &amp;= \frac{-3 + (-1)}{2}\\
\bar{x} &amp;= \frac{-4}{2}\\
\bar{x} &amp;= -2\\
\\
\ce{C2H4O}\text{:}&amp;\\
\bar{x} &amp;= \frac{-3 + 1}{2}\\
\bar{x} &amp;= \frac{-2}{2}\\
\bar{x} &amp;= -1\end{align}$$