Rumore bianco

Previsioni in R

Rob J. Hyndman

Professor of Statistics at Monash University

Rumore bianco

set.seed(3)          # Reproducibility
wn <- ts(rnorm(36))  # White noise
autoplot(wn)         # Plot!

Serie di rumore bianco

"Rumore bianco" è solo una serie temporale di dati iid

Previsioni in R

ACF del rumore bianco

ggAcf(wn) +
    ggtitle("Sample ACF for white noise")

ACF campionaria per rumore bianco

Previsioni in R

ACF del rumore bianco

ggAcf(wn) +
    ggtitle("Sample ACF for white noise")

ACF campionaria per rumore bianco

Previsioni in R

ACF del rumore bianco

ggAcf(wn) +
    ggtitle("Sample ACF for white noise")

ACF campionaria per rumore bianco

Previsioni in R

ACF del rumore bianco

ggAcf(wn) +
    ggtitle("Sample ACF for white noise")

ACF campionaria per rumore bianco

Previsioni in R

Esempio: maiali macellati

pigs <- window(pigs, start=1990)
autoplot(pigs/1000) +
  xlab("Year") +
  ylab("thousands") +
  ggtitle("Monthly number of pigs slaughtered in Victoria")

Numero mensile di maiali macellati in Victoria

Previsioni in R

Esempio: maiali macellati

ggAcf(pigs) +
  ggtitle("ACF of monthly pigs slaughtered
          in Victoria")

ACF dei maiali macellati mensilmente in Victoria

Previsioni in R

Esempio: maiali macellati

ggAcf(pigs) +
  ggtitle("ACF of monthly pigs slaughtered
          in Victoria")

ACF dei maiali macellati mensilmente in Victoria

Previsioni in R

Esempio: maiali macellati

ggAcf(pigs) +
  ggtitle("ACF of monthly pigs slaughtered
          in Victoria")

ACF dei maiali macellati mensilmente in Victoria

Previsioni in R

Test di Ljung-Box

Il test di Ljung-Box considera insieme le prime h autocorrelazioni.

Un test significativo (p-value piccolo) indica che i dati probabilmente non sono rumore bianco.

Box.test(pigs, lag = 24, fitdf = 0, type = "Lj")
Box-Ljung test
data:  pigs
X-squared = 634.15, df = 24, p-value < 2.2e-16
Previsioni in R

Sintesi: rumore bianco

  • Il rumore bianco è una serie temporale puramente casuale
  • Possiamo testarlo guardando il grafico ACF o con un test di Ljung-Box
Previsioni in R

Vamos praticar!

Previsioni in R

Preparing Video For Download...