Check them out.

Here are thirty homoscedastic ones:

> homo.wieners <- array(0, c(100, 30))
> for (j in 1:30) {
  for (i in 2:length(homo.wieners)) {
          homo.wieners[i,j] <-  homo.wieners[ i - 1, j] + rnorm(1)
                     }}

> for (j in 1:30) {

       plot( homo.wieners[,j], 
          type = "l", col = rgb(.1,.1,.1,.6),
          ylab="", xlab="", ylim=c(-25,25)
            );
             par(new=TRUE)

image

 

Here’s just the meat of that wiener, in case the for loops or window dressing were confusing.

homo.wiener[i] <-  homo.wiener[ i - 1] + rnorm(1)

image

image

 

I also made you some heteroskedastic wieners.

# same for-loop encasing. ∀ j make wieners; ∀j plot wieners
> hetero.wiener[i] <- hetero.wiener[ i-1 ] + rnorm(1, sd=rpois(1,1) )

 

image

image
image

 

It wasn’t even that hard — here are some autoregressive(1) wieners as well.

# same for-loop encasing. j make wieners; ∀j plot wieners
> ar.wiener[i] <- ar.wiener[i-1]*.9 + rnorm(1)

image

image

image

 

Other types of wieners:

  • a.wiener[i-1] + rnorm(1) * a.wiener[i-1] + rnorm(1)
  • central.limit.wiener[i-1] + sum( runif(17, min=-1) )
  • cauchy.wiener[i-1] + rcauchy(1)      #leaping lizards!
    image
    image 
  • random.eruption.wiener[i-1] + rnorm(1) * random.eruption.wiener[i-1] + rnorm(1)
    image
    image
    image
     
  • non.markov.wiener[i-1] + non.markov.wiener[i-2] + rnorm(1)
  • the.wiener.that.never.forgets[i] <- cumsum( the.wiener.that.never.forgets) + rnorm(1)
  • non.wiener[i] <- rnorm(1)
    image 
  • moving.average.3.wiener[i] <- .6 * rnorm(n=1,sd=1) + .1 * rnorm(n=1,sd=50) + .3 * rnorm(n=1, mean=-3,sd=17)
  • 2d.wiener <- array(0, c(2, 100));
    ifelse( runif(1) > .5,
         2d.wiener[1,i] <- 2d.wiener[1,i-1] + rnorm(1)
                 && 2d.wiener[2,i] <- 2d.wiener[2,i-1],
         2d.wiener[2,i] <- 2d.wiener[2,i-1] + rnorm(1)
                 && 2d.wiener[ 1,i] <- 2d.wiener[1,i-1]
    image
    image
    image 
  • 131d.wiener <- array(0, c( 131, 100 )); ....
  • cross.pollinated.wiener
  • contrasting sd=1,2,3 of homo.wieners
    image 
 

What really stands out in writing about these wieners after playing around with them, is that logically interesting wieners don’t always make for visually interesting wieners.

There are lots of games you can play with these wieners. Some of my favourites are:

  • trying to make the wieners look like stock prices
    http://blogs.msdn.com/cfs-filesystemfile.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-22-metablogapi/3733.allseries_5F00_3535DC51.png
    http://www.bearcave.com/misl/misl_tech/signal/nonstat/amat_close.jpg
    http://www.emeraldinsight.com/fig/1598_10_1016_S1569-3767_07_00005-2.png
    http://1.bp.blogspot.com/_RWNobQntW2c/R9e4V74gvEI/AAAAAAAAADs/ZvKIShVqYHg/s320/icici-price-cds.jpg
    http://1.bp.blogspot.com/-Zswl-HvKgB8/UAGTC4_Gc-I/AAAAAAAAC80/s5PgmZYLSdk/s1600/Conditional%2BMC%2BStock.png
    http://www.bearcave.com/misl/misl_tech/wavelets/wavelet_graph.jpg
    http://cdn.macrumors.com/article-new/2012/08/aapl_644_13.jpg
    http://blog.ipl.com/wp-content/uploads/MSM-Volatility.png
    http://www.mathworks.com/cmsimages/50806_wl_dft4_fig1_wl.jpg
    image
    image
    image
    image
    image
    ChartIQ Practice Trading Simulator
    CNBC Real-Time
    (I thought sqrt(rcauchy(1)) errors with a little autocorrelation looked pretty good)
  • trying to make them look like heart monitors
    pieces of a QRS wave complex
    (actually really hard, as they’re composed of PQRST waves)

Also it’s pretty hard to tell which wieners are interesting just from looking at the codes above. I guess you will just have to go mess around with some wieners yourself. Some of them will surprise you and not do anything; that’s instructive as well. 

 

VOICE OF GOD: WHAT’S UP. I AM THAT I AM. I DECLARE THAT THE WORD ‘WIENER’ IS OBJECTIVELY FUNNY. THAT’S ALL FOR NOW. SEE YOU WEDNESDAY THE 17TH.

21 notes

  1. schoolkidforever reblogged this from isomorphismes
  2. nxtw reblogged this from isomorphismes
  3. rosskolnikov reblogged this from isomorphismes
  4. pagalsardar said: This is interesting ! Can you do a piece about combinators?
  5. the-littlest-tiger reblogged this from isomorphismes
  6. bparramosqueda reblogged this from isomorphismes
  7. isomorphismes posted this