Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
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
Desktop-Sprite-image-Interval
ggplot Sample
31-08-2020-Exemplo AjusteNaoL
Practice series1(37)
Warhammer 40k
histograms for survey stats and fats
R
Practice
Interb-04-03-21
Delete True Values