The formula for calculating the average is simple: total number of kids/total number of families.
Note, while the kids and families will be integers, the average will likely be a double. Therefore, in Java, you need to type cast the result:
Average_kids_per_family =(double) total_number_of_kids/total_number_of_families