Theory:

The mean of the ungrouped frequency distribution can be determined using the formula:
$$\overline X = \frac{f_1 x_1 + f_2 x_2 + ... + f_n x_n}{f_1 + f_2 + ... + f_n}$$ $$= \frac{\sum_{i=1}^{n} f_i x_i}{\sum_{i=1}^{n} f_i}$$
Example:
The height(in $$cm$$) of $$20$$ students in a classroom are:

 Height$$x_i$$ Number of students$$f_i$$ $$130$$ $$1$$ $$135$$ $$2$$ $$140$$ $$1$$ $$155$$ $$2$$ $$163$$ $$1$$ $$165$$ $$3$$ $$177$$ $$2$$ $$189$$ $$2$$ $$196$$ $$2$$ $$100$$ $$4$$

Find the mean height of the $$20$$ students.

Solution:

To find the value of $$f_ix_i$$, multiply the value of $$x$$ and $$f$$ of each entry.

Consider for the mark $$130$$. That is, $$130 \times 1 = 130$$

Similarly, for the mark $$135$$, we have $$135 \times 2 = 270$$ and so on.

Tabulating these values, we get:

 Marks$$x_i$$ Frequency$$f_i$$ $$f_ix_i$$ $$130$$ $$1$$ $$130$$ $$135$$ $$2$$ $$270$$ $$140$$ $$1$$ $$140$$ $$155$$ $$2$$ $$310$$ $$163$$ $$1$$ $$163$$ $$165$$ $$3$$ $$495$$ $$177$$ $$2$$ $$354$$ $$189$$ $$2$$ $$378$$ $$196$$ $$2$$ $$392$$ $$100$$ $$4$$ $$400$$ Total $$\sum f_i = 20$$ $$\sum f_ix_i = 3032$$

Substituting the known values in the above formula, we get:

Mean $$\overline X = \frac{3032}{20}$$ $$= 151.6$$

Therefore, the mean of the given data is $$151.6$$.