3 ms·
The data should have been labelled from the end of each month rather than from the beginning - then there wouldn't be the anomaly on the 31st. I.e. n[i] should
by casualaistudent 14y ago
The data should have been labelled from the end of each month rather than from the beginning - then there wouldn't be the anomaly on the 31st.
I.e. n[i] should be sum over all days d of tickets[d] where d is the i-th day from the end of the month that d occurs in.