lab6 - # Sampling Distribution: # In class, we have seen...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
# Sampling Distribution: # In class, we have seen the mathematical derivation of the mean and variance # of the sampling distribution of a statistic; the two statistics we have # discussed have been 1) sample mean and 2) sample proportion. Here you will # confirm that the equations given in the lecture are correct, # by actually performing the thought experiment that went into the # mathematical derivations. We will also address other statistics, e.g. median. # One important thing to keep in mind is this: The sampling distribution of # a sample statistic has nothing to do with data. It is a mathematical # quantity that one can compute, given some distribution (for the population). # That's why the formulas are all written in terms of the E[ ] and V[ ], # i.e., quantities that can be computed given some distribution, p(x). # By contrast, everything we do below is based on data - data we take # from a population. As a result, E[] is replaced with the sample mean. # This is why, the sampling distribution we build, below, is often called # the *empirical* sampling distribution. Technically, it's an approximation # to the true sampling distribution. # 1) Sampling distribution of the sample mean, when population is normal. # Type the following block into a script window, because you'll need to # run it again, with some numbers changed. ### Set up a normal population. This block is on the web: # rm(list=ls(all=TRUE)) # This erases everything in memory. set.seed(1) # This assures we all get same answer. N = 100000 # Let N be the population size. pop= rnorm(N,1,2) # Take a random sample and treat it as pop. pop.mean=mean(pop) # This is mu, the pop mean.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This document was uploaded on 05/19/2010.

Page1 / 3

lab6 - # Sampling Distribution: # In class, we have seen...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online