Free Statistics

of Irreproducible Research!

Author's title

Author*The author of this computation has been verified*
R Software Modulerwasp_centraltendency.wasp
Title produced by softwareCentral Tendency
Date of computationSun, 14 Nov 2010 16:42:13 +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/2010/Nov/14/t1289752870zu8t0933rutv1hy.htm/, Retrieved Sat, 20 Apr 2024 06:52:20 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=94589, Retrieved Sat, 20 Apr 2024 06:52:20 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact162
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [Central Tendency] [Arabica Price in ...] [2008-01-06 21:28:17] [74be16979710d4c4e7c6647856088456]
- RM D  [Central Tendency] [] [2010-11-12 15:30:06] [d39e5c40c631ed6c22677d2e41dbfc7d]
-    D      [Central Tendency] [] [2010-11-14 16:42:13] [1d094c42a82a95b45a19e32ad4bfff5f] [Current]
-    D        [Central Tendency] [] [2010-11-15 15:17:41] [d39e5c40c631ed6c22677d2e41dbfc7d]
Feedback Forum

Post a new message
Dataseries X:
599
588
566
557
561
549
532
526
511
499
555
565
542
527
510
514
517
508
493
490
469
478
528
534
518
506
502
516
528
533
536
537
524
536
587
597
581
564
558
575
580
575
563
552
537
545
601
604
586




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time1 seconds
R Server'George Udny Yule' @ 72.249.76.132

