Average of age in a family

Some days ago my friend sent me this problem, and I couldn't solve it. It's a pretty simple problem, but I'm struggling with it.

It reads:

The average age in a family (mother, father and their children) is $18$. If we don't take the father, who is $38$, into the average, it drops to $14$. How many kids are in that family?

So how many kids are in that family? Any help is very much appreciated.


Solution 1:

If you say $s$ is the sum of the ages, and $k$ is the number of children, then we have the following two equations:

$\frac s {k+2}=18$

$\frac {s-38}{k+1}=14$

Solving them gives $k=4$, so there are 4 children.

Solution 2:

Let $X$ be the sum of the ages (of the family members) and let $n$ be the number of members. We have:

$18=\frac{X}{n}$ and $14=\frac{X-38}{n-1}$

We conclude $18n=X$ and $14(n-1)=X-38$. From this, we conclude $4n=24$ and so $n=6$.

Since $n$ is the number of family members, we can subtract 2 (parents) from $n$ and get the number of children, 4.