Domanda

I have to calculate the mean based on the given values (10, 20, 30) and I wrote the formula to calculate it.

(10+20+30)/3 = 20

Now, There is a requirement to calculate mean by adding values with the current mean. and that I did too.

(oldMean * oldTotalNumbers) + newNumber) / (oldTotalNumbers + 1)

i.e. (10+20+30+5)/4 = 16.25

By adding the value 5, the calculate new mean is 16.25 not the difference between old mean (20) and new mean (16.25) is 3.75. So, 50% of 3.75 is 1.875. and I want to increase the mean by the 50% of the difference.

i.e. Old mean: 20, New mean: 16.25, the difference is 3.75, then I would expect the new mean 18.125.

So, which fourth value I should use to get the mean 18.125? Can anyone help?

È stato utile?

Soluzione

Okay...

Some ideas to lead this into a direction. Following your example: (10+20+30) / 3 = 16.25

You are searching for a fourth value to add that leads to a mean of 18.125. So: 18.125 * 4 = 72.5

Minus the three given values: 72.5 - 60 = 12.5

This is 5 * 2.5

The next question is: Can this be taken as a general rule? Or is this factor (2.5) for the next value to add depending on some more?

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top