Send output to:
Browser Blue - Charts White
Browser Black/White
CSV
Data:
9.741833333 9.741833333 9.551833333 9.381833333 10.05183333 13.18183333 13.15183333 12.76183333 12.01183333 11.40183333 10.87183333 10.28183333 9.531833333 9.281833333 8.861833333 8.481833333 8.121833333 7.781833333 7.461833333 7.131833333 6.401833333 5.291833333 4.411833333 3.651833333 2.941833333 1.321833333 -8.068166667 -8.768166667 -7.478166667 -3.588166667 -1.738166667 0.251833333 4.031833333 5.531833333 6.801833333 7.561833333 7.711833333 6.721833333 6.091833333 8.901833333 7.761833333 6.561833333 5.821833333 4.941833333 4.041833333 2.931833333 1.801833333 4.591833333 4.151833333 3.161833333 2.341833333 1.621833333 0.841833333 -0.118166667 -1.068166667 -2.078166667 -3.058166667 0.731833333 3.161833333 2.371833333 1.211833333 0.241833333 3.601833333 3.541833333 2.491833333 1.371833333 0.471833333 -0.638166667 -1.568166667 4.391833333 2.731833333 1.131833333 -0.118166667 -1.378166667 -2.838166667 -1.148166667 -1.498166667 -2.888166667 -4.248166667 -5.748166667 -3.148166667 -2.628166667 -2.998166667 -4.458166667 -4.788166667 -6.218166667 -7.158166667 -7.188166667 -7.528166667 -8.178166667 -9.768166667 -8.278166667 -7.738166667 -9.158166667 -9.918166667 -9.148166667 -10.58816667 -12.32816667 -10.89816667 -14.08816667 -16.87816667 -15.19816667 -17.21816667 -18.89816667 -17.07816667 -18.94816667 -15.66816667 -15.68816667 -10.09816667 -0.478166667 14.20183333 15.61183333 16.61183333 15.57183333 13.97183333 12.42183333 10.62183333 9.441833333 10.49183333 8.701833333 7.111833333 5.691833333 4.161833333 2.711833333 1.261833333 -0.028166667 -1.338166667 -2.498166667 -3.538166667 -2.048166667 -0.398166667 -1.388166667 -1.268166667 0.651833333 -1.048166667 -0.228166667 -0.888166667 -2.548166667 -4.028166667 -5.468166667 -6.948166667 -5.578166667 -1.248166667 -2.678166667 -2.608166667 -5.638166667 -6.528166667 -0.068166667 -1.758166667 -0.938166667 -1.468166667 -2.968166667 -4.518166667 -4.888166667 -4.378166667 -6.008166667 -7.758166667 -9.558166667 -7.578166667 -5.378166667 -7.068166667 -8.678166667 -10.16816667 -11.66816667 -5.378166667 -6.198166667 -7.608166667 -9.098166667 -10.37816667 -11.52816667 -10.28816667 -6.628166667 -7.788166667 -8.948166667 -10.05816667 -11.22816667 -12.72816667 -10.95816667 -11.56816667 -12.83816667 -12.83816667 -16.59816667 -18.45816667 -19.11816667 -19.76816667 -20.42816667 -24.22816667 -27.57816667 -28.13816667 -28.69816667 -29.23816667 -29.79816667 -30.29816667 -30.77816667 -31.24816667 -28.63816667 -28.30816667 -29.00816667 -29.50816667 -23.19816667 -23.74816667 -24.29816667 -24.57816667 -25.36816667 -25.83816667 -18.98816667 0.661833333 -0.508166667 -1.348166667 -0.388166667 -1.668166667 17.93183333 32.13183333 34.74183333 34.47183333 30.39183333 28.42183333 27.52183333 25.44183333 24.66183333 27.69183333 24.31183333 22.35183333 18.69183333 17.22183333 13.97183333 14.09183333 14.00183333 7.691833333 10.29183333 9.841833333 6.901833333 7.651833333 6.491833333 9.191833333 24.98183333 26.91183333 29.44183333 29.48183333 21.72183333 16.91183333 35.90183333 79.79183333 69.84183333 94.35183333 94.41183333 55.17183333 48.48183333 43.64183333 37.91183333 32.94183333 40.31183333 40.09183333 47.11183333 32.05183333 33.73183333 22.24183333 20.67183333 21.66183333 20.43183333 12.01183333 10.37183333 15.80183333 16.88183333 15.66183333 12.75183333 13.92183333 12.44183333 10.81183333 10.87183333 4.901833333 2.351833333 -1.848166667 -1.878166667 6.961833333 19.19183333 9.941833333 4.851833333 5.941833333 1.771833333 0.621833333 -4.768166667 -5.088166667 -9.078166667 -9.918166667 -8.778166667 -7.468166667 -8.988166667 -12.23816667 -18.57816667 -18.36816667 -15.16816667 -11.25816667 -21.91816667 -22.30816667 -21.68816667 -20.78816667 -26.64816667 -23.65816667 -24.58816667 -22.45816667 -23.92816667 -18.75816667 -15.68816667 -21.62816667 -24.21816667 -31.12816667 -32.96816667 -27.53816667 -27.53816667 -24.17816667 -31.30816667 -27.08816667 -28.46816667 -31.68816667 -29.08816667 -27.57816667 -31.00816667 -27.02816667 -29.95816667 -29.48816667 -30.69816667 -29.86816667 -28.37816667 -21.99816667 -21.71816667 -19.31816667 -21.34816667 -19.76816667 -14.34816667 -22.77816667 -21.79816667 -14.99816667 -16.14816667 -7.938166667 1.691833333 2.461833333 16.14183333 30.09183333 22.64183333 19.76183333 12.91183333 3.101833333 3.041833333 -1.718166667 8.051833333 11.81183333 11.88183333 27.19183333 17.78183333 11.73183333 12.90183333 9.431833333 2.441833333 3.681833333 9.811833333 6.101833333 4.681833333 16.86183333 24.64183333
Chart options
Title:
Y-axis minimum
Y-axis maximum
R Code
geomean <- function(x) { return(exp(mean(log(x)))) } harmean <- function(x) { return(1/mean(1/x)) } quamean <- function(x) { return(sqrt(mean(x*x))) } winmean <- function(x) { x <-sort(x[!is.na(x)]) n<-length(x) denom <- 3 nodenom <- n/denom if (nodenom>40) denom <- n/40 sqrtn = sqrt(n) roundnodenom = floor(nodenom) win <- array(NA,dim=c(roundnodenom,2)) for (j in 1:roundnodenom) { win[j,1] <- (j*x[j+1]+sum(x[(j+1):(n-j)])+j*x[n-j])/n win[j,2] <- sd(c(rep(x[j+1],j),x[(j+1):(n-j)],rep(x[n-j],j)))/sqrtn } return(win) } trimean <- function(x) { x <-sort(x[!is.na(x)]) n<-length(x) denom <- 3 nodenom <- n/denom if (nodenom>40) denom <- n/40 sqrtn = sqrt(n) roundnodenom = floor(nodenom) tri <- array(NA,dim=c(roundnodenom,2)) for (j in 1:roundnodenom) { tri[j,1] <- mean(x,trim=j/n) tri[j,2] <- sd(x[(j+1):(n-j)]) / sqrt(n-j*2) } return(tri) } midrange <- function(x) { return((max(x)+min(x))/2) } q1 <- function(data,n,p,i,f) { np <- n*p; i <<- floor(np) f <<- np - i qvalue <- (1-f)*data[i] + f*data[i+1] } q2 <- function(data,n,p,i,f) { np <- (n+1)*p i <<- floor(np) f <<- np - i qvalue <- (1-f)*data[i] + f*data[i+1] } q3 <- function(data,n,p,i,f) { np <- n*p i <<- floor(np) f <<- np - i if (f==0) { qvalue <- data[i] } else { qvalue <- data[i+1] } } q4 <- function(data,n,p,i,f) { np <- n*p i <<- floor(np) f <<- np - i if (f==0) { qvalue <- (data[i]+data[i+1])/2 } else { qvalue <- data[i+1] } } q5 <- function(data,n,p,i,f) { np <- (n-1)*p i <<- floor(np) f <<- np - i if (f==0) { qvalue <- data[i+1] } else { qvalue <- data[i+1] + f*(data[i+2]-data[i+1]) } } q6 <- function(data,n,p,i,f) { np <- n*p+0.5 i <<- floor(np) f <<- np - i qvalue <- data[i] } q7 <- function(data,n,p,i,f) { np <- (n+1)*p i <<- floor(np) f <<- np - i if (f==0) { qvalue <- data[i] } else { qvalue <- f*data[i] + (1-f)*data[i+1] } } q8 <- function(data,n,p,i,f) { np <- (n+1)*p i <<- floor(np) f <<- np - i if (f==0) { qvalue <- data[i] } else { if (f == 0.5) { qvalue <- (data[i]+data[i+1])/2 } else { if (f < 0.5) { qvalue <- data[i] } else { qvalue <- data[i+1] } } } } midmean <- function(x,def) { x <-sort(x[!is.na(x)]) n<-length(x) if (def==1) { qvalue1 <- q1(x,n,0.25,i,f) qvalue3 <- q1(x,n,0.75,i,f) } if (def==2) { qvalue1 <- q2(x,n,0.25,i,f) qvalue3 <- q2(x,n,0.75,i,f) } if (def==3) { qvalue1 <- q3(x,n,0.25,i,f) qvalue3 <- q3(x,n,0.75,i,f) } if (def==4) { qvalue1 <- q4(x,n,0.25,i,f) qvalue3 <- q4(x,n,0.75,i,f) } if (def==5) { qvalue1 <- q5(x,n,0.25,i,f) qvalue3 <- q5(x,n,0.75,i,f) } if (def==6) { qvalue1 <- q6(x,n,0.25,i,f) qvalue3 <- q6(x,n,0.75,i,f) } if (def==7) { qvalue1 <- q7(x,n,0.25,i,f) qvalue3 <- q7(x,n,0.75,i,f) } if (def==8) { qvalue1 <- q8(x,n,0.25,i,f) qvalue3 <- q8(x,n,0.75,i,f) } midm <- 0 myn <- 0 roundno4 <- round(n/4) round3no4 <- round(3*n/4) for (i in 1:n) { if ((x[i]>=qvalue1) & (x[i]<=qvalue3)){ midm = midm + x[i] myn = myn + 1 } } midm = midm / myn return(midm) } (arm <- mean(x)) sqrtn <- sqrt(length(x)) (armse <- sd(x) / sqrtn) (armose <- arm / armse) (geo <- geomean(x)) (har <- harmean(x)) (qua <- quamean(x)) (win <- winmean(x)) (tri <- trimean(x)) (midr <- midrange(x)) midm <- array(NA,dim=8) for (j in 1:8) midm[j] <- midmean(x,j) midm bitmap(file='test1.png') lb <- win[,1] - 2*win[,2] ub <- win[,1] + 2*win[,2] if ((ylimmin == '') | (ylimmax == '')) plot(win[,1],type='b',main=main, xlab='j', pch=19, ylab='Winsorized Mean(j/n)', ylim=c(min(lb),max(ub))) else plot(win[,1],type='l',main=main, xlab='j', pch=19, ylab='Winsorized Mean(j/n)', ylim=c(ylimmin,ylimmax)) lines(ub,lty=3) lines(lb,lty=3) grid() dev.off() bitmap(file='test2.png') lb <- tri[,1] - 2*tri[,2] ub <- tri[,1] + 2*tri[,2] if ((ylimmin == '') | (ylimmax == '')) plot(tri[,1],type='b',main=main, xlab='j', pch=19, ylab='Trimmed Mean(j/n)', ylim=c(min(lb),max(ub))) else plot(tri[,1],type='l',main=main, xlab='j', pch=19, ylab='Trimmed Mean(j/n)', ylim=c(ylimmin,ylimmax)) lines(ub,lty=3) lines(lb,lty=3) grid() dev.off() load(file='createtable') a<-table.start() a<-table.row.start(a) a<-table.element(a,'Central Tendency - Ungrouped Data',4,TRUE) a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a,'Measure',header=TRUE) a<-table.element(a,'Value',header=TRUE) a<-table.element(a,'S.E.',header=TRUE) a<-table.element(a,'Value/S.E.',header=TRUE) a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a,hyperlink('http://www.xycoon.com/arithmetic_mean.htm', 'Arithmetic Mean', 'click to view the definition of the Arithmetic Mean'),header=TRUE) a<-table.element(a,arm) a<-table.element(a,hyperlink('http://www.xycoon.com/arithmetic_mean_standard_error.htm', armse, 'click to view the definition of the Standard Error of the Arithmetic Mean')) a<-table.element(a,armose) a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a,hyperlink('http://www.xycoon.com/geometric_mean.htm', 'Geometric Mean', 'click to view the definition of the Geometric Mean'),header=TRUE) a<-table.element(a,geo) a<-table.element(a,'') a<-table.element(a,'') a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a,hyperlink('http://www.xycoon.com/harmonic_mean.htm', 'Harmonic Mean', 'click to view the definition of the Harmonic Mean'),header=TRUE) a<-table.element(a,har) a<-table.element(a,'') a<-table.element(a,'') a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a,hyperlink('http://www.xycoon.com/quadratic_mean.htm', 'Quadratic Mean', 'click to view the definition of the Quadratic Mean'),header=TRUE) a<-table.element(a,qua) a<-table.element(a,'') a<-table.element(a,'') a<-table.row.end(a) for (j in 1:length(win[,1])) { a<-table.row.start(a) mylabel <- paste('Winsorized Mean (',j) mylabel <- paste(mylabel,'/') mylabel <- paste(mylabel,length(win[,1])) mylabel <- paste(mylabel,')') a<-table.element(a,hyperlink('http://www.xycoon.com/winsorized_mean.htm', mylabel, 'click to view the definition of the Winsorized Mean'),header=TRUE) a<-table.element(a,win[j,1]) a<-table.element(a,win[j,2]) a<-table.element(a,win[j,1]/win[j,2]) a<-table.row.end(a) } for (j in 1:length(tri[,1])) { a<-table.row.start(a) mylabel <- paste('Trimmed Mean (',j) mylabel <- paste(mylabel,'/') mylabel <- paste(mylabel,length(tri[,1])) mylabel <- paste(mylabel,')') a<-table.element(a,hyperlink('http://www.xycoon.com/arithmetic_mean.htm', mylabel, 'click to view the definition of the Trimmed Mean'),header=TRUE) a<-table.element(a,tri[j,1]) a<-table.element(a,tri[j,2]) a<-table.element(a,tri[j,1]/tri[j,2]) a<-table.row.end(a) } a<-table.row.start(a) a<-table.element(a,hyperlink('http://www.xycoon.com/median_1.htm', 'Median', 'click to view the definition of the Median'),header=TRUE) a<-table.element(a,median(x)) a<-table.element(a,'') a<-table.element(a,'') a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a,hyperlink('http://www.xycoon.com/midrange.htm', 'Midrange', 'click to view the definition of the Midrange'),header=TRUE) a<-table.element(a,midr) a<-table.element(a,'') a<-table.element(a,'') a<-table.row.end(a) a<-table.row.start(a) mymid <- hyperlink('http://www.xycoon.com/midmean.htm', 'Midmean', 'click to view the definition of the Midmean') mylabel <- paste(mymid,hyperlink('http://www.xycoon.com/method_1.htm','Weighted Average at Xnp',''),sep=' - ') a<-table.element(a,mylabel,header=TRUE) a<-table.element(a,midm[1]) a<-table.element(a,'') a<-table.element(a,'') a<-table.row.end(a) a<-table.row.start(a) mymid <- hyperlink('http://www.xycoon.com/midmean.htm', 'Midmean', 'click to view the definition of the Midmean') mylabel <- paste(mymid,hyperlink('http://www.xycoon.com/method_2.htm','Weighted Average at X(n+1)p',''),sep=' - ') a<-table.element(a,mylabel,header=TRUE) a<-table.element(a,midm[2]) a<-table.element(a,'') a<-table.element(a,'') a<-table.row.end(a) a<-table.row.start(a) mymid <- hyperlink('http://www.xycoon.com/midmean.htm', 'Midmean', 'click to view the definition of the Midmean') mylabel <- paste(mymid,hyperlink('http://www.xycoon.com/method_3.htm','Empirical Distribution Function',''),sep=' - ') a<-table.element(a,mylabel,header=TRUE) a<-table.element(a,midm[3]) a<-table.element(a,'') a<-table.element(a,'') a<-table.row.end(a) a<-table.row.start(a) mymid <- hyperlink('http://www.xycoon.com/midmean.htm', 'Midmean', 'click to view the definition of the Midmean') mylabel <- paste(mymid,hyperlink('http://www.xycoon.com/method_4.htm','Empirical Distribution Function - Averaging',''),sep=' - ') a<-table.element(a,mylabel,header=TRUE) a<-table.element(a,midm[4]) a<-table.element(a,'') a<-table.element(a,'') a<-table.row.end(a) a<-table.row.start(a) mymid <- hyperlink('http://www.xycoon.com/midmean.htm', 'Midmean', 'click to view the definition of the Midmean') mylabel <- paste(mymid,hyperlink('http://www.xycoon.com/method_5.htm','Empirical Distribution Function - Interpolation',''),sep=' - ') a<-table.element(a,mylabel,header=TRUE) a<-table.element(a,midm[5]) a<-table.element(a,'') a<-table.element(a,'') a<-table.row.end(a) a<-table.row.start(a) mymid <- hyperlink('http://www.xycoon.com/midmean.htm', 'Midmean', 'click to view the definition of the Midmean') mylabel <- paste(mymid,hyperlink('http://www.xycoon.com/method_6.htm','Closest Observation',''),sep=' - ') a<-table.element(a,mylabel,header=TRUE) a<-table.element(a,midm[6]) a<-table.element(a,'') a<-table.element(a,'') a<-table.row.end(a) a<-table.row.start(a) mymid <- hyperlink('http://www.xycoon.com/midmean.htm', 'Midmean', 'click to view the definition of the Midmean') mylabel <- paste(mymid,hyperlink('http://www.xycoon.com/method_7.htm','True Basic - Statistics Graphics Toolkit',''),sep=' - ') a<-table.element(a,mylabel,header=TRUE) a<-table.element(a,midm[7]) a<-table.element(a,'') a<-table.element(a,'') a<-table.row.end(a) a<-table.row.start(a) mymid <- hyperlink('http://www.xycoon.com/midmean.htm', 'Midmean', 'click to view the definition of the Midmean') mylabel <- paste(mymid,hyperlink('http://www.xycoon.com/method_8.htm','MS Excel (old versions)',''),sep=' - ') a<-table.element(a,mylabel,header=TRUE) a<-table.element(a,midm[8]) a<-table.element(a,'') a<-table.element(a,'') a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a,'Number of observations',header=TRUE) a<-table.element(a,length(x)) a<-table.element(a,'') a<-table.element(a,'') a<-table.row.end(a) a<-table.end(a) table.save(a,file='mytable.tab')
Compute
Summary of computational transaction
Raw Input
view raw input (R code)
Raw Output
view raw output of R engine
Computing time
0 seconds
R Server
Big Analytics Cloud Computing Center
Click here to blog (archive) this computation