Mean Formula and its foundation

General StatisticsLeave a Comment on Mean Formula and its foundation

Mean Formula and its foundation

In other articles from Arman Computer Magazine, we have examined how to calculate the average and weighted mean. But in this text, we want to discover the average or mean formula and learn how to derive its formula. I try to mention the formula syntax less, but sometimes it is necessary to use the syntax and variables to show the overall state of the calculations.


The Average Formula and the Purpose of Calculating It

We already know that the calculation or formula for the average is as follows, but the question that arises is why the average formula is written in this way. Here we represent the average as $\bar{X}$ or $\mu$.

$$\mu = \bar{X} = \frac{X_1 + X_2 + \cdots +X_n}{n} $$

But have we ever asked ourselves why this calculation method or mean formula is written this way? One of the important indicators of descriptive statistics is the central tendency indicators, of which the mean is one and can be calculated by all statistical software. The purpose of calculating the mean is to find a value that can be considered as a result or representative of all other values. In this way, we are looking for a value that we can consider as a substitute for all other values ​​and make a judgment or decision based on the mean value instead of examining all values. Next, we will examine the steps of creating the mean formula. Although the calculations may seem a bit complicated, numerical examples can illustrate the issue well.

Mean Formula for two numerical values

Suppose we have two values ​​$X_1$ and $X_2$ and we know that $X_1<X_2$. We want to calculate the mean or a number that does not lose much information if we substitute either of them. In order to smooth or equalize these two numbers and produce a new number to represent them, we add a value to $X_1$ and subtract the same value from $X_2$. It is better if this value is such that the new number is equidistant from $X_1$ and $X_2$. In this way, we add half the distance between these two numbers to the smaller number and also subtract it from the larger number.

$$\frac{X_2 – X_1}{2}$$

$$X_1 + \frac{X_2 – X_1}{2} = \frac{2X_1+X_2-X_1}{2} = \frac{X_1+X_2}{2}$$

$$X_2 – \frac{X_2 – X_1}{2} = \frac{2X_2-X_2+X_1}{2} = \frac{X_2+X_1}{2}$$

It is clear that the resulting number is the same distance from both numbers $X_1$ and $X_2$. This number is the average of the two numbers $X_1, X_2$.

Data mining

Numerical example for the Mean Formula of two values

According to the calculations mentioned, we want to find the average of the two numbers 3 and 5.

$$\frac{X_2 – X_1}{2}= \frac{5 – 3}{2} = 1$$

$$X_1 + \frac{X_2 – X_1}{2} =3 + 1 = \frac{5+3}{2} = \frac{8}{2} = 4$$

$$X_2 – \frac{X_2 – X_1}{2} = 5 – 1 = \frac{5+3}{2} = \frac{8}{2} = 4$$

In this way, the average of these two numbers will be equal to 4, which is the same distance from both numbers.

Mean Formula for three numerical values

Suppose this time we are faced with three numerical values ​​$X_1$, $X_2$, and $X_3$, and for simplicity, we consider them in the order $X_1<X_2<X_3$. As before, the average is supposed to be a number that is the same distance from each of the three numbers. From the previous section, we know that the average of the two numbers, $X_1$ and $X_2$, is $\frac{X_1+X_2}{2}$. Therefore, we replace ​​$X_1$ and $X_2$ with their average. In this way, we calculate the distance between $X_3$ and that average and divide it into three parts, subtract this part from $X_3$, and add it to the average of the previous two numbers. We note that we have replaced the two numbers $X_1$ and $X_2$ with their average, and now we still have three numbers that we need to calculate their average.

$$\frac{X_3 – \frac{X_1+X_2}{2}}{3} = \frac{2X_3 – X_1- X_2}{6}$$

Now we add this value to the average of the two numbers. In fact, we use two parts of the three parts to smooth the two original numbers.

$$\frac{X_1+X_2}{2}+\frac{2X_3 – X_1- X_2}{6}= \frac{6X_1+6X_2+ 4X_3 – 2X_1-2X_2}{12}=\frac{4X_1+4X_2 + 4X_3}{12} = \frac{X_1+X_2+X_3}{3}$$

Since two parts of the three parts have been used, we must also subtract that from the value of $X_3$ to balance them.

$$X_3 -2\left(\frac{2X_3 – X_1- X_2}{6}\right) = \frac{3X_3-2X_3+ X_2 + X_1}{3}= \frac{X_3+X_2+X_2}{3}$$

In this way, the average formula for three numbers is also derived.

Numerical example for the formula for the average of three values

According to the calculations mentioned before, we want to find the average of mean of numbers 3, 5 and 7. We knew that the average of two numbers 3 and 5 was equal to 4

$$\frac{X_3 – \frac{X_1+X_2}{2}}{3} = \frac{7 – 4 }{3} = 1$$

Now we will add this value to the mean of the first two numbers and subtract it from the third number.

$$\frac{X_1+X_2}{2}+\frac{2X_3 – X_1- X_2}{6}= \frac{4\times 3+4 \times 5 + 4\times 7}{12} = \frac{12+20+28}{12} = \frac{60}{12} = 5$$

This time, if we consider the base as the third number, 7, we will have:

$$X_3 -2\left(\frac{2X_3 – X_1- X_2}{6}\right) = 7 – 2 \left(\frac{2\times 7 – 3- 5}{6}\right) = 7 – 2 \left(\frac{14 – 3- 5}{6}\right)= 7 – \left(2 \times 1\right) = 5$$

But through the final formula, we also have:

$$\mu = \bar{X} = \frac{X_1+X_2+X_3}{3} = \frac{3+5+7}{3} = \frac{15}{3} = 5$$

Note; For the average of four numbers, we can first obtain the average of the first and second numbers and also the average of the third and fourth numbers and from them, according to the formula for the average of two numbers, we conclude the calculation related to the average of four numbers, which is written as follows.

$$\mu = \bar{X} = \frac{X_1 + X_2 + X_3 +X_4}{4} $$

The average formula in general for n numbers

It is clear that by generalizing the above formulas and similar to the induction operation in mathematical logic, the average of mean formula will be in the final form as follows. In this way, we were able to get acquainted with the average and also discover the foundation and basis for the mean formula. In this way, we were able to get acquainted with the average and also discover the foundation and basis for the mean formula.

$$\mu = \bar{X} = \frac{X_1 + X_2 + \cdots +X_n}{n} $$

Loading

Leave a Reply

Your email address will not be published. Required fields are marked *

Back To Top