Home » date » 2009 » Mar » 10 »

Central Tendency - Fortis - Caroline Thys

*Unverified author*
R Software Module: rwasp_centraltendency.wasp (opens new window with default values)
Title produced by software: Central Tendency
Date of computation: Tue, 10 Mar 2009 16:03:25 -0600
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2009/Mar/10/t1236722650rzh9bz0wholptrm.htm/, Retrieved Tue, 10 Mar 2009 23:04:12 +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/2009/Mar/10/t1236722650rzh9bz0wholptrm.htm/},
    year = {2009},
}
@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 = {2009},
    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:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
18,09 18,13 18 17,72 17,62 17,13 17,39 17,09 17,14 17,38 16,8 16,51 16,01 15,05 13,56 15,22 14,91 15,13 15,25 14,61 14,87 15,1 15,22 15,46 14,96 14 14,2 13,9 13,63 13,32 13,8 14,5 14,12 13,88 14,11 14,26 14,71 14,52 14,32 14,69 15,25 15,04 14,82 14,5 14,72 14,6 14,58 14 14,75 14,41 15,19 14,96 14,83 14,25 14,32 14,93 14,65 15,65 15,65 15,61 15,95 15,83 15,77 16,7 16,69 16,4 16,77 16,78 16,84 16,68 16,67 16,3 16,37 16,6 16,72 16,82 17,5 17,2 17,29 17,2 17,2 17,32 17,16 17,41 17,31 17,3 17,34 17,19 17,05 17,07 17,07 16,81 16,81 16,96 17,05 17 16,77 16,66 16,2 16,26 15,84 15,85 15,71 15,84 15,73 15,77 15,3 15,41 15,4 15,61 15 14,12 14,01 13,46 13,85 13,92 13,59 13,67 13,05 12,87 12,28 11,88 12,49 11,9 10,8 10,99 10,15 10,07 10,05 10,31 9,94 9,65 9,74 9,85 9,96 9,63 9,43 8,77 9,53 9,5 9,78 9,9 9,93 10,35 9,79 9,63 9,02 9,25 9,11 8,95 9,3 9,13 9,75 9,65 9,27 9,5 etc...
 
Output produced by software:


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time8 seconds
R Server'George Udny Yule' @ 72.249.76.132
R Framework
error message
Warning: there are blank lines in the 'Data' field.
Please, use NA for missing data - blank lines are simply
 deleted and are NOT treated as missing values.


