ASSUMPTION:

These two groups contain different students, that is, there are no students that belong to both groups and attend both classes, so the total number of students is #120+150=270#, and our task is to evaluate the mean attendance of any of two classes by a combined set of students of both groups.

Let #x_i# represent attendance of the first class (XI-A) by an #i^(th)# person of the first group of #N_1=120# students. It is equal to #1# if this person attended the first class and #0# otherwise.

Since the mean attendance in this group equals to #M_1=56.35#, we can write the equation:

#M_1 = (Sigma x_i)/N_1 = (x_1+x_2+...+x_120)/120 = 56.35#

or

#Sigma x_i = x_1+x_2+...+x_120 = N_1*M_1 = 120 * 56.35 = 6762#

Let #y_j# represent attendance of the second class (XI-B) by an #j^(th)# person of the second group of #N_2=150# students. It is equal to #1# if this person attended the second class and #0# otherwise.

Since the mean attendance in this group equals to #M_2=63.45#, we can write the equation:

#M_2 = (Sigma y_j)/N_2 = (y_1+y_2+...+y_150)/150 = 63.45#

or

#Sigma y_j = y_1+x_2+...+y_150 = N_2*M_2 = 150 * 63.45 = 9517.5#

Combining both groups, we have #N_1+N_2=120+150=270# students, whose attendance of one of two classes is represented by variables #x_i# (where #i in [1,120]#) and #y_j# (where #j in [1,150]#).

Their mean attendance of any of two classes can be represented as

#M = (Sigma x_i + Sigma y_j)/(N_1+N_2) = #

# = (N_1*M_1+N_2*M_2)/(N_1+N_2) =#

# = (6762+9517.5)/270 ~~ 60.34#