I have time series data and I used an $ARIMA(p,d,q)+X_t$ as the model to fit the data. The $X_t$ is an indicator random variable that is either 0 (when I don’t see a rare event) or 1 (when I see the rare event). Based on previous observations that I have for $X_t$ , I can develop a model for $X_t$ using Variable Length Markov Chain methodology. This enables me to simulate the $X_t$ over the forecasting period and gives a sequence of zeros and ones. Since this is a rare event, I will not see $X_t=1$ often. I can forecast and obtain the prediction intervals based on the simulated values for $X_t$.


How can I develop an efficient simulation procedure to take into account the occurrence of 1’s in the simulated $X_t$ over the forecasting period? I need to obtain the mean and the forecasting intervals.

The probability of observing 1 is too small for me to think that the regular Monte Carlo simulation will work well in this case. Maybe I can use “importance sampling”, but I am not sure exactly how.

Thank you.

  • 6
    $\begingroup$ Guys, please don't change the title and the body of my question too much! "Mixing" and "variable-length Markov chain" is not my question. The question is about forecasting and simulation. Please let me decide how to ask the question ... $\endgroup$
    – Stat
    Aug 26, 2012 at 0:00
  • $\begingroup$ What is importance of Arima component in your question? It's seems that it is not related to the question at all? $\endgroup$
    – mpiktas
    Aug 27, 2012 at 9:15
  • $\begingroup$ Another thought, if probability of $P(X_t=1)=p$ is very low, compared with $X_t=0$ the prediction interval of $[0,0]$ will have coverage probability $1-p$. So maybe prediction intervals are not that useful in your case? Furthermore if $d>0$ for your $ARIMA(p,d,q)$ model, then $ARIMA(p,d,q)$ part will dominate the $X_t$. $\endgroup$
    – mpiktas
    Aug 27, 2012 at 9:32
  • $\begingroup$ @mpiktas: thank you for the comments. Arima is indeed important in my question, since this is the main model I used to fit. What do you mean by “prediction interval of [0,0]”? I think the forecasting intervals are useful even in this case. I have $d>0$, however the effect of $X_t$ over the fitted values $ARIMA(p,d,q)$ is prominent. Even over the forecasted period, $X_t$ has its own effect. $\endgroup$
    – Stat
    Aug 27, 2012 at 13:06

1 Answer 1


Firstly we consider a more general case. Let $Y = Y(A, X)$, where $A \sim f_A(\cdot)$ and $X \sim f_X(\cdot)$. Then, assuming the support of $g_x(\cdot)$ dominates the one of $f_X(\cdot)$ and all the integrals below exist, we have: $$ P(Y \le y) = \mathbb{E}_{f_A, f_X}\left[I(Y \le y)\right] = \mathbb{E}_{f_X}\left[\mathbb{E}_{f_A}\left[I(Y \le y) \mid X \right]\right] = \int_{supp(f_X)}{\mathbb{E}_{f_A}\left[I(Y \le y) \mid X = x \right]f_X(x)dx} = \int_{supp(f_X)}{\mathbb{E}_{f_A}\left[I(Y \le y) \mid X = x \right]\frac{f_X(x)}{g_X(x)}g_X(x)dx} = \int_{supp(g_X)}{\mathbb{E}_{f_A}\left[I(Y \le y) \frac{f_X(X)}{g_X(X)} \mid X = x \right]g_X(x)dx} = \mathbb{E}_{g_X}\left[\mathbb{E}_{f_A}\left[I(Y \le y) \frac{f_X(X)}{g_X(X)} \mid X \right]\right] = \mathbb{E}_{f_A, g_X}\left[I(Y \le y) \frac{f_X(X)}{g_X(X)}\right] $$

In your case $$ f_X(x) = \left\{ \begin{array}{cc} p & x = 1 \\ 1 - p & x = 0\\ \end{array} \right. $$ and $g_X(\cdot)$ can be defined like this: $$ g_X(x) = \left\{ \begin{array}{cc} 0.5 & x = 1 \\ 0.5 & x = 0\\ \end{array} \right. $$ Therefore, you can simulate $X$ via distribution $g_X(\cdot)$, but all the observations with $X=1$ will have the weight $\frac{p}{0.5}=2p$ and all the observations with $X=0$ will have the weight $\frac{1-p}{0.5}=2(1-p)$. Simulation of the ARIMA process will not be affected.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.