Central Tendency - Ungrouped Data
MeasureValueS.E.Value/S.E.
Arithmetic Mean9.700549450549450.376310394850825.7780533923214
Geometric Mean6.12726763930763
Harmonic Mean2.80594451629474
Quadratic Mean11.5160083037808
Winsorized Mean ( 1 / 91 )9.700439560439560.37629509086776925.7788097582393
Winsorized Mean ( 2 / 91 )9.699926739926740.3762282871740325.7820240279804
Winsorized Mean ( 3 / 91 )9.696849816849820.375982808411525.7906734029098
Winsorized Mean ( 4 / 91 )9.695677655677660.37584250505688625.7971823974783
Winsorized Mean ( 5 / 91 )9.693479853479850.37567337004323625.8029464594848
Winsorized Mean ( 6 / 91 )9.691721611721610.37550356713740325.8099322081147
Winsorized Mean ( 7 / 91 )9.69146520146520.37544212272701725.8134732753784
Winsorized Mean ( 8 / 91 )9.691758241758240.3753681478832825.8193410826426
Winsorized Mean ( 9 / 91 )9.69109890109890.37521081250899425.8284105308575
Winsorized Mean ( 10 / 91 )9.69073260073260.37512364286229625.8334359487172
Winsorized Mean ( 11 / 91 )9.691135531135530.37502251149814725.8414768020757
Winsorized Mean ( 12 / 91 )9.691135531135530.37495101576189425.8464042601493
Winsorized Mean ( 13 / 91 )9.691135531135530.37487364006234525.8517390807308
Winsorized Mean ( 14 / 91 )9.687545787545790.37444137188377825.8719962989364
Winsorized Mean ( 15 / 91 )9.688644688644690.37434502879507625.8815903601820
Winsorized Mean ( 16 / 91 )9.689230769230770.37429371717550125.8867042769185
Winsorized Mean ( 17 / 91 )9.692344322344320.37392171518927625.9207848290869
Winsorized Mean ( 18 / 91 )9.69036630036630.37377614272707325.9255880529595
Winsorized Mean ( 19 / 91 )9.689670329670330.37361342214107625.9350166654653
Winsorized Mean ( 20 / 91 )9.688937728937730.37355974214520525.9367823558771
Winsorized Mean ( 21 / 91 )9.686630036630040.37326799799228525.9508719974174
Winsorized Mean ( 22 / 91 )9.686630036630040.373010583402325.9687806932352
Winsorized Mean ( 23 / 91 )9.687472527472530.37293748606104825.9761297524453
Winsorized Mean ( 24 / 91 )9.68659340659340.37273343849097825.9879914337974
Winsorized Mean ( 25 / 91 )9.68659340659340.37273343849097825.9879914337974
Winsorized Mean ( 26 / 91 )9.683736263736260.37222347813034026.0159200928894
Winsorized Mean ( 27 / 91 )9.679780219780220.37193819693480426.025238331402
Winsorized Mean ( 28 / 91 )9.668498168498170.3709691588830526.0628085569405
Winsorized Mean ( 29 / 91 )9.666373626373630.37081831925179226.0676809222308
Winsorized Mean ( 30 / 91 )9.666373626373630.37064526575840326.0798518675116
Winsorized Mean ( 31 / 91 )9.666373626373630.37064526575840326.0798518675116
Winsorized Mean ( 32 / 91 )9.666373626373630.37046081891509926.0928366316356
Winsorized Mean ( 33 / 91 )9.663956043956040.37028983897699526.0983560085116
Winsorized Mean ( 34 / 91 )9.663956043956040.37009416782048426.1121543764602
Winsorized Mean ( 35 / 91 )9.666520146520150.36987262089118926.1347274724719
Winsorized Mean ( 36 / 91 )9.661245421245420.36929433311079126.1613692792491
Winsorized Mean ( 37 / 91 )9.65853479853480.36910403462933326.1675134714641
Winsorized Mean ( 38 / 91 )9.65853479853480.36888629823807226.1829589352255
Winsorized Mean ( 39 / 91 )9.657106227106230.36878623363299326.1861895764709
Winsorized Mean ( 40 / 91 )9.655641025641030.36868370002473226.1894980032839
Winsorized Mean ( 41 / 91 )9.655641025641030.36844909985456926.2061734699643
Winsorized Mean ( 42 / 91 )9.646410256410260.36780572744477226.2269169200437
Winsorized Mean ( 43 / 91 )9.63695970695970.36641652092045126.3005600368437
Winsorized Mean ( 44 / 91 )9.62084249084250.36506094116564726.3540724464331
Winsorized Mean ( 45 / 91 )9.615897435897440.36472380148909926.3648750003085
Winsorized Mean ( 46 / 91 )9.605787545787550.36377779227802926.4056458357030
Winsorized Mean ( 47 / 91 )9.59890109890110.36331275066157326.4204905592276
Winsorized Mean ( 48 / 91 )9.59010989010990.36245161236882426.4590073897952
Winsorized Mean ( 49 / 91 )9.561391941391940.35971900527219426.5801689687121
Winsorized Mean ( 50 / 91 )9.550402930402930.35899677617013526.6030325739661
Winsorized Mean ( 51 / 91 )9.531721611721610.35777815031563726.6414301804417
Winsorized Mean ( 52 / 91 )9.529816849816850.35765454035796526.6453120943991
Winsorized Mean ( 53 / 91 )9.533699633699630.35731824755939826.6812559918727
Winsorized Mean ( 54 / 91 )9.535677655677650.35684760931507826.7219883411301
Winsorized Mean ( 55 / 91 )9.52560439560440.35589150491213126.7654728031687
Winsorized Mean ( 56 / 91 )9.52560439560440.35589150491213126.7654728031687
Winsorized Mean ( 57 / 91 )9.517252747252750.35535372772844226.7824761768807
Winsorized Mean ( 58 / 91 )9.521501831501830.35434562289141826.8706630374252
Winsorized Mean ( 59 / 91 )9.53230769230770.3514633207363427.1217709783679
Winsorized Mean ( 60 / 91 )9.53230769230770.3514633207363427.1217709783679
Winsorized Mean ( 61 / 91 )9.534542124542120.34993070711409727.2469432682092
Winsorized Mean ( 62 / 91 )9.534542124542130.34993070711409727.2469432682092
Winsorized Mean ( 63 / 91 )9.502234432234430.34753647769934627.3416894109597
Winsorized Mean ( 64 / 91 )9.495201465201460.3463953304008327.4114591966761
Winsorized Mean ( 65 / 91 )9.495201465201460.34604085993452927.4395384030601
Winsorized Mean ( 66 / 91 )9.480695970695970.34369729851567127.5844355240508
Winsorized Mean ( 67 / 91 )9.473333333333330.34251222355590727.6583802907316
Winsorized Mean ( 68 / 91 )9.475824175824170.34229774254797927.6829876390317
Winsorized Mean ( 69 / 91 )9.470769230769230.34161042557294227.723888153838
Winsorized Mean ( 70 / 91 )9.478461538461540.34094835611492127.800285199987
Winsorized Mean ( 71 / 91 )9.470659340659340.34046590338646327.8167629899467
Winsorized Mean ( 72 / 91 )9.46010989010990.339036710691827.9029072421292
Winsorized Mean ( 73 / 91 )9.478827838827840.33624353981703128.1903641746866
Winsorized Mean ( 74 / 91 )9.467985347985350.33517915048028528.2475366812598
Winsorized Mean ( 75 / 91 )9.47073260073260.33453866836243528.3098293153727
Winsorized Mean ( 76 / 91 )9.529194139194140.32788862273042629.0622896880096
Winsorized Mean ( 77 / 91 )9.526373626373630.32647359373359629.1796145514519
Winsorized Mean ( 78 / 91 )10.10351648351650.27822620366790236.314036385934
Winsorized Mean ( 79 / 91 )10.37263736263740.25543182499473840.6082419951039
Winsorized Mean ( 80 / 91 )10.43710622710620.24954224991051841.8250065103156
Winsorized Mean ( 81 / 91 )10.58842490842490.2361874823286644.8305930696652
Winsorized Mean ( 82 / 91 )10.66652014652010.22857399888367846.6655008820509
Winsorized Mean ( 83 / 91 )10.84589743589740.21489061463809350.471713034855
Winsorized Mean ( 84 / 91 )10.84897435897440.21164322166191051.2606747987661
Winsorized Mean ( 85 / 91 )10.94549450549450.20341816692102053.8078514380884
Winsorized Mean ( 86 / 91 )11.10300366300370.19200105045223657.8278276960039
Winsorized Mean ( 87 / 91 )11.10300366300370.19112522254310358.0928226806888
Winsorized Mean ( 88 / 91 )11.13846153846150.18694792867551859.5805560263487
Winsorized Mean ( 89 / 91 )11.25582417582420.17736662883426263.460777541992
Winsorized Mean ( 90 / 91 )11.28549450549450.17499037889649064.49208566015
Winsorized Mean ( 91 / 91 )11.27882783882780.17452645571427964.6253187957514
Trimmed Mean ( 1 / 91 )9.703136531365310.37629883736924325.7857201983436
Trimmed Mean ( 2 / 91 )9.705873605947960.37628174336870225.7941656139229
Trimmed Mean ( 3 / 91 )9.70891385767790.3762777614302925.8025183863453
Trimmed Mean ( 4 / 91 )9.713056603773590.37633870491094925.8093480075932
Trimmed Mean ( 5 / 91 )9.717566539923950.37641717321488625.8159489826902
Trimmed Mean ( 6 / 91 )9.722605363984680.37651246869878625.8227978414252
Trimmed Mean ( 7 / 91 )9.728030888030890.37661916253853325.8298882681934
Trimmed Mean ( 8 / 91 )9.733579766536960.37671583190985425.8379896517494
Trimmed Mean ( 9 / 91 )9.739176470588240.37680253063190825.8468977218793
Trimmed Mean ( 10 / 91 )9.744940711462450.37688823444796425.8563144740670
Trimmed Mean ( 11 / 91 )9.750836653386450.37696253682847125.8668586417737
Trimmed Mean ( 12 / 91 )9.756787148594380.37702546726796925.8783238683974
Trimmed Mean ( 13 / 91 )9.762834008097170.37707247913911225.8911337957799
Trimmed Mean ( 14 / 91 )9.768979591836730.37710275061963025.9053522568717
Trimmed Mean ( 15 / 91 )9.775514403292180.37714641444462325.9196800735528
Trimmed Mean ( 16 / 91 )9.782074688796680.37717324538028725.9352295227988
Trimmed Mean ( 17 / 91 )9.78870292887030.37717816944291225.9524641718477
Trimmed Mean ( 18 / 91 )9.795232067510550.37718484393971125.9693151113893
Trimmed Mean ( 19 / 91 )9.8020.37717448014232225.9879724532300
Trimmed Mean ( 20 / 91 )9.80892703862660.37714690633114226.0082394259763
Trimmed Mean ( 21 / 91 )9.816017316017320.37709305302107326.0307561684749
Trimmed Mean ( 22 / 91 )9.823362445414850.3770271572987626.0547874476604
Trimmed Mean ( 23 / 91 )9.830837004405290.37694561334319926.0802531092319
Trimmed Mean ( 24 / 91 )9.83840.37683522945543526.1079623957067
Trimmed Mean ( 25 / 91 )9.846143497757850.37670218272358426.1377394380078
Trimmed Mean ( 26 / 91 )9.854027149321270.37653246767719526.1704580487046
Trimmed Mean ( 27 / 91 )9.862191780821920.37635395744555626.2045651061039
Trimmed Mean ( 28 / 91 )9.870691244239630.37615185208702426.241240577372
Trimmed Mean ( 29 / 91 )9.879860465116280.37596226162349126.2788621987026
Trimmed Mean ( 30 / 91 )9.889295774647890.37573913911597626.3195785190625
Trimmed Mean ( 31 / 91 )9.898909952606640.37548175777797426.3632247041411
Trimmed Mean ( 32 / 91 )9.908708133971290.37517842495536926.4106555038447
Trimmed Mean ( 33 / 91 )9.918695652173910.3748363852949226.4614003370295
Trimmed Mean ( 34 / 91 )9.92897560975610.3744520334033426.5160146668536
Trimmed Mean ( 35 / 91 )9.939458128078820.37402423540956326.5743692175319
Trimmed Mean ( 36 / 91 )9.950049751243780.37355186055611826.6363276478689
Trimmed Mean ( 37 / 91 )9.96105527638190.37304926617942126.7017152409866
Trimmed Mean ( 38 / 91 )9.972385786802030.37249423806064726.7719195838363
Trimmed Mean ( 39 / 91 )9.983948717948720.3718851412378826.8468610623042
Trimmed Mean ( 40 / 91 )9.995803108808290.37121211929836426.9274697380613
Trimmed Mean ( 41 / 91 )10.00795811518320.37047113895958127.0141370345049
Trimmed Mean ( 42 / 91 )10.02037037037040.36966472855951427.1066444705642
Trimmed Mean ( 43 / 91 )10.03336898395720.36880740222374527.2049013210160
Trimmed Mean ( 44 / 91 )10.04697297297300.36793272743437627.3065487895880
Trimmed Mean ( 45 / 91 )10.06142076502730.36703481695154427.4127148170677
Trimmed Mean ( 46 / 91 )10.07635359116020.36606173073837927.5263780533281
Trimmed Mean ( 47 / 91 )10.09195530726260.3650374827435527.6463535509105
Trimmed Mean ( 48 / 91 )10.10813559322030.3639340330036927.7746368202884
Trimmed Mean ( 49 / 91 )10.12497142857140.36276493290701727.9105572510412
Trimmed Mean ( 50 / 91 )10.14312138728320.36161383958033728.0495940062875
Trimmed Mean ( 51 / 91 )10.16204678362570.36038198705722328.1979875481739
Trimmed Mean ( 52 / 91 )10.18201183431950.35908540191103228.3554045364457
Trimmed Mean ( 53 / 91 )10.20251497005990.35766744187807228.5251431231415
Trimmed Mean ( 54 / 91 )10.22339393939390.35613197202742928.7067568833908
Trimmed Mean ( 55 / 91 )10.24472392638040.35447620033356228.9010204824473
Trimmed Mean ( 56 / 91 )10.26689440993790.35271139465496129.1084851964634
Trimmed Mean ( 57 / 91 )10.28962264150940.35078115072748129.3334536937629
Trimmed Mean ( 58 / 91 )10.31318471337580.34869742024940329.5763149208256
Trimmed Mean ( 59 / 91 )10.33722580645160.34647859912575929.8351062158953
Trimmed Mean ( 60 / 91 )10.36156862745100.34422006581856230.1015822619491
Trimmed Mean ( 61 / 91 )10.38655629139070.34175048727518530.3922208691022
Trimmed Mean ( 62 / 91 )10.41214765100670.33913984039317030.7016351689491
Trimmed Mean ( 63 / 91 )10.43843537414970.33628508608735731.0404350534833
Trimmed Mean ( 64 / 91 )10.46641379310340.33328589713997131.4037103967464
Trimmed Mean ( 65 / 91 )10.49538461538460.33006672631732231.7977662652809
Trimmed Mean ( 66 / 91 )10.52517730496450.32656212689743732.2302448387414
Trimmed Mean ( 67 / 91 )10.55625899280580.3228575311778232.6963380853944
Trimmed Mean ( 68 / 91 )10.58846715328470.31886248030994333.2070024136812
Trimmed Mean ( 69 / 91 )10.62155555555560.31448976579200833.7739306994818
Trimmed Mean ( 70 / 91 )10.65578947368420.30972295976925734.4042607678254
Trimmed Mean ( 71 / 91 )10.69083969465650.30452604681777735.1064869700741
Trimmed Mean ( 72 / 91 )10.72720930232560.29881988853523135.8985787556134
Trimmed Mean ( 73 / 91 )10.76503937007870.29260693954956536.7901027455135
Trimmed Mean ( 74 / 91 )10.803520.28595777391866137.7801234495307
Trimmed Mean ( 75 / 91 )10.84357723577240.27864127239925738.9159048205713
Trimmed Mean ( 76 / 91 )10.88487603305790.27053945994963740.2339682169993
Trimmed Mean ( 77 / 91 )10.92579831932770.26213335150710041.680306059917
Trimmed Mean ( 78 / 91 )10.96820512820510.25281657167250843.3840434416343
Trimmed Mean ( 79 / 91 )10.99452173913040.24736624084289644.4463306782155
Trimmed Mean ( 80 / 91 )11.01353982300890.24337806871046345.2528031032706
Trimmed Mean ( 81 / 91 )11.03126126126130.23944602722279346.0699281136839
Trimmed Mean ( 82 / 91 )11.04495412844040.23621964731580346.7571358011315
Trimmed Mean ( 83 / 91 )11.05672897196260.23325254490309947.4023937297487
Trimmed Mean ( 84 / 91 )11.06333333333330.23106936729703647.8788402926278
Trimmed Mean ( 85 / 91 )11.07009708737860.22885388443629448.3718994529901
Trimmed Mean ( 86 / 91 )11.07405940594060.22701586188825648.780994040811
Trimmed Mean ( 87 / 91 )11.07313131313130.22581653512043849.0359632310606
Trimmed Mean ( 88 / 91 )11.07216494845360.2244793626431349.3237543891987
Trimmed Mean ( 89 / 91 )11.070.22324793763288149.5861243663715
Trimmed Mean ( 90 / 91 )11.06387096774190.22253585642017749.7172507195959
Trimmed Mean ( 91 / 91 )11.05648351648350.22182533766555349.8431947983933
Median9.9
Midrange9.35
Midmean - Weighted Average at Xnp10.5541911764706
Midmean - Weighted Average at X(n+1)p10.6222463768116
Midmean - Empirical Distribution Function10.6222463768116
Midmean - Empirical Distribution Function - Averaging10.6222463768116
Midmean - Empirical Distribution Function - Interpolation10.6222463768116
Midmean - Closest Observation10.5562589928058
Midmean - True Basic - Statistics Graphics Toolkit10.6222463768116
Midmean - MS Excel (old versions)10.6222463768116
Number of observations273
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Mar/10/t1236722650rzh9bz0wholptrm/139kr1236722596.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Mar/10/t1236722650rzh9bz0wholptrm/139kr1236722596.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Mar/10/t1236722650rzh9bz0wholptrm/2skkb1236722596.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Mar/10/t1236722650rzh9bz0wholptrm/2skkb1236722596.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