I have 1 year of daily data which is separated by months.
From the graph, month-end spikes can be seen every month.
What statistical test can be used to prove the monthly month-end spikes existence?
2 Answers
I can think of two ways of facing this problem.
If the time series data is stationary you can calculate the auto correlation function to see if there is a statistically significant correlation for lag 30 (one month separation). If the data is not stationary there are plenty of ways to transform it, but which works best will depend on the dataset. The simplest solution might be to difference the data with lag 1.
Perform a t-test where you compare the values at the end-of-month spikes to the mean of the entire data set. The t test would not show significance if there would be a difference in your data (remember what the null hypothesis for a t test is)
-
$\begingroup$ #1 would be a weak test if there is no monthly seasonality in data except for end of month phenomenon $\endgroup$– AksakalCommented Mar 28, 2018 at 14:38
-
$\begingroup$ @Viktor Karlsson Thank you for the assistance.. I will look more in-depth into t-test. $\endgroup$– Dp_Commented Mar 29, 2018 at 1:53
Split your sample into A and B, where A is 12 end of month days and B is the rest of the year. Follow this link to compare population means of A and B based on sample means, variances and sample sizes.
The main idea is to calculate the pooled variance, then use to do t-test on the difference between two sample means. Pooled variance is a weighted mean of variances of your samples, where the weights account for sample sizes.