Skip to content

Commit

Permalink
Adding Day 12 Material
Browse files Browse the repository at this point in the history
  • Loading branch information
justingrimmer committed Sep 14, 2017
1 parent 9843ebd commit 2e87e35
Show file tree
Hide file tree
Showing 3 changed files with 1,193 additions and 0 deletions.
24 changes: 24 additions & 0 deletions mc12_17.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
##putting together an example with the t-distribution

##let's take samples from a normal distribution and show what the t-distribution from the test stastic


test.stat<- function(sims, n){

store<- c()
for(z in 1:sims){
ee<- rnorm(n, mean = 0, sd = 0.1)
ff<- mean(ee)
gg<- var(ee)
store[z]<- ff/(sqrt(gg/n)) }

return(store)
}


round1<- test.stat(1000, 2)
plot(density(round1))
round2<- test.stat(1000, 3)
plot(density(round2))
round3<- test.stat(1000, 100)
plot(density(round3))
Binary file added mc12_17.pdf
Binary file not shown.
Loading

0 comments on commit 2e87e35

Please sign in to comment.