I want the same value but from the most recent five days

Your go-to forum for bot dataset expertise.
Post Reply
hoxesi8100@
Posts: 530
Joined: Thu Jan 02, 2025 7:08 am

I want the same value but from the most recent five days

Post by hoxesi8100@ »

For example, if I know the number of views my website received in the last five days, I can easily determine the average views in a five-day period.

Next week,, not the five days from the previous week. This means I’m using the same amount of time but updating the data to generate an average that accounts for new data.

To find a weighted moving average, you give more weight to values based on time.

In the example above, I assign weight to website views based on recency. More recent views (those that happened yesterday) are given more weight than those that happened five days ago. This means that each day I calculate by moving average, the weights change.

Here’s what it looks like:

For the first set of five days, I get 100, 200, 150, 300, and 100 views. I assign each of these days a weight, with the most recent day having the highest weight. To keep things simple, I’m going to use weights that add up to 100.

Day 1: 10 (x 100)
Day 2: 15 (x 200)
Day 3: 15 (x 150)
Day 4: 25 (x 300)
Day 5: 35 (x 100)
To get my weighted average, I use belarus phone number material the formula from the previous section. I multiply each value by its weight and divide by the sum of the weights. For the values listed, we get: 172.5

On day six, I run the weighted moving calculation again with new numbers. Our previous Day 1 is no longer applicable — it’s been replaced by the values from Day 2, which are now our Day 1. We also have a new set of data from Day 6 (overall), which is now our Day 5.
Post Reply