“Statistics is the grammar of science.”
Statisticians get to help with every step!
deck <- paste( c(2:10, 'Jack', 'Queen', 'King', 'Ace') |> rep(times=4), 'of',
c('Spades','Diamonds','Clubs','Hearts') |> rep(each=13) )
# To draw a hand of 7 cards:
hand <- deck |> sample(7)
# Shuffling is taking a sample the same size (52) without replacement:
shuffled_deck <- deck |> sample(length(deck))
# To do a bootstrap sample just add: , TRUEPerhaps we shall summarise the complete works of Shakespeare in a word cloud?
We could simulate a pair of \(VARIMA_2(1,1,1)-tGARCH(1,1)\) financial time series like so:
\[g(t)=a e^{-b e^{-ct}}+\varepsilon_t,\ f(\varepsilon)=\frac{\Gamma(0.5(\nu+1))}{\sqrt{\pi\nu}\Gamma(0.5\nu)}\left(1+\frac{\varepsilon^2}{\nu}\right)^{-0.5(\nu+1)}\]
Begin with the end goal in mind and do what it takes to get there.
Just remember one of these:
Young stars