Home » date » 2008 » Apr » 20 » attachments

Nietje Vant Santfoort - jogging

R Software Module: rwasp_centraltendency.wasp (opens new window with default values)
Title produced by software: Central Tendency
Date of computation: Sun, 20 Apr 2008 12:49:12 -0600
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2008/Apr/20/t1208717637mtmbpxonlnb5fea.htm/, Retrieved Sun, 20 Apr 2008 20:53:57 +0200
 
User-defined keywords:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
71,42 71,47 71,64 71,55 71,62 71,65 71,65 71,65 71,6 71,7 71,73 71,83 71,83 71,87 71,91 71,99 72,1 72,12 72,12 72,12 72,25 72,59 72,72 72,76 72,76 72,91 73 73,16 73,16 73,11 73,11 73,33 73,51 73,66 73,65 73,65 73,65 73,65 73,71 73,73 73,85 73,77 73,77 73,78 73,88 74,3 74,53 74,71 74,71 74,78 74,9 74,65 74,65 74,53 74,53 74,53 74,65 74,85 74,96 74,96 74,96 75,19 74,98 75,54 75,61 75,59 75,58 75,44 75,37 75,22 75,33 75,33
 
Text written by user:
 
Output produced by software:


Summary of compuational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time3 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24


Central Tendency - Ungrouped Data
MeasureValueS.E.Value/S.E.
Arithmetic Mean73.51486111111110.158867519075477462.743180852373
Geometric Mean73.5026607561408
Harmonic Mean73.4904495270504
Quadratic Mean73.5270478482427
Winsorized Mean ( 1 / 24 )73.51527777777780.158688626846363463.267464334119
Winsorized Mean ( 2 / 24 )73.51722222222220.15824129054622464.589374672402
Winsorized Mean ( 3 / 24 )73.51763888888890.157576706245423466.551437966894
Winsorized Mean ( 4 / 24 )73.51319444444450.156402587640152470.02543598308
Winsorized Mean ( 5 / 24 )73.50972222222220.155334710070445473.234360748383
Winsorized Mean ( 6 / 24 )73.50722222222220.15463575028728475.3572319833
Winsorized Mean ( 7 / 24 )73.50722222222220.15463575028728475.3572319833
Winsorized Mean ( 8 / 24 )73.4950.152648244988161481.466393574982
Winsorized Mean ( 9 / 24 )73.49750.15099782227492486.745430448552
Winsorized Mean ( 10 / 24 )73.47250.14586994845507503.684965807954
Winsorized Mean ( 11 / 24 )73.48472222222220.142893879802682514.260808956234
Winsorized Mean ( 12 / 24 )73.48472222222220.142893879802682514.260808956234
Winsorized Mean ( 13 / 24 )73.49194444444440.141722805624749518.561173838421
Winsorized Mean ( 14 / 24 )73.48805555555560.138786045648334529.506084075374
Winsorized Mean ( 15 / 24 )73.49430555555560.134654956143332545.797255893984
Winsorized Mean ( 16 / 24 )73.50319444444440.12866304611731571.284425968176
Winsorized Mean ( 17 / 24 )73.49138888888890.125653270346652584.874461970954
Winsorized Mean ( 18 / 24 )73.49138888888890.125653270346652584.874461970954
Winsorized Mean ( 19 / 24 )73.47555555555560.123511463941277594.888548892021
Winsorized Mean ( 20 / 24 )73.51166666666670.117999761279300622.981486315618
Winsorized Mean ( 21 / 24 )73.61083333333330.103614404576202710.430500801628
Winsorized Mean ( 22 / 24 )73.61388888888890.0930319908032456791.275003934675
Winsorized Mean ( 23 / 24 )73.62666666666670.0913132324270442806.30884166204
Winsorized Mean ( 24 / 24 )73.62666666666670.0913132324270442806.30884166204
Trimmed Mean ( 1 / 24 )73.51485714285710.157781690370051465.927681281903
Trimmed Mean ( 2 / 24 )73.51441176470590.156618315834471469.385789095081
Trimmed Mean ( 3 / 24 )73.51287878787880.155422390882019472.987697401221
Trimmed Mean ( 4 / 24 )73.511093750.154191779998874476.751054761394
Trimmed Mean ( 5 / 24 )73.51048387096770.153027170922961480.375370122836
Trimmed Mean ( 6 / 24 )73.51066666666670.151832286798628484.157014404731
Trimmed Mean ( 7 / 24 )73.51137931034480.150453729630010488.597919713396
Trimmed Mean ( 8 / 24 )73.51214285714290.148655820187760494.51237606636
Trimmed Mean ( 9 / 24 )73.5150.146802336241376500.775409180989
Trimmed Mean ( 10 / 24 )73.51769230769230.144766055459557507.837918732483
Trimmed Mean ( 11 / 24 )73.52420.143202750515142513.427289179237
Trimmed Mean ( 12 / 24 )73.52958333333330.141717228669951518.847172100565
Trimmed Mean ( 13 / 24 )73.53543478260870.139655790286527526.547697247199
Trimmed Mean ( 14 / 24 )73.54090909090910.137110709030504536.361525740107
Trimmed Mean ( 15 / 24 )73.5473809523810.134301677991170547.628161110665
Trimmed Mean ( 16 / 24 )73.553750.131402048680513559.761059577058
Trimmed Mean ( 17 / 24 )73.55973684210530.128779414235671571.207263821592
Trimmed Mean ( 18 / 24 )73.56777777777780.125732842946521585.111861417698
Trimmed Mean ( 19 / 24 )73.57676470588240.121324920318284606.443956549576
Trimmed Mean ( 20 / 24 )73.588750.115514932354108637.049674014572
Trimmed Mean ( 21 / 24 )73.5980.108891383191386675.884517608202
Trimmed Mean ( 22 / 24 )73.59642857142860.104102633379968706.960296602742
Trimmed Mean ( 23 / 24 )73.59423076923080.100408662018194732.947031560834
Trimmed Mean ( 24 / 24 )73.590.0949942790039393774.678230853758
Median73.65
Midrange73.515
Midmean - Weighted Average at Xnp73.5597368421053
Midmean - Weighted Average at X(n+1)p73.5597368421053
Midmean - Empirical Distribution Function73.5597368421053
Midmean - Empirical Distribution Function - Averaging73.5597368421053
Midmean - Empirical Distribution Function - Interpolation73.5597368421053
Midmean - Closest Observation73.5597368421053
Midmean - True Basic - Statistics Graphics Toolkit73.5597368421053
Midmean - MS Excel (old versions)73.5597368421053
Number of observations72
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Apr/20/t1208717637mtmbpxonlnb5fea/1r4x41208717347.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Apr/20/t1208717637mtmbpxonlnb5fea/1r4x41208717347.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Apr/20/t1208717637mtmbpxonlnb5fea/2wvho1208717347.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Apr/20/t1208717637mtmbpxonlnb5fea/2wvho1208717347.ps (open in new window)


 
Parameters (Session):
 
