Run Code
|
Code Wall
|
Users
|
Misc
|
Feedback
|
About
|
Login
|
Theme
confidence interval stuff
failers = c(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1) passers_FB = c(0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1) passers_TB = c(0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1) x = failers n = length(x) # sample mean xbar = mean(x) nboot = 10000 # random resamples from x tmpdata = sample(x,n*nboot, replace=TRUE) bootstrapsample = matrix(tmpdata, nrow=n, ncol=nboot) # Compute the means x* bsmeans = colMeans(bootstrapsample) # Compute δ∗ for each bootstrap sample deltastar = bsmeans - xbar # Find the 0.025 and 0.975 quantile for deltastar d = quantile(deltastar, c(0.025, 0.975)) # Calculate the 95% confidence interval for the mean. ci = xbar - c(d[2], d[1]) cat('Confidence interval: ',ci, '\n')
run
|
edit
|
history
|
help
0
Please
log in
to post a comment.
1.second
Polynomial Regression
Warhammer 40k
Demonstration of table()
Tournois Mount & Blade
In Class Project2
Iron exp suco fatorial
For loops Example
SampleDiscrFR.r
factor
Please log in to post a comment.