Home » date » 2010 » Mar » 14 »

*Unverified author*
R Software Module: /rwasp_centraltendency.wasp (opens new window with default values)
Title produced by software: Central Tendency
Date of computation: Sun, 14 Mar 2010 13:18:42 -0600
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2010/Mar/14/t12685943537src6l5dacjytq0.htm/, Retrieved Sun, 14 Mar 2010 20:19:15 +0100
 
BibTeX entries for LaTeX users:
@Manual{KEY,
    author = {{YOUR NAME}},
    publisher = {Office for Research Development and Education},
    title = {Statistical Computations at FreeStatistics.org, URL http://www.freestatistics.org/blog/date/2010/Mar/14/t12685943537src6l5dacjytq0.htm/},
    year = {2010},
}
@Manual{R,
    title = {R: A Language and Environment for Statistical Computing},
    author = {{R Development Core Team}},
    organization = {R Foundation for Statistical Computing},
    address = {Vienna, Austria},
    year = {2010},
    note = {{ISBN} 3-900051-07-0},
    url = {http://www.R-project.org},
}
 
Original text written by user:
 
IsPrivate?
No (this computation is public)
 
User-defined keywords:
KDGP1W52
 
Dataseries X:
» Textbox « » Textfile « » CSV «
1772,2 1769,5 1768 1794,8 1823,4 1856,9 1866,9 1869,8 1843,8 1837,1 1857,7 1840,3 1914,6 1972,9 2050,1 2086,2 2112,5 2147,6 2190,4 2194,1 2216,2 2218,6 2233,5 2307,2 2350,4 2368,2 2353,8 2316,5 2305,5 2308,4 2334,4 2381,2 2449,7 2490,3 2523,5 2537,6 2526,1 2545,9 2542,7 2584,3 2600,2 2593,9 2618,9 2591,3 2521,2 2536,6 2596,1 2656,6 2710,3 2778,8 2775,5 2785,2 2847,7 2834,4 2839 2802,6 2819,3 2872 2918,4 2977,8 3031,2 3064,7 3093 3100,6 3141,1 3180,4 3240,3 3265 3338,2 3376,6 3422,5 3432 3516,3 3564 3636,3 3724 3815,4 3828,1 3853,3 3884,5 3918,7 3919,6 3950,8 3981 4063 4132 4160,3 4178,3 4244,1 4256,5 4283,4 4263,3 4256,6 4264,3 4302,3 4256,6 4374 4398,8 4433,9 4446,3 4525,8 4633,1 4677,5 4754,5 4876,2 4932,6 4906,3 4953,1 4909,6 4922,2 4873,5 4854,3 4795,3 4831,9 4913,3 4977,5 5090,7 5128,9 5154,1 5191,5 5251,8 5356,1 5451,9 5450,8 5469,4 5684,6 5740,3 5816,2 5825,9 5831,4 5873,3 etc...
 
Output produced by software:


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time2 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Central Tendency - Ungrouped Data
MeasureValueS.E.Value/S.E.
Arithmetic Mean6294.4992063492221.55960997328628.4099579662022
Geometric Mean5314.97711188863
Harmonic Mean4444.25901070799
Quadratic Mean7207.07805649286
Winsorized Mean ( 1 / 84 )6294.40952380952221.54690021761528.4111829938799
Winsorized Mean ( 2 / 84 )6294.2380952381221.52058473449528.4137842213720
Winsorized Mean ( 3 / 84 )6294.00357142857221.43487700403228.4237228416098
Winsorized Mean ( 4 / 84 )6294.40198412698221.39121368607128.4311282246835
Winsorized Mean ( 5 / 84 )6292.3503968254221.07777045472028.4621578365075
Winsorized Mean ( 6 / 84 )6291.25992063492220.92679351708228.4766723876273
Winsorized Mean ( 7 / 84 )6290.99325396825220.87398803046028.4822731280638
Winsorized Mean ( 8 / 84 )6290.0757936508220.67631965264128.5036283165851
Winsorized Mean ( 9 / 84 )6288.70436507936220.50232169275828.5199009098955
Winsorized Mean ( 10 / 84 )6285.58928571429220.04950575554328.5644326449752
Winsorized Mean ( 11 / 84 )6285.40595238095220.00187188329828.5697839685433
Winsorized Mean ( 12 / 84 )6287.37738095238219.81245032350728.6033724281722
Winsorized Mean ( 13 / 84 )6288.47103174603219.34425545224828.6694129225329
Winsorized Mean ( 14 / 84 )6292.23214285714218.94700750542428.7386076409437
Winsorized Mean ( 15 / 84 )6293.52380952381218.67846591678628.7798059271126
Winsorized Mean ( 16 / 84 )6285.49206349206217.39203121464928.9131668183637
Winsorized Mean ( 17 / 84 )6283.44126984127216.68980175110128.9974019038454
Winsorized Mean ( 18 / 84 )6279.6626984127215.65762671769629.1186673710039
Winsorized Mean ( 19 / 84 )6275.91547619047215.16868703091329.1674200497809
Winsorized Mean ( 20 / 84 )6267.84404761905213.90489648833529.3020129530362
Winsorized Mean ( 21 / 84 )6259.14404761905212.87727630561529.4025936269176
Winsorized Mean ( 22 / 84 )6252.61388888889211.8971565788229.507776271472
Winsorized Mean ( 23 / 84 )6251.31785714286210.52514356861229.6939251586616
Winsorized Mean ( 24 / 84 )6243.40357142857209.61887929553829.7845479968725
Winsorized Mean ( 25 / 84 )6232.87777777778208.44315490598529.9020506602340
Winsorized Mean ( 26 / 84 )6213.40873015873206.18976677915430.1344185369481
Winsorized Mean ( 27 / 84 )6205.37301587302204.98783807706730.2719081975003
Winsorized Mean ( 28 / 84 )6201.92857142857204.30330336595430.3564772044801
Winsorized Mean ( 29 / 84 )6202.04365079365204.24485986727330.3657269750828
Winsorized Mean ( 30 / 84 )6196.90079365079203.39671502131530.4670642935476
Winsorized Mean ( 31 / 84 )6191.00833333333202.49522382309330.5736017692053
Winsorized Mean ( 32 / 84 )6187.2876984127200.55982332096330.8500855054651
Winsorized Mean ( 33 / 84 )6191.45198412698200.0476274951630.9498895920512
Winsorized Mean ( 34 / 84 )6191.41150793651199.30729226362131.0646511606169
Winsorized Mean ( 35 / 84 )6190.95317460317199.20382898428431.0784848171347
Winsorized Mean ( 36 / 84 )6185.99603174603198.62935489420531.1434129917042
Winsorized Mean ( 37 / 84 )6183.23571428571198.07572375106531.2165246562805
Winsorized Mean ( 38 / 84 )6181.96904761905197.91975464499631.2347246928812
Winsorized Mean ( 39 / 84 )6149.40714285714194.48564178375331.6188233046767
Winsorized Mean ( 40 / 84 )6145.35952380952193.99199927822231.6784173918219
Winsorized Mean ( 41 / 84 )6119.97857142857190.39306987181132.1439145634296
Winsorized Mean ( 42 / 84 )6098.49523809524188.09273583272532.4228110729314
Winsorized Mean ( 43 / 84 )6084.81031746032186.69271592086932.5926498387833
Winsorized Mean ( 44 / 84 )6068.85158730159185.09574610345732.7876340491881
Winsorized Mean ( 45 / 84 )6037.65515873016182.01590231729233.1710311124644
Winsorized Mean ( 46 / 84 )6016.51706349206179.46711601393333.5243424930558
Winsorized Mean ( 47 / 84 )6006.59484126984177.37114443466833.8645548035142
Winsorized Mean ( 48 / 84 )5998.82341269841174.95320732210234.2881591284814
Winsorized Mean ( 49 / 84 )5996.68452380952172.6579372228734.7315890613757
Winsorized Mean ( 50 / 84 )5972.91468253968170.40443991457235.0514029184571
Winsorized Mean ( 51 / 84 )5945.18849206349167.72310139008135.4464497901008
Winsorized Mean ( 52 / 84 )5933.57103174603166.11412480193635.7198464538813
Winsorized Mean ( 53 / 84 )5915.29444444444163.94792737204136.0803246449166
Winsorized Mean ( 54 / 84 )5901.00158730159162.18837295253836.3836289857129
Winsorized Mean ( 55 / 84 )5867.10674603175159.13277629794936.8692539810062
Winsorized Mean ( 56 / 84 )5855.0623015873157.80722584791637.1026248647830
Winsorized Mean ( 57 / 84 )5846.17301587302156.18466824673037.4311581379911
Winsorized Mean ( 58 / 84 )5839.36031746032153.91962225918537.9377251045187
Winsorized Mean ( 59 / 84 )5848.7253968254152.49542005129138.3534495321776
Winsorized Mean ( 60 / 84 )5856.17777777778151.10844938922538.7548002871332
Winsorized Mean ( 61 / 84 )5840.34682539682148.52752991289739.3216451443167
Winsorized Mean ( 62 / 84 )5833.28571428571146.85989718847639.7200721637401
Winsorized Mean ( 63 / 84 )5805.33571428571144.29348093718240.2328343358287
Winsorized Mean ( 64 / 84 )5794.2626984127141.80928493006440.8595438674574
Winsorized Mean ( 65 / 84 )5775.33015873016138.73985536767941.6270446831935
Winsorized Mean ( 66 / 84 )5779.31111111111136.64942476118342.2929779705358
Winsorized Mean ( 67 / 84 )5771.54761904762135.03545157948742.7409806205615
Winsorized Mean ( 68 / 84 )5787.11746031746133.25329365803143.4294515463833
Winsorized Mean ( 69 / 84 )5773.64603174603130.60590438877444.2066234200227
Winsorized Mean ( 70 / 84 )5762.75714285714127.83917860414145.0781771736954
Winsorized Mean ( 71 / 84 )5741.00634920635125.76402278305545.6490355680627
Winsorized Mean ( 72 / 84 )5739.77777777778122.07794011962947.0173216565837
Winsorized Mean ( 73 / 84 )5750.87261904762120.87147181378147.5784114543391
Winsorized Mean ( 74 / 84 )5772.0742063492119.3471486062948.3637378333226
Winsorized Mean ( 75 / 84 )5791.62777777778116.99734576143649.5022151150953
Winsorized Mean ( 76 / 84 )5816.2373015873114.84376437075250.6447810506336
Winsorized Mean ( 77 / 84 )5812.81507936508114.01484124145750.9829686738315
Winsorized Mean ( 78 / 84 )5816.00317460317113.12176073090951.4136549592623
Winsorized Mean ( 79 / 84 )5813.65198412698111.51940266813352.131304912273
Winsorized Mean ( 80 / 84 )5822.7630952381110.63971276921952.6281472492942
Winsorized Mean ( 81 / 84 )5817.49166666667110.19533042987952.7925425149347
Winsorized Mean ( 82 / 84 )5807.33928571429107.95376412660153.7946900943983
Winsorized Mean ( 83 / 84 )5798.05119047619105.81506892934554.7941918777908
Winsorized Mean ( 84 / 84 )5801.18452380952102.12574417351656.8043304923494
Trimmed Mean ( 1 / 84 )6284.122220.75933398684028.4659402006287
Trimmed Mean ( 2 / 84 )6273.6685483871219.92668071104328.5261821262602
Trimmed Mean ( 3 / 84 )6263.13292682927219.06062642072328.5908655935295
Trimmed Mean ( 4 / 84 )6252.50532786885218.17629270189828.6580418543085
Trimmed Mean ( 5 / 84 )6241.59834710744217.25336270868828.7295822227466
Trimmed Mean ( 6 / 84 )6230.94041666667216.34885299783628.8004319427984
Trimmed Mean ( 7 / 84 )6220.29579831933215.42115361481728.8750463635596
Trimmed Mean ( 8 / 84 )6209.51144067797214.44846572255828.9557279869351
Trimmed Mean ( 9 / 84 )6198.66623931624213.44917344387629.0404790016491
Trimmed Mean ( 10 / 84 )6187.79956896552212.41567072057929.1306170960674
Trimmed Mean ( 11 / 84 )6177.0852173913211.37923826898029.222762216273
Trimmed Mean ( 12 / 84 )6166.20131578947210.28735022067629.3227400950111
Trimmed Mean ( 13 / 84 )6154.94159292035209.15128926205829.4281790690206
Trimmed Mean ( 14 / 84 )6143.38616071429207.99585633311029.5360987907159
Trimmed Mean ( 15 / 84 )6131.31756756757206.80915050946829.6472257270205
Trimmed Mean ( 16 / 84 )6118.93090909091205.57560518523929.7648687624064
Trimmed Mean ( 17 / 84 )6106.89724770642204.38446337589629.8794592643514
Trimmed Mean ( 18 / 84 )6094.78148148148203.18090921231929.9968215769356
Trimmed Mean ( 19 / 84 )6082.68644859813201.98911927379730.113931237816
Trimmed Mean ( 20 / 84 )6070.59764150943200.76280471885330.2376610548485
Trimmed Mean ( 21 / 84 )6058.76285714286199.55961542185930.3606661314462
Trimmed Mean ( 22 / 84 )6047.20240384615198.35968750202530.4860452242062
Trimmed Mean ( 23 / 84 )6035.78058252427197.15641322064830.6141732035331
Trimmed Mean ( 24 / 84 )6024.20441176471195.97360938488930.7398757958948
Trimmed Mean ( 25 / 84 )6012.8103960396194.77872326969830.8699548652141
Trimmed Mean ( 26 / 84 )6001.719193.58841339864831.0024701098248
Trimmed Mean ( 27 / 84 )5991.35656565657192.47552791721331.1278874280244
Trimmed Mean ( 28 / 84 )5981.16530612245191.36802574476431.2547787585989
Trimmed Mean ( 29 / 84 )5970.92371134021190.22936475047231.3880231854446
Trimmed Mean ( 30 / 84 )5960.46354166667189.01518297706931.5343108833208
Trimmed Mean ( 31 / 84 )5950.01052631579187.77211993465631.6874013479017
Trimmed Mean ( 32 / 84 )5939.58989361702186.50067605335431.8475515440911
Trimmed Mean ( 33 / 84 )5929.10268817204185.26156003321832.0039553111230
Trimmed Mean ( 34 / 84 )5918.21467391304183.96374416598832.1705491521913
Trimmed Mean ( 35 / 84 )5907.08901098901182.61776596236732.3467378973758
Trimmed Mean ( 36 / 84 )5895.73444444444181.180201434632.5407213247448
Trimmed Mean ( 37 / 84 )5884.31966292135179.67476026158532.7498400685465
Trimmed Mean ( 38 / 84 )5872.75227272727178.09372056635032.9756279674068
Trimmed Mean ( 39 / 84 )5860.96724137931176.40552555967833.2243971541388
Trimmed Mean ( 40 / 84 )5850.13139534884174.81672862665933.4643683205081
Trimmed Mean ( 41 / 84 )5839.19058823529173.13974968550833.7253033970629
Trimmed Mean ( 42 / 84 )5828.91785714286171.56652729463133.9746799626763
Trimmed Mean ( 43 / 84 )5819.17409638554170.02036516320834.2263357145453
Trimmed Mean ( 44 / 84 )5809.68170731707168.44383315179934.4903199993167
Trimmed Mean ( 45 / 84 )5800.51913580247166.84653026847334.7655964224658
Trimmed Mean ( 46 / 84 )5792.219375165.32155940328935.0360799638378
Trimmed Mean ( 47 / 84 )5784.44240506329163.83598541573435.306299714225
Trimmed Mean ( 48 / 84 )5776.80705128205162.35988078472535.5802617208224
Trimmed Mean ( 49 / 84 )5769.23831168831160.91153091399835.8534797283843
Trimmed Mean ( 50 / 84 )5761.5427631579159.48211687412136.1265756693302
Trimmed Mean ( 51 / 84 )5754.44066666667158.07604475352636.4029899384126
Trimmed Mean ( 52 / 84 )5748.0722972973156.72084866697136.6771386588893
Trimmed Mean ( 53 / 84 )5741.91506849315155.34826599029136.961565241108
Trimmed Mean ( 54 / 84 )5736.19027777778153.99230810667537.2498493483463
Trimmed Mean ( 55 / 84 )5730.77394366197152.62674561116837.5476389849896
Trimmed Mean ( 56 / 84 )5726.31214285714151.33536501248237.8385590333418
Trimmed Mean ( 57 / 84 )5722.11376811594150.00864633281238.1452263452917
Trimmed Mean ( 58 / 84 )5718.08088235294148.66110750661138.4638657565405
Trimmed Mean ( 59 / 84 )5714.14850746269147.33094901814538.7844410529043
Trimmed Mean ( 60 / 84 )5709.79393939394145.96068414451639.118711815167
Trimmed Mean ( 61 / 84 )5705.06461538462144.54367279096539.4694870085051
Trimmed Mean ( 62 / 84 )5700.6984375143.16025326153939.8203992213217
Trimmed Mean ( 63 / 84 )5696.42142857143141.74892089892340.1867004873595
Trimmed Mean ( 64 / 84 )5692.90806451613140.37229782937140.5557802539937
Trimmed Mean ( 65 / 84 )5689.6368852459139.02286432176640.925907497326
Trimmed Mean ( 66 / 84 )5686.86833333333137.74375871814741.2858512520331
Trimmed Mean ( 67 / 84 )5683.87711864407136.46772416359341.6499736731186
Trimmed Mean ( 68 / 84 )5681.03448275862135.16284182330042.031037570115
Trimmed Mean ( 69 / 84 )5677.58596491228133.83289457976842.4229482799407
Trimmed Mean ( 70 / 84 )5674.45357142857132.54418411657442.8117884556732
Trimmed Mean ( 71 / 84 )5671.56363636364131.30783843030843.1928794515481
Trimmed Mean ( 72 / 84 )5669.28148148148130.07838357133243.5835788071012
Trimmed Mean ( 73 / 84 )5666.9537735849128.97321597435743.9389971845907
Trimmed Mean ( 74 / 84 )5664.16826923077127.81171136084044.3165044026335
Trimmed Mean ( 75 / 84 )5660.56568627451126.60856349708844.7091849865646
Trimmed Mean ( 76 / 84 )5656.162125.42300903548445.0966855563143
Trimmed Mean ( 77 / 84 )5650.74591836735124.23582822378845.4840282320858
Trimmed Mean ( 78 / 84 )5645.22083333333122.9475866603645.915670137781
Trimmed Mean ( 79 / 84 )5639.35106382979121.54719409726646.3963903544905
Trimmed Mean ( 80 / 84 )5633.30760869565120.08566104897546.9107432102006
Trimmed Mean ( 81 / 84 )5626.67666666667118.48113214466747.4900649986734
Trimmed Mean ( 82 / 84 )5619.93068181818116.68037901605448.1651733497105
Trimmed Mean ( 83 / 84 )5613.23372093023114.83704825301448.8799895706386
Trimmed Mean ( 84 / 84 )5606.55357142857112.93443074067249.6443248941747
Median5712.45
Midrange7591.65
Midmean - Weighted Average at Xnp5675.92204724409
Midmean - Weighted Average at X(n+1)p5696.42142857143
Midmean - Empirical Distribution Function5675.92204724409
Midmean - Empirical Distribution Function - Averaging5696.42142857143
Midmean - Empirical Distribution Function - Interpolation5696.42142857143
Midmean - Closest Observation5675.92204724409
Midmean - True Basic - Statistics Graphics Toolkit5696.42142857143
Midmean - MS Excel (old versions)5700.6984375
Number of observations252
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Mar/14/t12685943537src6l5dacjytq0/1c52c1268594319.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Mar/14/t12685943537src6l5dacjytq0/1c52c1268594319.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Mar/14/t12685943537src6l5dacjytq0/2257t1268594319.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Mar/14/t12685943537src6l5dacjytq0/2257t1268594319.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