# Error in the standard deviation when simulating an ARMA(1,1) using arima.sim

I'm trying to simulate an ARMA(1,1) process whose autoregressive and moving average parameters are, respectively, 0.74 and 0.47. Moreover, I want the simulated data to have mean equal 900 and standard deviation equal to 230. To accomplish this, I tried

set.seed(100)

fit = arima.sim(list(order = c(1,0,1), ar = 0.74, ma = 0.47), n = 10000,
rand.gen= rnorm, sd = 230) + 900


The mean of the synthetic time series is acceptable.

mean(fit)
#922.749


However, when I calculate the standard deviation, the difference between the calculated value and the one I stipulated as the standard deviation for fit is too large.

sd(fit)
#511.3077 - almost two times higher than the value I thought I'd observe


How can I change my code to make sure the simulated series will have a standard deviation close to the one I stipulate inside the arima.sim function?

The sd(fit) is $$\sqrt{Var(y_t)}$$ where $$y_t$$ is ARIMA(1,1), however the sd you specify in the arima.sim call is the sd of the white noise in the series.

Consider the AR(1)-proces $$y_t = b y_{t-1} + u_t$$ $$u_t = \sigma \epsilon_t$$ $$\epsilon_t \sim \mathcal N(0,1)$$ here the $$sd(y_t) = \sqrt{Var(y_t)}$$ which can be found to be $$Var(y_t) = b^2Var( y_{t-1}) + \sigma^2Var( \epsilon_t)$$ such that

$$Var(y_t) = \frac{\sigma^2}{1-b^2}$$

and $$\sigma$$ is standard deviation of $$u_t$$.

Specifying a model in R

set.seed(100)
b <- 0.5
s <- 0.9
fit = arima.sim(list(order = c(1,0,0), ar = b), n = 100000,
rand.gen= rnorm, sd = s)

sd(fit)
sqrt(s^2/(1-b^2))


returns the output

> sd(fit)
[1] 1.041033
> sqrt(s^2/(1-b^2))
[1] 1.03923


so the sd in arima.sim is $$\sigma$$.