Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_centraltendency.wasp
Title produced by softwareCentral Tendency
Date of computationMon, 13 Mar 2017 21:09:11 +0000
Cite this page as followsStatistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?v=date/2017/Mar/13/t1489439569ekz3tm2vy85190m.htm/, Retrieved Tue, 14 May 2024 03:54:19 +0200
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=, Retrieved Tue, 14 May 2024 03:54:19 +0200
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact0
Dataseries X:
95,2
95,34
95,32
96,04
99,65
100,85
108,18
108,18
103,14
99,71
99,39
98,99
98,83
99,52
99,5
99,5
99,39
101,79
106,03
105,41
104,32
101,17
99,79
100,08
100,27
101,63
101,74
103,73
103,29
105,71
107,42
107,57
105,13
103,61
102,35
102,14
104,32
104,69
106,02
104,78
106,36
109,27
113,46
113,46
110,61
104,37
103,82
104,1




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time2 seconds
R Server'Sir Maurice George Kendall' @ kendall.wessa.net

\begin{tabular}{lllllllll}
\hline
Summary of computational transaction \tabularnewline
Raw Input & view raw input (R code)  \tabularnewline
Raw Output & view raw output of R engine  \tabularnewline
Computing time & 2 seconds \tabularnewline
R Server & 'Sir Maurice George Kendall' @ kendall.wessa.net \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=&T=0