Parameters (R input):
 
R code (references can be found in the software module):
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')
 





Copyright

Creative Commons License

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 License.

Software written by Ed van Stee & Patrick Wessa


Disclaimer

Information provided on this web site is provided "AS IS" without warranty of any kind, either express or implied, including, without limitation, warranties of merchantability, fitness for a particular purpose, and noninfringement. We use reasonable efforts to include accurate and timely information and periodically update the information, and software without notice. However, we make no warranties or representations as to the accuracy or completeness of such information (or software), and we assume no liability or responsibility for errors or omissions in the content of this web site, or any software bugs in online applications. Your use of this web site is AT YOUR OWN RISK. Under no circumstances and under no legal theory shall we be liable to you or any other person for any direct, indirect, special, incidental, exemplary, or consequential damages arising from your access to, or use of, this web site.


Privacy Policy

We may request personal information to be submitted to our servers in order to be able to:

  • personalize online software applications according to your needs
  • enforce strict security rules with respect to the data that you upload (e.g. statistical data)
  • manage user sessions of online applications
  • alert you about important changes or upgrades in resources or applications

We NEVER allow other companies to directly offer registered users information about their products and services. Banner references and hyperlinks of third parties NEVER contain any personal data of the visitor.

We do NOT sell, nor transmit by any means, personal information, nor statistical data series uploaded by you to third parties.

We carefully protect your data from loss, misuse, alteration, and destruction. However, at any time, and under any circumstance you are solely responsible for managing your passwords, and keeping them secret.

We store a unique ANONYMOUS USER ID in the form of a small 'Cookie' on your computer. This allows us to track your progress when using this website which is necessary to create state-dependent features. The cookie is used for NO OTHER PURPOSE. At any time you may opt to disallow cookies from this website - this will not affect other features of this website.

We examine cookies that are used by third-parties (banner and online ads) very closely: abuse from third-parties automatically results in termination of the advertising contract without refund. We have very good reason to believe that the cookies that are produced by third parties (banner ads) do NOT cause any privacy or security risk.

FreeStatistics.org is safe. There is no need to download any software to use the applications and services contained in this website. Hence, your system's security is not compromised by their use, and your personal data - other than data you submit in the account application form, and the user-agent information that is transmitted by your browser - is never transmitted to our servers.

As a general rule, we do not log on-line behavior of individuals (other than normal logging of webserver 'hits'). However, in cases of abuse, hacking, unauthorized access, Denial of Service attacks, illegal copying, hotlinking, non-compliance with international webstandards (such as robots.txt), or any other harmful behavior, our system engineers are empowered to log, track, identify, publish, and ban misbehaving individuals - even if this leads to ban entire blocks of IP addresses, or disclosing user's identity.


FreeStatistics.org is powered by