Send output to:
Browser Blue - Charts White
Browser Black/White
CSV
Data:
1 12.9 143.872 -148.717 2 7.4 133.848 -598.482 3 12.2 135.214 -132.144 4 12.8 139.656 -116.562 5 7.4 140.436 -664.356 6 6.7 135.876 -68.876 7 12.6 152.583 -265.834 8 14.8 137.093 109.069 9 13.3 146.604 -13.604 10 11.1 145.874 -348.738 11 8.2 151.127 -691.265 12 11.4 138.806 -24.806 13 6.4 140.663 -766.635 14 10.6 121.998 -159.978 15 12 150.341 -303.415 16 6.3 107.533 -445.331 17 11.3 116.782 -0.378153 18 11.9 145.643 -266.428 19 9.3 128.342 -35.342 20 9.6 137.864 -418.636 21 10 119.983 -199.827 22 6.4 127.359 -633.589 23 13.8 14.805 -100.504 24 10.8 145.009 -370.088 25 13.8 145.668 -0.766779 26 11.7 142.012 -250.124 27 10.9 150.139 -411.392 28 16.1 162.375 -0.137491 29 13.4 126.123 0.787701 30 9.9 137.611 -386.111 31 11.5 125.611 -106.114 32 8.3 119.026 -360.259 33 11.7 137.589 -205.888 34 6.1 12.943 -684.304 35 9 12.904 -390.405 36 9.7 14.772 -507.204 37 10.8 128.346 -203.459 38 10.3 131.225 -282.251 39 10.4 12.407 -200.703 40 12.7 128.973 -0.197251 41 9.3 152.456 -594.562 42 11.8 137.387 -193.865 43 5.9 133.107 -741.071 44 11.4 142.868 -288.683 45 13 142.506 -125.056 46 10.8 130.661 -226.609 47 12.3 114.538 0.846225 48 11.3 148.832 -358.321 49 11.8 13.147 -1.347 50 7.9 129.699 -506.989 51 12.7 117.706 0.929353 52 12.3 122.476 0.0523525 53 11.6 124.948 -0.894814 54 6.7 110.425 -434.246 55 10.9 13.09 -218.998 56 12.1 127.988 -0.698753 57 13.3 135.871 -0.287139 58 10.1 127.125 -261.249 59 5.7 121.721 -647.212 60 14.3 12.95 134.996 61 8 101.572 -21.572 62 13.3 130.243 0.275668 63 9.3 148.981 -559.815 64 12.5 133.998 -0.899793 65 7.6 117.978 -419.782 66 15.9 15.122 0.77795 67 9.2 142.057 -500.571 68 9.1 118.245 -272.451 69 11.1 149.214 -382.137 70 13 158.183 -281.827 71 14.5 14.314 0.18602 72 12.2 125.668 -0.366754 73 12.3 157.745 -347.445 74 11.4 127.784 -137.844 75 8.8 123.886 -358.862 76 14.6 143.273 0.272735 77 7.3 145.447 -724.472 78 12.6 124.361 0.163925 79 NA NA -0.925255 80 13 134.417 -0.441745 81 12.6 134.237 -0.823672 82 13.2 147.367 -153.668 83 9.9 151.307 -523.075 84 7.7 977.628 -207.628 85 10.5 878.813 171.187 86 13.4 147.683 -136.833 87 10.9 182.088 -73.088 88 4.3 705.706 -275.706 89 10.3 12.104 -180.405 90 11.8 129.616 -116.164 91 11.2 115.181 -0.318068 92 11.4 15.12 -372.002 93 8.6 772.997 0.87003 94 13.2 124.612 0.73883 95 12.6 190.829 -648.291 96 5.6 861.822 -301.822 97 9.9 130.231 -312.313 98 8.8 133.481 -454.813 99 7.7 106.379 -293.794 100 9 147.512 -575.124 101 7.3 786.817 -0.568166 102 11.4 974.484 165.516 103 13.6 185.401 -494.009 104 7.9 880.026 -0.900264 105 10.7 122.319 -153.187 106 10.3 130.075 -270.748 107 8.3 114.826 -318.264 108 9.6 772.627 187.373 109 14.2 181.251 -392.515 110 8.5 713.314 136.686 111 13.5 199.362 -643.617 112 4.9 942.525 -452.525 113 6.4 931.347 -291.347 114 9.6 103.246 -0.724639 115 11.6 12.349 -0.749004 116 11.1 186.042 -750.419 117 4.4 36.527 0.747298 118 12.7 791.255 478.745 119 18.1 137.015 439.855 120 17.9 165.283 137.174 121 16.6 154.732 112.684 122 12.6 11.498 110.205 123 17.1 134.616 363.841 124 19.1 197.166 -0.616571 125 16.1 137.326 236.735 126 13.4 945.741 394.259 127 18.4 141.727 422.733 128 14.7 168.765 -21.765 129 10.6 992.254 0.677463 130 12.6 938.103 321.897 131 16.2 17.358 -115.804 132 13.6 972.655 387.345 133 18.9 174.874 141.261 134 14.1 123.115 178.855 135 14.5 137.745 0.725477 136 16.2 139.235 227.654 137 14.8 129.362 186.377 138 14.8 140.282 0.771773 139 12.5 125.731 -0.0731446 140 12.7 801.864 468.136 141 17.4 192.213 -182.131 142 8.6 401.095 458.905 143 18.4 169.145 148.553 144 16.1 161.965 -0.0964733 145 11.6 673.041 486.959 146 17.8 159.173 188.265 147 15.3 101.096 519.037 148 17.7 149.175 278.245 149 15.6 129.369 266.313 150 16.4 132.499 315.006 151 17.7 177.621 -0.0620881 152 13.6 144.536 -0.853567 153 11.7 10.249 145.099 154 14.4 121.596 224.037 155 14.8 108.976 390.238 156 18.3 210.878 -278.781 157 9.9 804.132 185.868 158 16 118.067 419.332 159 18.3 151.648 313.517 160 16.9 142.604 263.962 161 14.6 133.033 129.668 162 13.9 104.245 347.547 163 19 160.921 290.794 164 15.6 150.577 0.542306 165 14.9 153.588 -0.458804 166 11.8 720.677 459.323 167 18.5 143.846 41.154 168 15.9 133.231 25.769 169 17.1 115.016 55.984 170 16.1 124.884 361.161 171 19.9 209.087 -100.871 172 11 600.959 499.041 173 18.5 154.593 304.068 174 15.1 132.848 181.519 175 15 16.06 -1.06 176 11.4 824.709 315.291 177 16 112.693 473.073 178 18.1 175.292 0.570781 179 14.6 13.027 157.297 180 15.4 137.224 167.759 181 15.4 103.278 507.219 182 17.6 179.341 -0.334132 183 13.4 760.665 579.335 184 19.1 173.105 178.946 185 15.4 189.818 -358.182 186 7.6 821.218 -0.612185 187 13.4 126.179 0.78207 188 13.9 886.506 503.494 189 19.1 161.111 298.885 190 15.3 151.872 0.112848 191 12.9 103.664 253.358 192 16.1 113.497 475.031 193 17.4 171.362 0.263829 194 13.2 138.741 -0.674072 195 12.2 107.964 140.364 196 12.6 141.533 -155.335 197 10.4 682.464 357.536 198 15.4 173.445 -194.452 199 9.6 39.068 56.932 200 18.2 167.654 143.458 201 13.6 123.838 121.625 202 14.9 137.234 117.659 203 14.8 125.257 227.425 204 14.1 113.509 274.908 205 14.9 11.765 313.501 206 16.3 151.108 118.923 207 19.3 181.467 115.331 208 13.6 127.637 0.83625 209 13.6 101.982 340.178 210 15.7 147.065 0.993508 211 12.8 100.343 276.566 212 14.6 158.321 -12.321 213 9.9 931.265 0.58735 214 12.7 122.523 0.447675 215 11.9 48.573 70.427 216 19.2 152.126 39.874 217 16.6 168.475 -0.247543 218 11.2 890.529 229.471 219 15.3 160.301 -0.730149 220 11.9 957.081 232.919 221 13.2 105.991 260.086 222 16.4 168.019 -0.401885 223 12.4 929.452 310.548 224 15.9 152.556 0.64438 225 14.4 961.431 478.569 226 18.2 186.393 -0.439271 227 11.2 926.606 193.394 228 15.7 108.115 488.852 229 17.8 204.104 -261.042 230 7.7 823.854 -0.53854 231 12.4 833.967 406.033 232 15.6 981.642 578.358 233 19.3 157.198 358.019 234 15.2 103.449 485.508 235 17.1 142.369 286.312 236 15.6 103.976 520.237 237 18.4 123.704 602.958 238 19.1 135.835 551.647 239 18.6 138.443 47.557 240 19.1 175.511 154.888 241 13.1 133.385 -0.238452 242 12.9 142.792 -137.921 243 9.5 166.004 -710.038 244 4.5 318.699 131.301 245 11.9 117.984 0.101569 246 13.6 14.662 -106.203 247 11.7 111.668 0.533218 248 12.4 117.621 0.637858 249 13.4 126.368 0.763205 250 11.4 936.706 203.294 251 14.9 107.377 41.623 252 19.9 151.105 478.954 253 17.8 195.104 -171.035 254 11.2 91.463 20.537 255 14.6 108.754 372.464 256 17.6 16.735 0.864958 257 14.1 108.948 320.521 258 16.1 151.926 0.907409 259 13.4 142.175 -0.817468 260 11.9 120.753 -0.17533 261 12 974.481 225.519 262 14.8 119.168 288.323 263 15.2 156.128 -0.41281 264 13.2 998.526 321.474 265 16.9 202.967 -339.674 266 7.9 116.799 -377.986 267 7.7 80.126 -0.312602 268 12.6 177.962 -519.623 269 7.9 981.176 -191.176 270 11 105.757 0.424307 271 12.4 156.523 -325.229 272 10 800.155 199.845 273 14.9 107.393 416.074 274 16.7 153.896 131.042 275 13.4 116.878 171.215 276 14 104.012 359.883 277 15.7 117.897 391.027 278 16.9 173.186 -0.418556 279 11 750.915 349.085 280 15.4 147.676 0.63238 281 12.2 866.561 353.439 282 15.1 10.599 450.101 283 17.8 154.829 231.706 284 15.2 140.528 114.716 285 14.6 107.188 388.117 286 16.7 193.941 -269.405 287 8 NA NA
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