The answer is C.
Given, x1,x2……xn are the means of n groups having number of observations n1,n2,……nn respectively.
Then, n1¯x1=∑ni=1xi,n2¯x2=∑n2i=1xj, n3¯x3=∑n3k=1xk……nn¯xn=∑nnp=1xp
Now, the mean ¯x of all the groups taken together is given by
¯x=∑ni=1xi+∑n2i=1xj+∑n3k=1xk……+∑nnp=1xpn1+n2+nn
=n1¯x1+n2¯x2+n3¯x3+……+nn¯xnn1+n2+……+nn=∑ni=1ni¯xi∑ni=1ni
Hence, the mean of all the groups taken together is given by,
¯x=∑ni=1ni¯xi∑ni=1ni