# No autocorrelation in time series

I am trying to predict a time-series data set, using python. I have a timestamp and number of calls in a network for this particular timestamp. I have to predict number of calls in the future. Currently, I have 90 days of data and for every 20 minutes in a day i have an entry with number of calls.

I resample the data so i plot the mean of the data for every 3 days and i get the following results:

I am not sure the trend graph is saying much. The data is going up and down so no obvious trend. However, there is seasonality. After plotting this, I checked for autocorrelation and this is where the weirdness is happening I convert the created DataFrame to series and then plot it. This results in something weird, which shows just random values and no correlation

I do not know, if i am doing something wrong with my data, but if i have no autocorrelation and no stationarity, should i use Time Series analysis at all? And in general can I make any predictions on this data, maybe with linear regression? I am new to data science and i am doing this for my bachelor project, so i really need help. I have read a lot on the internet and maybe at this point i am pretty confused. Any help will be appreciated!

Regards

P.S Here are some screen shots of acf and pacf plots with statsmodel library First screenshot represents the data resampled to 3 days mean:

The acf and pacf for data resample to 1 day seems the same:

Here are the other plots as well for data resampled to 1 day

• 5/28/18 - 9/17/18 is not 90 days . Is this 5 readings per week or 7 ? post the actual data 90x72 in a csv format (1 column) as you have 90 days (you say) and 72 readings per day ( every 20 miniutes = 3x24) and I will try and help further. Commented Dec 1, 2018 at 17:42
• Considering the vertical axes, is a seasonality on the order of 0.01 truly meaningful? This may be helpful. You might profit from reading an introductory forecasting testbook. I recommend the excellent free online book Forecasting: Principles and Practice (2nd ed.) by Athanasopoulos & Hyndman. Commented Dec 1, 2018 at 17:58
• dropbox.com/s/lbsuir54veq0ond/DatafromPython.csv?dl=0 We have more than 90 days of data - my mistake. Actually, good question, maybe this seasonality is not very meaningful. I will check the book. Commented Dec 1, 2018 at 18:04
• @StephanKolassa The link you send is useful regarding information, but i work with python and there is no seasonal plot likle in R there As far as I know at least Commented Dec 1, 2018 at 18:11
• whys is your data all 1's ? Commented Dec 1, 2018 at 18:21

You ask .... what to do ...

I say I took your 121 daily values into AUTOBOX whose promary objective is to assess predictability from a sequence of observations for an interesting series to forecast possibly using ( not in this case ) user suggsted predictors .

Your series is a discrete series insofar as only a partictular set of values can be observed (71,72,73,74,,,)

AUTOBOX looks for predictability using prior values (ARIMA) and in this case daily effects and possible changes in daily effects.

The equation ( with identified features ) is here , The suggestion is that the only identified feature was a change in day6 at period 83 (of 121) suggesting that week 1-11 was different from week 12-17 .

This suggests forecasts here

Overall the Actual/Fit and Forecast graph is here

The confidence intervals around the forecast are asymmetrical and include the possibility of future anomalies.

• Okay, what i see from the graphs is that we cannot make accurate forecasting in my case? the last graph shows some forecasting but i cannot see how it fits with actual data. I am sorry but i have not worked with AUTOBOX. What i got is that i just have one change between week 1-11 and week 12-17. My primary question was: "...if i have no autocorrelation and no stationarity, should i use Time Series analysis at all? " Mainly focusing on the statement that i do not have autocorrelation thank you for the time you spend! :) Commented Dec 7, 2018 at 0:25
• Just because there is no autocorrelation ..it does not mean that there are lo latent determinstic structure like a seaonal pulse for day 6. Look at the following Commented Dec 7, 2018 at 2:53
• group 1 73,74,72,72,72,73,73,73,72,72,73; group 2 76 75 75 75 74 76 73 Commented Dec 7, 2018 at 2:54
• see how day 6 is significantly higher in the send group Commented Dec 7, 2018 at 2:58
• Okay i got it now :)) i will try to use ARIMA and explore my data better Commented Dec 7, 2018 at 11:31

Pandas isn't that well suited to analyze autocorrelation, that might be a source of problems in your data. The Statsmodels library in Python has better options.

Try: statsmodels.tsa.stattools.acf and statsmodels.tsa.stattools.pacf

You're also looking at the mean of every 3 days of data, when it is likely that your data has 24 hour seasonality and 7 days seasonality, and both will get muddied by averaging over 3 days.

• Thanks for the suggestion. I did plots with statsmodels for acf and pacf. I got some results that did not change much. I have added some screenshots in the original post. So as you can see still no autocorrelation. What would you suggest - should I use linear regression or still time series but change something? Commented Dec 3, 2018 at 21:06
• @Kosi: If interested in predicting future number of calls, will you want to predict the number of calls in the next hour (or next few hous), next day (or next few days), next week (or next few weeks), etc.? That should determine the level of temporal aggregation for your time series. For instance, if interested in predicting the number of calls in the next day (or next few days), it will be convenient to work with a time series of daily numbers of calls. Commented Dec 6, 2018 at 22:04
• If you have both trend and seasonality present in your (aggregated) time series, your forecasting model will have to reflect that. For forecasting purposes, you could use a time series regression model which includes trend, seasonality and possibly autocorrelated errors. Or you could use a seasonal ARIMA model. In any event, the ACF and PACF plots of the (aggregated) time series will respond to the presence of trend and seasonality in this series, so you should expect upfront to see some strong features in these plots. Commented Dec 6, 2018 at 22:08
• The real questions are: 1. What is the appropriate level of temporal aggregation for your original time series (if any)? 2. Given this level of aggregation, does the aggregated time series display evidence of trend and/or seasonality? 3. What kind of forecasting model will you use and how are you going to capture trend and/or seasonality in your model? (Once you settle on a model, you can refine it to allow for further nuances present in your data - but you have to start somewhere.) 4. How will you evaluate the suitability of your forecasting model for the data & the forecast accuracy? Commented Dec 6, 2018 at 22:12
• @Kosi: Are you aggregating your data (e.g., computing total number of calls for each day) or merely changing the sampling frequency? In any event, your decomposition plots show a locally changing trend over time as well as seasonality, so I am not sure why you would believe neither of these features exist in your data. Commented Dec 7, 2018 at 0:26