I have a time series which indicates a certain demand over time. In my project I detect anomalies in this time series by applying Robust Principal Component Analysis (RPCA) which gives my something like a "baseline demand" (low rank matrix), "sparse demand" (sparse matrix which gives first hints about outliers) and the "noise demand" (noise matrix which gives my outliers) as can be seen in figure below.
Now, I have another dataset of known events (like musicals, parties etc.) which I expect to have an influence and might cause the outliers. Is there any way to mathematically/statistically bring these two time series in relationship in order to say that "Event at time XX has might cause an outlier at time XX+3 or 4 hours". The figure below shows the outlier (green bar) and the events (blue bars).
Cross-correlation is suitable to reveal a relationship between two time series but does this work when I just have one time series and another with rare events?
Thanks for any hints / tips and suggestions. I work with Python.