normapproxR - rownames(ExponentialSamples) <-...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Sheet1 Page 1 # To use R commander to generate samples: # > library(Rcmdr) # From Rcmdr menu: # Distributions # --> Continuous Distributinos # --> Exponential Distribution # --> Sample from Exponential distribution # Select number of samples and sample size etc. # Equivalently, copy the following comands into the command window: #matrix with 50 samples of size n=100 from the exponential distribution #last column has the sample mean ExponentialSamples <- as.data.frame(matrix(rexp(50*100, rate=1), ncol=100))
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: rownames(ExponentialSamples) <- paste("sample", 1:50, sep="") colnames(ExponentialSamples) <- paste("obs", 1:100, sep="") ExponentialSamples$mean <- rowMeans(ExponentialSamples[,1:100]) # Now let's look at the sample and the sample means. .. # histogram of one of the first sample hist(as.numeric(ExponentialSamples[1,-101])) #histogram of the sample means hist(ExponentialSamples[,101])...
View Full Document

This note was uploaded on 09/11/2011 for the course STAT 200 taught by Professor Agniel during the Spring '09 term at University of Illinois at Urbana–Champaign.

Ask a homework question - tutors are online