What does it mean to sample?
Activity One: Sampling from the boxes sheet.
we are bad at picking out boxes on our own. We used r to get the boxes for us to select. This gave us better results than we had before.
Activity Two: Flipping a Coin
we are going to get very different results here: some will get ten coin flips all heads, some tails, some of us near the center
but how do we know if it's a fair coin?
BIG IDEA: when we sample, we head towards the mean. But this means that there are going to be drastic differences. sometimes, when we sample, we are going to get a result that is off from what we expect.
Activity Three: Back to the Boxes.
sample 10 according to r. take those values and make a graph as a class:
boxes=c(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,12,4,5,12,8,4,4,16,4,5,10,4,5,4,10,16,16,8,6,4,5,9,10,3,12,4, 10,12,10,6,16,16,8,4,5,18,4,3,9,12,16,3,6,8,4,2,5,18,4,12,4,12,8,3,16,5,9,6,10,3,18,8,10,16,6,15,8,4, 18,10,4,2,5,8,16,6,9,12,4,9,18,8,8,8)
list=c(1:20)
plot(boxes,boxes,col="white",pch=16,xlim=c(0,20),ylim=c(0,20),xlab="mean",ylab="test number")
abline(v=mean(boxes),lwd=3)
our.values=c( ....what we got in class ...)
points(our.values,list,pch=19)
some are near the value, others are father away. obviously, this is going to happen every time we do something like this.
what we need is an acceptable RANGE that comes from our sample. This range should be small enough to be useful, but large enough for us to not be wrong.
BIG IDEA: by sampling, we create something that's "normal". Which means, we create a value that we can work with.
BIG IDEA: by using z-scores, we can determine how "confident" we want to be about our guess.
list=c(1:20)
plot(boxes,boxes,col="white",pch=16,xlim=c(0,20),ylim=c(0,20),xlab="mean",ylab="test number")
abline(v=mean(boxes),lwd=3)
sample.boxes=c()
for(i in 1:20){sample.boxes<-c(sample.boxes,mean(sample(boxes,10)))}
points(sample.boxes,list,pch=19)
z.star=1.960
sample.box.low=sample.boxes-z.star*sd(boxes)/sqrt(10)
sample.box.high=sample.boxes+z.star*sd(boxes)/sqrt(10)
segments(sample.box.low,list,sample.box.high,list,col="red")
This is going to create a list for us. but how did I come up with the numbers?
N(mean, sd/sqrt(n)) ... so I use: x +- z* (sd/sqrt(n)). This gives me a range where I believe that the true value lies.