\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 & 1 seconds \tabularnewline
R Server & 'George Udny Yule' @ 72.249.76.132 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=94589&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]1 seconds[/C][/ROW]
[ROW][C]R Server[/C][C]'George Udny Yule' @ 72.249.76.132[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=94589&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=94589&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 time1 seconds
R Server'George Udny Yule' @ 72.249.76.132







Central Tendency - Ungrouped Data
MeasureValueS.E.Value/S.E.
Arithmetic Mean542.0204081632654.82072215247458112.435521280776
Geometric Mean540.988418450141
Harmonic Mean539.953799693713
Quadratic Mean543.048443736742
Winsorized Mean ( 1 / 16 )542.1428571428574.74977622100872114.140715670963
Winsorized Mean ( 2 / 16 )542.5510204081634.60146948804358117.908207762308
Winsorized Mean ( 3 / 16 )542.6122448979594.52767532129647119.843453073085
Winsorized Mean ( 4 / 16 )542.3673469387764.24501447053604127.765723934102
Winsorized Mean ( 5 / 16 )542.5714285714294.15852946928825130.471945089833
Winsorized Mean ( 6 / 16 )542.9387755102044.03475632996993134.565443637150
Winsorized Mean ( 7 / 16 )542.5102040816333.82627890328593141.78532663046
Winsorized Mean ( 8 / 16 )542.6734693877553.73168859790758145.42303173208
Winsorized Mean ( 9 / 16 )541.9387755102043.51217611904813154.302847334740
Winsorized Mean ( 10 / 16 )542.5510204081633.40243775459389159.459499200426
Winsorized Mean ( 11 / 16 )540.9795918367352.94225747992284183.865482721425
Winsorized Mean ( 12 / 16 )540.9795918367352.85602504858796189.416963308567
Winsorized Mean ( 13 / 16 )540.9795918367352.76357038177656195.753868041156
Winsorized Mean ( 14 / 16 )542.4081632653062.42890725397745223.313657768154
Winsorized Mean ( 15 / 16 )542.4081632653062.22614305411936243.653776994075
Winsorized Mean ( 16 / 16 )541.7551020408162.00817432661076269.774936798016
Trimmed Mean ( 1 / 16 )542.0204081632654.58665845539074118.173265664947
Trimmed Mean ( 2 / 16 )542.2553191489364.37523897054581123.937303264898
Trimmed Mean ( 3 / 16 )542.2790697674424.20624510404463128.92236575705
Trimmed Mean ( 4 / 16 )542.2790697674424.02197636401494134.829004620532
Trimmed Mean ( 5 / 16 )542.0769230769233.90203666938306138.921534830843
Trimmed Mean ( 6 / 16 )541.9459459459463.77082723775247143.720704178684
Trimmed Mean ( 7 / 16 )541.7142857142863.63284998859241149.115511902593
Trimmed Mean ( 8 / 16 )541.7142857142863.51190909757668154.250657025287
Trimmed Mean ( 9 / 16 )541.3225806451613.36790260400327160.729879777912
Trimmed Mean ( 10 / 16 )541.2068965517243.23442814032682167.326919341309
Trimmed Mean ( 11 / 16 )540.9629629629633.06876622734070176.280277768745
Trimmed Mean ( 12 / 16 )540.962.98913588405300180.975379167610
Trimmed Mean ( 13 / 16 )540.956521739132.88411093627916187.564394605787
Trimmed Mean ( 14 / 16 )540.9523809523812.73902675665941197.498027223415
Trimmed Mean ( 15 / 16 )540.6842105263162.6358444961841205.127507069959
Trimmed Mean ( 16 / 16 )540.6842105263162.53351240792447213.412892249957
Median537
Midrange536.5
Midmean - Weighted Average at Xnp539.958333333333
Midmean - Weighted Average at X(n+1)p540.96
Midmean - Empirical Distribution Function540.96
Midmean - Empirical Distribution Function - Averaging540.96
Midmean - Empirical Distribution Function - Interpolation540.96
Midmean - Closest Observation540
Midmean - True Basic - Statistics Graphics Toolkit540.96
Midmean - MS Excel (old versions)540.96
Number of observations49

\begin{tabular}{lllllllll}
\hline
Central Tendency - Ungrouped Data \tabularnewline
Measure & Value & S.E. & Value/S.E. \tabularnewline
Arithmetic Mean & 542.020408163265 & 4.82072215247458 & 112.435521280776 \tabularnewline
Geometric Mean & 540.988418450141 &  &  \tabularnewline
Harmonic Mean & 539.953799693713 &  &  \tabularnewline
Quadratic Mean & 543.048443736742 &  &  \tabularnewline
Winsorized Mean ( 1 / 16 ) & 542.142857142857 & 4.74977622100872 & 114.140715670963 \tabularnewline
Winsorized Mean ( 2 / 16 ) & 542.551020408163 & 4.60146948804358 & 117.908207762308 \tabularnewline
Winsorized Mean ( 3 / 16 ) & 542.612244897959 & 4.52767532129647 & 119.843453073085 \tabularnewline
Winsorized Mean ( 4 / 16 ) & 542.367346938776 & 4.24501447053604 & 127.765723934102 \tabularnewline
Winsorized Mean ( 5 / 16 ) & 542.571428571429 & 4.15852946928825 & 130.471945089833 \tabularnewline
Winsorized Mean ( 6 / 16 ) & 542.938775510204 & 4.03475632996993 & 134.565443637150 \tabularnewline
Winsorized Mean ( 7 / 16 ) & 542.510204081633 & 3.82627890328593 & 141.78532663046 \tabularnewline
Winsorized Mean ( 8 / 16 ) & 542.673469387755 & 3.73168859790758 & 145.42303173208 \tabularnewline
Winsorized Mean ( 9 / 16 ) & 541.938775510204 & 3.51217611904813 & 154.302847334740 \tabularnewline
Winsorized Mean ( 10 / 16 ) & 542.551020408163 & 3.40243775459389 & 159.459499200426 \tabularnewline
Winsorized Mean ( 11 / 16 ) & 540.979591836735 & 2.94225747992284 & 183.865482721425 \tabularnewline
Winsorized Mean ( 12 / 16 ) & 540.979591836735 & 2.85602504858796 & 189.416963308567 \tabularnewline
Winsorized Mean ( 13 / 16 ) & 540.979591836735 & 2.76357038177656 & 195.753868041156 \tabularnewline
Winsorized Mean ( 14 / 16 ) & 542.408163265306 & 2.42890725397745 & 223.313657768154 \tabularnewline
Winsorized Mean ( 15 / 16 ) & 542.408163265306 & 2.22614305411936 & 243.653776994075 \tabularnewline
Winsorized Mean ( 16 / 16 ) & 541.755102040816 & 2.00817432661076 & 269.774936798016 \tabularnewline
Trimmed Mean ( 1 / 16 ) & 542.020408163265 & 4.58665845539074 & 118.173265664947 \tabularnewline
Trimmed Mean ( 2 / 16 ) & 542.255319148936 & 4.37523897054581 & 123.937303264898 \tabularnewline
Trimmed Mean ( 3 / 16 ) & 542.279069767442 & 4.20624510404463 & 128.92236575705 \tabularnewline
Trimmed Mean ( 4 / 16 ) & 542.279069767442 & 4.02197636401494 & 134.829004620532 \tabularnewline
Trimmed Mean ( 5 / 16 ) & 542.076923076923 & 3.90203666938306 & 138.921534830843 \tabularnewline
Trimmed Mean ( 6 / 16 ) & 541.945945945946 & 3.77082723775247 & 143.720704178684 \tabularnewline
Trimmed Mean ( 7 / 16 ) & 541.714285714286 & 3.63284998859241 & 149.115511902593 \tabularnewline
Trimmed Mean ( 8 / 16 ) & 541.714285714286 & 3.51190909757668 & 154.250657025287 \tabularnewline
Trimmed Mean ( 9 / 16 ) & 541.322580645161 & 3.36790260400327 & 160.729879777912 \tabularnewline
Trimmed Mean ( 10 / 16 ) & 541.206896551724 & 3.23442814032682 & 167.326919341309 \tabularnewline
Trimmed Mean ( 11 / 16 ) & 540.962962962963 & 3.06876622734070 & 176.280277768745 \tabularnewline
Trimmed Mean ( 12 / 16 ) & 540.96 & 2.98913588405300 & 180.975379167610 \tabularnewline
Trimmed Mean ( 13 / 16 ) & 540.95652173913 & 2.88411093627916 & 187.564394605787 \tabularnewline
Trimmed Mean ( 14 / 16 ) & 540.952380952381 & 2.73902675665941 & 197.498027223415 \tabularnewline
Trimmed Mean ( 15 / 16 ) & 540.684210526316 & 2.6358444961841 & 205.127507069959 \tabularnewline
Trimmed Mean ( 16 / 16 ) & 540.684210526316 & 2.53351240792447 & 213.412892249957 \tabularnewline
Median & 537 &  &  \tabularnewline
Midrange & 536.5 &  &  \tabularnewline
Midmean - Weighted Average at Xnp & 539.958333333333 &  &  \tabularnewline
Midmean - Weighted Average at X(n+1)p & 540.96 &  &  \tabularnewline
Midmean - Empirical Distribution Function & 540.96 &  &  \tabularnewline
Midmean - Empirical Distribution Function - Averaging & 540.96 &  &  \tabularnewline
Midmean - Empirical Distribution Function - Interpolation & 540.96 &  &  \tabularnewline
Midmean - Closest Observation & 540 &  &  \tabularnewline
Midmean - True Basic - Statistics Graphics Toolkit & 540.96 &  &  \tabularnewline
Midmean - MS Excel (old versions) & 540.96 &  &  \tabularnewline
Number of observations & 49 &  &  \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=94589&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]542.020408163265[/C][C]4.82072215247458[/C][C]112.435521280776[/C][/ROW]
[ROW][C]Geometric Mean[/C][C]540.988418450141[/C][C][/C][C][/C][/ROW]
[ROW][C]Harmonic Mean[/C][C]539.953799693713[/C][C][/C][C][/C][/ROW]
[ROW][C]Quadratic Mean[/C][C]543.048443736742[/C][C][/C][C][/C][/ROW]
[ROW][C]Winsorized Mean ( 1 / 16 )[/C][C]542.142857142857[/C][C]4.74977622100872[/C][C]114.140715670963[/C][/ROW]
[ROW][C]Winsorized Mean ( 2 / 16 )[/C][C]542.551020408163[/C][C]4.60146948804358[/C][C]117.908207762308[/C][/ROW]
[ROW][C]Winsorized Mean ( 3 / 16 )[/C][C]542.612244897959[/C][C]4.52767532129647[/C][C]119.843453073085[/C][/ROW]
[ROW][C]Winsorized Mean ( 4 / 16 )[/C][C]542.367346938776[/C][C]4.24501447053604[/C][C]127.765723934102[/C][/ROW]
[ROW][C]Winsorized Mean ( 5 / 16 )[/C][C]542.571428571429[/C][C]4.15852946928825[/C][C]130.471945089833[/C][/ROW]
[ROW][C]Winsorized Mean ( 6 / 16 )[/C][C]542.938775510204[/C][C]4.03475632996993[/C][C]134.565443637150[/C][/ROW]
[ROW][C]Winsorized Mean ( 7 / 16 )[/C][C]542.510204081633[/C][C]3.82627890328593[/C][C]141.78532663046[/C][/ROW]
[ROW][C]Winsorized Mean ( 8 / 16 )[/C][C]542.673469387755[/C][C]3.73168859790758[/C][C]145.42303173208[/C][/ROW]
[ROW][C]Winsorized Mean ( 9 / 16 )[/C][C]541.938775510204[/C][C]3.51217611904813[/C][C]154.302847334740[/C][/ROW]
[ROW][C]Winsorized Mean ( 10 / 16 )[/C][C]542.551020408163[/C][C]3.40243775459389[/C][C]159.459499200426[/C][/ROW]
[ROW][C]Winsorized Mean ( 11 / 16 )[/C][C]540.979591836735[/C][C]2.94225747992284[/C][C]183.865482721425[/C][/ROW]
[ROW][C]Winsorized Mean ( 12 / 16 )[/C][C]540.979591836735[/C][C]2.85602504858796[/C][C]189.416963308567[/C][/ROW]
[ROW][C]Winsorized Mean ( 13 / 16 )[/C][C]540.979591836735[/C][C]2.76357038177656[/C][C]195.753868041156[/C][/ROW]
[ROW][C]Winsorized Mean ( 14 / 16 )[/C][C]542.408163265306[/C][C]2.42890725397745[/C][C]223.313657768154[/C][/ROW]
[ROW][C]Winsorized Mean ( 15 / 16 )[/C][C]542.408163265306[/C][C]2.22614305411936[/C][C]243.653776994075[/C][/ROW]
[ROW][C]Winsorized Mean ( 16 / 16 )[/C][C]541.755102040816[/C][C]2.00817432661076[/C][C]269.774936798016[/C][/ROW]
[ROW][C]Trimmed Mean ( 1 / 16 )[/C][C]542.020408163265[/C][C]4.58665845539074[/C][C]118.173265664947[/C][/ROW]
[ROW][C]Trimmed Mean ( 2 / 16 )[/C][C]542.255319148936[/C][C]4.37523897054581[/C][C]123.937303264898[/C][/ROW]
[ROW][C]Trimmed Mean ( 3 / 16 )[/C][C]542.279069767442[/C][C]4.20624510404463[/C][C]128.92236575705[/C][/ROW]
[ROW][C]Trimmed Mean ( 4 / 16 )[/C][C]542.279069767442[/C][C]4.02197636401494[/C][C]134.829004620532[/C][/ROW]
[ROW][C]Trimmed Mean ( 5 / 16 )[/C][C]542.076923076923[/C][C]3.90203666938306[/C][C]138.921534830843[/C][/ROW]
[ROW][C]Trimmed Mean ( 6 / 16 )[/C][C]541.945945945946[/C][C]3.77082723775247[/C][C]143.720704178684[/C][/ROW]
[ROW][C]Trimmed Mean ( 7 / 16 )[/C][C]541.714285714286[/C][C]3.63284998859241[/C][C]149.115511902593[/C][/ROW]
[ROW][C]Trimmed Mean ( 8 / 16 )[/C][C]541.714285714286[/C][C]3.51190909757668[/C][C]154.250657025287[/C][/ROW]
[ROW][C]Trimmed Mean ( 9 / 16 )[/C][C]541.322580645161[/C][C]3.36790260400327[/C][C]160.729879777912[/C][/ROW]
[ROW][C]Trimmed Mean ( 10 / 16 )[/C][C]541.206896551724[/C][C]3.23442814032682[/C][C]167.326919341309[/C][/ROW]
[ROW][C]Trimmed Mean ( 11 / 16 )[/C][C]540.962962962963[/C][C]3.06876622734070[/C][C]176.280277768745[/C][/ROW]
[ROW][C]Trimmed Mean ( 12 / 16 )[/C][C]540.96[/C][C]2.98913588405300[/C][C]180.975379167610[/C][/ROW]
[ROW][C]Trimmed Mean ( 13 / 16 )[/C][C]540.95652173913[/C][C]2.88411093627916[/C][C]187.564394605787[/C][/ROW]
[ROW][C]Trimmed Mean ( 14 / 16 )[/C][C]540.952380952381[/C][C]2.73902675665941[/C][C]197.498027223415[/C][/ROW]
[ROW][C]Trimmed Mean ( 15 / 16 )[/C][C]540.684210526316[/C][C]2.6358444961841[/C][C]205.127507069959[/C][/ROW]
[ROW][C]Trimmed Mean ( 16 / 16 )[/C][C]540.684210526316[/C][C]2.53351240792447[/C][C]213.412892249957[/C][/ROW]
[ROW][C]Median[/C][C]537[/C][C][/C][C][/C][/ROW]
[ROW][C]Midrange[/C][C]536.5[/C][C][/C][C][/C][/ROW]
[ROW][C]Midmean - Weighted Average at Xnp[/C][C]539.958333333333[/C][C][/C][C][/C][/ROW]
[ROW][C]Midmean - Weighted Average at X(n+1)p[/C][C]540.96[/C][C][/C][C][/C][/ROW]
[ROW][C]Midmean - Empirical Distribution Function[/C][C]540.96[/C][C][/C][C][/C][/ROW]
[ROW][C]Midmean - Empirical Distribution Function - Averaging[/C][C]540.96[/C][C][/C][C][/C][/ROW]
[ROW][C]Midmean - Empirical Distribution Function - Interpolation[/C][C]540.96[/C][C][/C][C][/C][/ROW]
[ROW][C]Midmean - Closest Observation[/C][C]540[/C][C][/C][C][/C][/ROW]
[ROW][C]Midmean - True Basic - Statistics Graphics Toolkit[/C][C]540.96[/C][C][/C][C][/C][/ROW]
[ROW][C]Midmean - MS Excel (old versions)[/C][C]540.96[/C][C][/C][C][/C][/ROW]
[ROW][C]Number of observations[/C][C]49[/C][C][/C][C][/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=94589&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=94589&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 Mean542.0204081632654.82072215247458112.435521280776
Geometric Mean540.988418450141
Harmonic Mean539.953799693713
Quadratic Mean543.048443736742
Winsorized Mean ( 1 / 16 )542.1428571428574.74977622100872114.140715670963
Winsorized Mean ( 2 / 16 )542.5510204081634.60146948804358117.908207762308
Winsorized Mean ( 3 / 16 )542.6122448979594.52767532129647119.843453073085
Winsorized Mean ( 4 / 16 )542.3673469387764.24501447053604127.765723934102
Winsorized Mean ( 5 / 16 )542.5714285714294.15852946928825130.471945089833
Winsorized Mean ( 6 / 16 )542.9387755102044.03475632996993134.565443637150
Winsorized Mean ( 7 / 16 )542.5102040816333.82627890328593141.78532663046
Winsorized Mean ( 8 / 16 )542.6734693877553.73168859790758145.42303173208
Winsorized Mean ( 9 / 16 )541.9387755102043.51217611904813154.302847334740
Winsorized Mean ( 10 / 16 )542.5510204081633.40243775459389159.459499200426
Winsorized Mean ( 11 / 16 )540.9795918367352.94225747992284183.865482721425
Winsorized Mean ( 12 / 16 )540.9795918367352.85602504858796189.416963308567
Winsorized Mean ( 13 / 16 )540.9795918367352.76357038177656195.753868041156
Winsorized Mean ( 14 / 16 )542.4081632653062.42890725397745223.313657768154
Winsorized Mean ( 15 / 16 )542.4081632653062.22614305411936243.653776994075
Winsorized Mean ( 16 / 16 )541.7551020408162.00817432661076269.774936798016
Trimmed Mean ( 1 / 16 )542.0204081632654.58665845539074118.173265664947
Trimmed Mean ( 2 / 16 )542.2553191489364.37523897054581123.937303264898
Trimmed Mean ( 3 / 16 )542.2790697674424.20624510404463128.92236575705
Trimmed Mean ( 4 / 16 )542.2790697674424.02197636401494134.829004620532
Trimmed Mean ( 5 / 16 )542.0769230769233.90203666938306138.921534830843
Trimmed Mean ( 6 / 16 )541.9459459459463.77082723775247143.720704178684
Trimmed Mean ( 7 / 16 )541.7142857142863.63284998859241149.115511902593
Trimmed Mean ( 8 / 16 )541.7142857142863.51190909757668154.250657025287
Trimmed Mean ( 9 / 16 )541.3225806451613.36790260400327160.729879777912
Trimmed Mean ( 10 / 16 )541.2068965517243.23442814032682167.326919341309
Trimmed Mean ( 11 / 16 )540.9629629629633.06876622734070176.280277768745
Trimmed Mean ( 12 / 16 )540.962.98913588405300180.975379167610
Trimmed Mean ( 13 / 16 )540.956521739132.88411093627916187.564394605787
Trimmed Mean ( 14 / 16 )540.9523809523812.73902675665941197.498027223415
Trimmed Mean ( 15 / 16 )540.6842105263162.6358444961841205.127507069959
Trimmed Mean ( 16 / 16 )540.6842105263162.53351240792447213.412892249957
Median537
Midrange536.5
Midmean - Weighted Average at Xnp539.958333333333
Midmean - Weighted Average at X(n+1)p540.96
Midmean - Empirical Distribution Function540.96
Midmean - Empirical Distribution Function - Averaging540.96
Midmean - Empirical Distribution Function - Interpolation540.96
Midmean - Closest Observation540
Midmean - True Basic - Statistics Graphics Toolkit540.96
Midmean - MS Excel (old versions)540.96
Number of observations49



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')