[TABLE]
[ROW][C]Summary of computational transaction[/C][/ROW]
[ROW][C]Raw Input[/C][C]view raw input (R code) [/C][/ROW]
[ROW][C]Raw Output[/C][C]view raw output of R engine [/C][/ROW]
[ROW][C]Computing time[/C][C]2 seconds[/C][/ROW]
[ROW][C]R Server[/C][C]'Sir Maurice George Kendall' @ kendall.wessa.net[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=&T=0

As an alternative you can also use a QR Code:  

The GUIDs for individual cells are displayed in the table below:

Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time2 seconds
R Server'Sir Maurice George Kendall' @ kendall.wessa.net







Central Tendency - Ungrouped Data
MeasureValueS.E.Value/S.E.
Arithmetic Mean103.0243750.616390481538597167.141411306088
Geometric Mean102.938371295127
Harmonic Mean102.85299640947
Quadratic Mean103.111002777347
Winsorized Mean ( 1 / 16 )103.0268750.615719981332614167.327483472304
Winsorized Mean ( 2 / 16 )102.9089583333330.577081050607411178.326698173533
Winsorized Mean ( 3 / 16 )102.8689583333330.542670720235908189.560546566092
Winsorized Mean ( 4 / 16 )103.0106250.46654897258111220.792737855813
Winsorized Mean ( 5 / 16 )103.0272916666670.463415352540412222.321705791312
Winsorized Mean ( 6 / 16 )103.0010416666670.436858571291189235.77662986498
Winsorized Mean ( 7 / 16 )102.9791666666670.432032434235763238.359804742045
Winsorized Mean ( 8 / 16 )102.8208333333330.392378502825914262.045021816478
Winsorized Mean ( 9 / 16 )102.7589583333330.38078251359286269.862597848191
Winsorized Mean ( 10 / 16 )102.7610416666670.379644084859405270.677315319485
Winsorized Mean ( 11 / 16 )102.7197916666670.361501926265349284.147287202195
Winsorized Mean ( 12 / 16 )102.6597916666670.345835596367457296.845647888682
Winsorized Mean ( 13 / 16 )102.6056250.329293234430987311.593480434849
Winsorized Mean ( 14 / 16 )102.5881250.297673552728143344.632984891644
Winsorized Mean ( 15 / 16 )102.6193750.282705458809346362.990426262711
Winsorized Mean ( 16 / 16 )102.7060416666670.232696904263555441.372617275307
Trimmed Mean ( 1 / 16 )102.9676086956520.576038040945802178.751404206897
Trimmed Mean ( 2 / 16 )102.9029545454550.523298064820994196.64310163397
Trimmed Mean ( 3 / 16 )102.8995238095240.48287129412265213.09927730636
Trimmed Mean ( 4 / 16 )102.911750.448550069740383229.432023184311
Trimmed Mean ( 5 / 16 )102.8805263157890.437742324252711235.025311960458
Trimmed Mean ( 6 / 16 )102.8413888888890.423645957453053242.753145827635
Trimmed Mean ( 7 / 16 )102.8038235294120.413475986259383248.633117631457
Trimmed Mean ( 8 / 16 )102.766250.40011509180928256.841724053201
Trimmed Mean ( 9 / 16 )102.7553333333330.394246475602388260.637290863104
Trimmed Mean ( 10 / 16 )102.7546428571430.388157526163229264.724077033437
Trimmed Mean ( 11 / 16 )102.7534615384620.377803751379222271.975757687282
Trimmed Mean ( 12 / 16 )102.7595833333330.3671390957663279.892783193932
Trimmed Mean ( 13 / 16 )102.7777272727270.354540084874422289.890287889819
Trimmed Mean ( 14 / 16 )102.80950.33870067129671303.540880525555
Trimmed Mean ( 15 / 16 )102.8516666666670.324530077561125316.924913214845
Trimmed Mean ( 16 / 16 )102.8981250.303787506257801338.717435313743
Median103.215
Midrange104.33
Midmean - Weighted Average at Xnp102.6352
Midmean - Weighted Average at X(n+1)p102.759583333333
Midmean - Empirical Distribution Function102.6352
Midmean - Empirical Distribution Function - Averaging102.759583333333
Midmean - Empirical Distribution Function - Interpolation102.759583333333
Midmean - Closest Observation102.6352
Midmean - True Basic - Statistics Graphics Toolkit102.759583333333
Midmean - MS Excel (old versions)102.753461538462
Number of observations48

\begin{tabular}{lllllllll}
\hline
Central Tendency - Ungrouped Data \tabularnewline
Measure & Value & S.E. & Value/S.E. \tabularnewline
Arithmetic Mean & 103.024375 & 0.616390481538597 & 167.141411306088 \tabularnewline
Geometric Mean & 102.938371295127 &  &  \tabularnewline
Harmonic Mean & 102.85299640947 &  &  \tabularnewline
Quadratic Mean & 103.111002777347 &  &  \tabularnewline
Winsorized Mean ( 1 / 16 ) & 103.026875 & 0.615719981332614 & 167.327483472304 \tabularnewline
Winsorized Mean ( 2 / 16 ) & 102.908958333333 & 0.577081050607411 & 178.326698173533 \tabularnewline
Winsorized Mean ( 3 / 16 ) & 102.868958333333 & 0.542670720235908 & 189.560546566092 \tabularnewline
Winsorized Mean ( 4 / 16 ) & 103.010625 & 0.46654897258111 & 220.792737855813 \tabularnewline
Winsorized Mean ( 5 / 16 ) & 103.027291666667 & 0.463415352540412 & 222.321705791312 \tabularnewline
Winsorized Mean ( 6 / 16 ) & 103.001041666667 & 0.436858571291189 & 235.77662986498 \tabularnewline
Winsorized Mean ( 7 / 16 ) & 102.979166666667 & 0.432032434235763 & 238.359804742045 \tabularnewline
Winsorized Mean ( 8 / 16 ) & 102.820833333333 & 0.392378502825914 & 262.045021816478 \tabularnewline
Winsorized Mean ( 9 / 16 ) & 102.758958333333 & 0.38078251359286 & 269.862597848191 \tabularnewline
Winsorized Mean ( 10 / 16 ) & 102.761041666667 & 0.379644084859405 & 270.677315319485 \tabularnewline
Winsorized Mean ( 11 / 16 ) & 102.719791666667 & 0.361501926265349 & 284.147287202195 \tabularnewline
Winsorized Mean ( 12 / 16 ) & 102.659791666667 & 0.345835596367457 & 296.845647888682 \tabularnewline
Winsorized Mean ( 13 / 16 ) & 102.605625 & 0.329293234430987 & 311.593480434849 \tabularnewline
Winsorized Mean ( 14 / 16 ) & 102.588125 & 0.297673552728143 & 344.632984891644 \tabularnewline
Winsorized Mean ( 15 / 16 ) & 102.619375 & 0.282705458809346 & 362.990426262711 \tabularnewline
Winsorized Mean ( 16 / 16 ) & 102.706041666667 & 0.232696904263555 & 441.372617275307 \tabularnewline
Trimmed Mean ( 1 / 16 ) & 102.967608695652 & 0.576038040945802 & 178.751404206897 \tabularnewline
Trimmed Mean ( 2 / 16 ) & 102.902954545455 & 0.523298064820994 & 196.64310163397 \tabularnewline
Trimmed Mean ( 3 / 16 ) & 102.899523809524 & 0.48287129412265 & 213.09927730636 \tabularnewline
Trimmed Mean ( 4 / 16 ) & 102.91175 & 0.448550069740383 & 229.432023184311 \tabularnewline
Trimmed Mean ( 5 / 16 ) & 102.880526315789 & 0.437742324252711 & 235.025311960458 \tabularnewline
Trimmed Mean ( 6 / 16 ) & 102.841388888889 & 0.423645957453053 & 242.753145827635 \tabularnewline
Trimmed Mean ( 7 / 16 ) & 102.803823529412 & 0.413475986259383 & 248.633117631457 \tabularnewline
Trimmed Mean ( 8 / 16 ) & 102.76625 & 0.40011509180928 & 256.841724053201 \tabularnewline
Trimmed Mean ( 9 / 16 ) & 102.755333333333 & 0.394246475602388 & 260.637290863104 \tabularnewline
Trimmed Mean ( 10 / 16 ) & 102.754642857143 & 0.388157526163229 & 264.724077033437 \tabularnewline
Trimmed Mean ( 11 / 16 ) & 102.753461538462 & 0.377803751379222 & 271.975757687282 \tabularnewline
Trimmed Mean ( 12 / 16 ) & 102.759583333333 & 0.3671390957663 & 279.892783193932 \tabularnewline
Trimmed Mean ( 13 / 16 ) & 102.777727272727 & 0.354540084874422 & 289.890287889819 \tabularnewline
Trimmed Mean ( 14 / 16 ) & 102.8095 & 0.33870067129671 & 303.540880525555 \tabularnewline
Trimmed Mean ( 15 / 16 ) & 102.851666666667 & 0.324530077561125 & 316.924913214845 \tabularnewline
Trimmed Mean ( 16 / 16 ) & 102.898125 & 0.303787506257801 & 338.717435313743 \tabularnewline
Median & 103.215 &  &  \tabularnewline
Midrange & 104.33 &  &  \tabularnewline
Midmean - Weighted Average at Xnp & 102.6352 &  &  \tabularnewline
Midmean - Weighted Average at X(n+1)p & 102.759583333333 &  &  \tabularnewline
Midmean - Empirical Distribution Function & 102.6352 &  &  \tabularnewline
Midmean - Empirical Distribution Function - Averaging & 102.759583333333 &  &  \tabularnewline
Midmean - Empirical Distribution Function - Interpolation & 102.759583333333 &  &  \tabularnewline
Midmean - Closest Observation & 102.6352 &  &  \tabularnewline
Midmean - True Basic - Statistics Graphics Toolkit & 102.759583333333 &  &  \tabularnewline
Midmean - MS Excel (old versions) & 102.753461538462 &  &  \tabularnewline
Number of observations & 48 &  &  \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=&T=1

[TABLE]
[ROW][C]Central Tendency - Ungrouped Data[/C][/ROW]
[ROW][C]Measure[/C][C]Value[/C][C]S.E.[/C][C]Value/S.E.[/C][/ROW]
[ROW][C]Arithmetic Mean[/C][C]103.024375[/C][C]0.616390481538597[/C][C]167.141411306088[/C][/ROW]
[ROW][C]Geometric Mean[/C][C]102.938371295127[/C][C][/C][C][/C][/ROW]
[ROW][C]Harmonic Mean[/C][C]102.85299640947[/C][C][/C][C][/C][/ROW]
[ROW][C]Quadratic Mean[/C][C]103.111002777347[/C][C][/C][C][/C][/ROW]
[ROW][C]Winsorized Mean ( 1 / 16 )[/C][C]103.026875[/C][C]0.615719981332614[/C][C]167.327483472304[/C][/ROW]
[ROW][C]Winsorized Mean ( 2 / 16 )[/C][C]102.908958333333[/C][C]0.577081050607411[/C][C]178.326698173533[/C][/ROW]
[ROW][C]Winsorized Mean ( 3 / 16 )[/C][C]102.868958333333[/C][C]0.542670720235908[/C][C]189.560546566092[/C][/ROW]
[ROW][C]Winsorized Mean ( 4 / 16 )[/C][C]103.010625[/C][C]0.46654897258111[/C][C]220.792737855813[/C][/ROW]
[ROW][C]Winsorized Mean ( 5 / 16 )[/C][C]103.027291666667[/C][C]0.463415352540412[/C][C]222.321705791312[/C][/ROW]
[ROW][C]Winsorized Mean ( 6 / 16 )[/C][C]103.001041666667[/C][C]0.436858571291189[/C][C]235.77662986498[/C][/ROW]
[ROW][C]Winsorized Mean ( 7 / 16 )[/C][C]102.979166666667[/C][C]0.432032434235763[/C][C]238.359804742045[/C][/ROW]
[ROW][C]Winsorized Mean ( 8 / 16 )[/C][C]102.820833333333[/C][C]0.392378502825914[/C][C]262.045021816478[/C][/ROW]
[ROW][C]Winsorized Mean ( 9 / 16 )[/C][C]102.758958333333[/C][C]0.38078251359286[/C][C]269.862597848191[/C][/ROW]
[ROW][C]Winsorized Mean ( 10 / 16 )[/C][C]102.761041666667[/C][C]0.379644084859405[/C][C]270.677315319485[/C][/ROW]
[ROW][C]Winsorized Mean ( 11 / 16 )[/C][C]102.719791666667[/C][C]0.361501926265349[/C][C]284.147287202195[/C][/ROW]
[ROW][C]Winsorized Mean ( 12 / 16 )[/C][C]102.659791666667[/C][C]0.345835596367457[/C][C]296.845647888682[/C][/ROW]
[ROW][C]Winsorized Mean ( 13 / 16 )[/C][C]102.605625[/C][C]0.329293234430987[/C][C]311.593480434849[/C][/ROW]
[ROW][C]Winsorized Mean ( 14 / 16 )[/C][C]102.588125[/C][C]0.297673552728143[/C][C]344.632984891644[/C][/ROW]
[ROW][C]Winsorized Mean ( 15 / 16 )[/C][C]102.619375[/C][C]0.282705458809346[/C][C]362.990426262711[/C][/ROW]
[ROW][C]Winsorized Mean ( 16 / 16 )[/C][C]102.706041666667[/C][C]0.232696904263555[/C][C]441.372617275307[/C][/ROW]
[ROW][C]Trimmed Mean ( 1 / 16 )[/C][C]102.967608695652[/C][C]0.576038040945802[/C][C]178.751404206897[/C][/ROW]
[ROW][C]Trimmed Mean ( 2 / 16 )[/C][C]102.902954545455[/C][C]0.523298064820994[/C][C]196.64310163397[/C][/ROW]
[ROW][C]Trimmed Mean ( 3 / 16 )[/C][C]102.899523809524[/C][C]0.48287129412265[/C][C]213.09927730636[/C][/ROW]
[ROW][C]Trimmed Mean ( 4 / 16 )[/C][C]102.91175[/C][C]0.448550069740383[/C][C]229.432023184311[/C][/ROW]
[ROW][C]Trimmed Mean ( 5 / 16 )[/C][C]102.880526315789[/C][C]0.437742324252711[/C][C]235.025311960458[/C][/ROW]
[ROW][C]Trimmed Mean ( 6 / 16 )[/C][C]102.841388888889[/C][C]0.423645957453053[/C][C]242.753145827635[/C][/ROW]
[ROW][C]Trimmed Mean ( 7 / 16 )[/C][C]102.803823529412[/C][C]0.413475986259383[/C][C]248.633117631457[/C][/ROW]
[ROW][C]Trimmed Mean ( 8 / 16 )[/C][C]102.76625[/C][C]0.40011509180928[/C][C]256.841724053201[/C][/ROW]
[ROW][C]Trimmed Mean ( 9 / 16 )[/C][C]102.755333333333[/C][C]0.394246475602388[/C][C]260.637290863104[/C][/ROW]
[ROW][C]Trimmed Mean ( 10 / 16 )[/C][C]102.754642857143[/C][C]0.388157526163229[/C][C]264.724077033437[/C][/ROW]
[ROW][C]Trimmed Mean ( 11 / 16 )[/C][C]102.753461538462[/C][C]0.377803751379222[/C][C]271.975757687282[/C][/ROW]
[ROW][C]Trimmed Mean ( 12 / 16 )[/C][C]102.759583333333[/C][C]0.3671390957663[/C][C]279.892783193932[/C][/ROW]
[ROW][C]Trimmed Mean ( 13 / 16 )[/C][C]102.777727272727[/C][C]0.354540084874422[/C][C]289.890287889819[/C][/ROW]
[ROW][C]Trimmed Mean ( 14 / 16 )[/C][C]102.8095[/C][C]0.33870067129671[/C][C]303.540880525555[/C][/ROW]
[ROW][C]Trimmed Mean ( 15 / 16 )[/C][C]102.851666666667[/C][C]0.324530077561125[/C][C]316.924913214845[/C][/ROW]
[ROW][C]Trimmed Mean ( 16 / 16 )[/C][C]102.898125[/C][C]0.303787506257801[/C][C]338.717435313743[/C][/ROW]
[ROW][C]Median[/C][C]103.215[/C][C][/C][C][/C][/ROW]
[ROW][C]Midrange[/C][C]104.33[/C][C][/C][C][/C][/ROW]
[ROW][C]Midmean - Weighted Average at Xnp[/C][C]102.6352[/C][C][/C][C][/C][/ROW]
[ROW][C]Midmean - Weighted Average at X(n+1)p[/C][C]102.759583333333[/C][C][/C][C][/C][/ROW]
[ROW][C]Midmean - Empirical Distribution Function[/C][C]102.6352[/C][C][/C][C][/C][/ROW]
[ROW][C]Midmean - Empirical Distribution Function - Averaging[/C][C]102.759583333333[/C][C][/C][C][/C][/ROW]
[ROW][C]Midmean - Empirical Distribution Function - Interpolation[/C][C]102.759583333333[/C][C][/C][C][/C][/ROW]
[ROW][C]Midmean - Closest Observation[/C][C]102.6352[/C][C][/C][C][/C][/ROW]
[ROW][C]Midmean - True Basic - Statistics Graphics Toolkit[/C][C]102.759583333333[/C][C][/C][C][/C][/ROW]
[ROW][C]Midmean - MS Excel (old versions)[/C][C]102.753461538462[/C][C][/C][C][/C][/ROW]
[ROW][C]Number of observations[/C][C]48[/C][C][/C][C][/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=&T=1

As an alternative you can also use a QR Code:  

The GUIDs for individual cells are displayed in the table below:

Central Tendency - Ungrouped Data
MeasureValueS.E.Value/S.E.
Arithmetic Mean103.0243750.616390481538597167.141411306088
Geometric Mean102.938371295127
Harmonic Mean102.85299640947
Quadratic Mean103.111002777347
Winsorized Mean ( 1 / 16 )103.0268750.615719981332614167.327483472304
Winsorized Mean ( 2 / 16 )102.9089583333330.577081050607411178.326698173533
Winsorized Mean ( 3 / 16 )102.8689583333330.542670720235908189.560546566092
Winsorized Mean ( 4 / 16 )103.0106250.46654897258111220.792737855813
Winsorized Mean ( 5 / 16 )103.0272916666670.463415352540412222.321705791312
Winsorized Mean ( 6 / 16 )103.0010416666670.436858571291189235.77662986498
Winsorized Mean ( 7 / 16 )102.9791666666670.432032434235763238.359804742045
Winsorized Mean ( 8 / 16 )102.8208333333330.392378502825914262.045021816478
Winsorized Mean ( 9 / 16 )102.7589583333330.38078251359286269.862597848191
Winsorized Mean ( 10 / 16 )102.7610416666670.379644084859405270.677315319485
Winsorized Mean ( 11 / 16 )102.7197916666670.361501926265349284.147287202195
Winsorized Mean ( 12 / 16 )102.6597916666670.345835596367457296.845647888682
Winsorized Mean ( 13 / 16 )102.6056250.329293234430987311.593480434849
Winsorized Mean ( 14 / 16 )102.5881250.297673552728143344.632984891644
Winsorized Mean ( 15 / 16 )102.6193750.282705458809346362.990426262711
Winsorized Mean ( 16 / 16 )102.7060416666670.232696904263555441.372617275307
Trimmed Mean ( 1 / 16 )102.9676086956520.576038040945802178.751404206897
Trimmed Mean ( 2 / 16 )102.9029545454550.523298064820994196.64310163397
Trimmed Mean ( 3 / 16 )102.8995238095240.48287129412265213.09927730636
Trimmed Mean ( 4 / 16 )102.911750.448550069740383229.432023184311
Trimmed Mean ( 5 / 16 )102.8805263157890.437742324252711235.025311960458
Trimmed Mean ( 6 / 16 )102.8413888888890.423645957453053242.753145827635
Trimmed Mean ( 7 / 16 )102.8038235294120.413475986259383248.633117631457
Trimmed Mean ( 8 / 16 )102.766250.40011509180928256.841724053201
Trimmed Mean ( 9 / 16 )102.7553333333330.394246475602388260.637290863104
Trimmed Mean ( 10 / 16 )102.7546428571430.388157526163229264.724077033437
Trimmed Mean ( 11 / 16 )102.7534615384620.377803751379222271.975757687282
Trimmed Mean ( 12 / 16 )102.7595833333330.3671390957663279.892783193932
Trimmed Mean ( 13 / 16 )102.7777272727270.354540084874422289.890287889819
Trimmed Mean ( 14 / 16 )102.80950.33870067129671303.540880525555
Trimmed Mean ( 15 / 16 )102.8516666666670.324530077561125316.924913214845
Trimmed Mean ( 16 / 16 )102.8981250.303787506257801338.717435313743
Median103.215
Midrange104.33
Midmean - Weighted Average at Xnp102.6352
Midmean - Weighted Average at X(n+1)p102.759583333333
Midmean - Empirical Distribution Function102.6352
Midmean - Empirical Distribution Function - Averaging102.759583333333
Midmean - Empirical Distribution Function - Interpolation102.759583333333
Midmean - Closest Observation102.6352
Midmean - True Basic - Statistics Graphics Toolkit102.759583333333
Midmean - MS Excel (old versions)102.753461538462
Number of observations48



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('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('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('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('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('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('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('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('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('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('midmean.htm', 'Midmean', 'click to view the definition of the Midmean')
mylabel <- paste(mymid,hyperlink('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('midmean.htm', 'Midmean', 'click to view the definition of the Midmean')
mylabel <- paste(mymid,hyperlink('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('midmean.htm', 'Midmean', 'click to view the definition of the Midmean')
mylabel <- paste(mymid,hyperlink('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('midmean.htm', 'Midmean', 'click to view the definition of the Midmean')
mylabel <- paste(mymid,hyperlink('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('midmean.htm', 'Midmean', 'click to view the definition of the Midmean')
mylabel <- paste(mymid,hyperlink('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('midmean.htm', 'Midmean', 'click to view the definition of the Midmean')
mylabel <- paste(mymid,hyperlink('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('midmean.htm', 'Midmean', 'click to view the definition of the Midmean')
mylabel <- paste(mymid,hyperlink('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('midmean.htm', 'Midmean', 'click to view the definition of the Midmean')
mylabel <- paste(mymid,hyperlink('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')