Questions tagged [moving-average]

A calculation of the average value of the most recent (within some window) values in a time series, rather than the average of the entire series.

Moving average is a calculation of the average value of the most recent (within some window) values in a time series, rather than the average of the entire series.

1034 questions
0
votes
1 answer

Moving Average plot

I have a huge text file similar to the table in below link. Each xxx box has different number of lines but same number of column: Here is the link to figure First point in the figure is the average of the first 3 values in the table, Second is the…
0
votes
1 answer

Calculating Moving Average, excluding middle value in R

I have used rollmean in R to calculate a moving average as so: > x = c(3, 8, 12, 5, 9, 6, 8) > rollmean(x, 7) [1] 7.285714 Rollmean takes an odd number input and calculates the Moving Average, INCLUSIVE of the middle value (in this case 5). …
Qaribbean
  • 178
  • 2
  • 3
  • 17
0
votes
1 answer

Moving trailing week average in PostgreSQL

My source data includes Transaction ID, Date, Amount. I need a one week trailing average which moves on a daily basis and averaging amount per transaction. Problem is, that sometimes there is no transactions in particuliar date, and I need avg per…
0
votes
2 answers

OBIEE Moving Average Drill Down

I have created a graph to show 6 months moving average column for last 13 months Now users want to drill on these 6MMAs for last 6 months data contributed to that moving average. Say , for Mar 2016 the contributing months are 10/2015, 11/2015,…
lalit
  • 1
  • 1
0
votes
1 answer

2D Array Lookup-Method to return interpolated value for unknown coordinates

I have a complete 2D array of 11 rows and 101 Columns for a car engine simulation in C#. Rows represent Engine RPM Values (0,1000,2000,...,8000,9000,10000) Columns represent throttle position in percent (0,1,2,...,98,99,100) The information within…
petem
  • 1
  • 1
0
votes
1 answer

Control charts with rolling averages in R

I am trying to create a Control charts with rolling averages in R that closely matches something like this. I am relatively new to R, and my grasp of all the available pages is not great yet. controlchart with moving average i'd like to recreate Can…
0
votes
1 answer

Computing moving average in SAS

I'm trying to use SAS to compute a moving average for x number of periods that uses forecasted values in the calculation. For example if I have a data set with ten observations for a variable, and I wanted to do a 3-month moving average. The first…
grig109
  • 73
  • 1
  • 9
0
votes
0 answers

Calculating rolling average over time by two conditions

A (small example) of my data is structured as follows: Individ <- data.frame(Participant = c("Bill", "Bill", "Bill", "Bill", "Bill", "Bill", "Jane", "Jane", "Jane", "Jane", "Jane", "Jane", "Jane", "Jane",…
user2716568
  • 1,866
  • 3
  • 23
  • 38
0
votes
0 answers

showing the autocorrelation fn of a moving avg q MA(q) time series

I am struggling with a math problem set question and just wanting some pointers: I have this a stationary time series (MA(h)) that satisfies this equation below and has the sigma^2 below xt=(ut+ut-1+ut-2+...ut-m)/m+1 with Var(x)=4.0 how do I figure…
R.Merritt
  • 477
  • 5
  • 17
0
votes
1 answer

Gliding average or sliding average

I need to compute the sliding or gliding average of the experimental data. Could you guide me how to do sliding average? I could not find reference about it. I only found some information about the moving average. Is the moving average the same as…
h747
  • 61
  • 1
  • 5
0
votes
1 answer

Simple Moving Average for stock prices

I was playing with ActiveQuant FinancialLibrary SimpleMovingAverage function SMA() below: Is there an error in the algo below, where it calculates the average by looking "into the future" ( as it does i < (period + skipdays) ) ? public static double…
Lydon Ch
  • 8,637
  • 20
  • 79
  • 132
0
votes
3 answers

Finding average from input array with Javascript - not calculating correctly

I am trying to calculate the average of 3 values (each numbered from 1-10) that are selected by the user and then pass the results to an text input (for display as a graph). It should be updating the new average every time one of the values is…
dchadney
  • 283
  • 2
  • 7
  • 18
0
votes
1 answer

Moving Averages vs Cumulative Averages Or?

This may be a basic question, but I've been searching through many lists to find what I am looking for. Basically, let me describe the data set. I have a set of data from a ticketing system that represents resolved tickets. I'm looking at resolve…
azdatasci
  • 801
  • 1
  • 13
  • 32
0
votes
1 answer

Grouped Rolling Average by Date

I have data at a Day Level. Each day always has more than 1 value, and the days are not necessarily in consecutive order. I want to create a calculation for the mean on a particular day and the rolling 14 day mean. I have tried doing this in R…
runningbirds
  • 6,235
  • 13
  • 55
  • 94
0
votes
4 answers

how to find moving average for all the days for the past 30 days with gap in date set to 0

I want to find moving average of the past 30 days. for example Today's date is 17/11/15, I have data only the days Original Data date qty 06/11/15 5 08/11/15 7 09/11/15 8 …