(* Content-type: application/vnd.wolfram.mathematica *) (*** Wolfram Notebook File ***) (* http://www.wolfram.com/nb *) (* CreatedBy='Mathematica 9.0' *) (*CacheID: 234*) (* Internal cache information: NotebookFileLineBreakTest NotebookFileLineBreakTest NotebookDataPosition[ 157, 7] NotebookDataLength[ 7132, 303] NotebookOptionsPosition[ 5554, 240] NotebookOutlinePosition[ 5909, 256] CellTagsIndexPosition[ 5866, 253] WindowFrame->Normal*) (* Beginning of Notebook Content *) Notebook[{ Cell[CellGroupData[{ Cell["Geometric Mean", "Title"], Cell[CellGroupData[{ Cell["Author", "Subsection"], Cell["\<\ Eric W. Weisstein June 21, 2004\ \>", "Text"], Cell[TextData[{ "This notebook downloaded from ", ButtonBox["http://mathworld.wolfram.com/notebooks/SpecialFunctions/\ GeometricMean.nb", BaseStyle->"Hyperlink", ButtonData:>{ URL["http://mathworld.wolfram.com/notebooks/SpecialFunctions/\ GeometricMean.nb"], None}], "." }], "Text"], Cell[TextData[{ "For more information, see Eric's ", StyleBox["MathWorld", FontSlant->"Italic"], " entry ", ButtonBox["http://mathworld.wolfram.com/GeometricMean.html", BaseStyle->"Hyperlink", ButtonData:>{ URL["http://mathworld.wolfram.com/GeometricMean.html"], None}], "." }], "Text"], Cell["\<\ \[Copyright]2005 Wolfram Research, Inc. except for portions noted otherwise\ \>", "Text"] }, Open ]], Cell[CellGroupData[{ Cell["Initialization", "Subsection"], Cell[BoxData[ RowBox[{"<<", "Statistics`DescriptiveStatistics`"}]], "Input", InitializationCell->True] }, Open ]], Cell[CellGroupData[{ Cell["Code", "Subsection"], Cell[BoxData[ RowBox[{ RowBox[{"MyGeometricMean", "[", "l_List", "]"}], ":=", RowBox[{ RowBox[{"(", RowBox[{"Times", "@@", "l"}], ")"}], "^", RowBox[{"(", RowBox[{"1", "/", RowBox[{"Length", "[", "l", "]"}]}], ")"}]}]}]], "Input", InitializationCell->True] }, Open ]], Cell[CellGroupData[{ Cell["Examples", "Section"], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"Table", "[", RowBox[{ RowBox[{"Subtract", "@@", RowBox[{"Through", "[", RowBox[{ RowBox[{"{", RowBox[{"GeometricMean", ",", "MyGeometricMean"}], "}"}], "[", RowBox[{"Array", "[", RowBox[{"x", ",", "n"}], "]"}], "]"}], "]"}]}], ",", RowBox[{"{", RowBox[{"n", ",", "10"}], "}"}]}], "]"}]], "Input"], Cell[BoxData[ RowBox[{"{", RowBox[{ "0", ",", "0", ",", "0", ",", "0", ",", "0", ",", "0", ",", "0", ",", "0", ",", "0", ",", "0"}], "}"}]], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"GeometricMean", "[", RowBox[{"{", RowBox[{ SubscriptBox["x", "1"], ",", SubscriptBox["x", "2"]}], "}"}], "]"}]], "Input"], Cell[BoxData[ SqrtBox[ RowBox[{ SubscriptBox["x", "1"], " ", SubscriptBox["x", "2"]}]]], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"GeometricMean", "[", RowBox[{"{", RowBox[{ SubscriptBox["x", "1"], ",", SubscriptBox["x", "2"], ",", SubscriptBox["x", "3"]}], "}"}], "]"}]], "Input"], Cell[BoxData[ SuperscriptBox[ RowBox[{"(", RowBox[{ SubscriptBox["x", "1"], " ", SubscriptBox["x", "2"], " ", SubscriptBox["x", "3"]}], ")"}], RowBox[{"1", "/", "3"}]]], "Output"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[TextData[{ "Relationship to ", Cell[BoxData[ FormBox["A", TraditionalForm]]], " and ", Cell[BoxData[ FormBox["H", TraditionalForm]]] }], "Section"], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"With", "[", RowBox[{ RowBox[{"{", RowBox[{"n", "=", "2"}], "}"}], ",", RowBox[{"Eliminate", "[", RowBox[{ RowBox[{"Thread", "[", RowBox[{ RowBox[{"{", RowBox[{"G", ",", "H", ",", "A"}], "}"}], "\[Equal]", RowBox[{ RowBox[{"Through", "[", RowBox[{ RowBox[{"{", RowBox[{"GeometricMean", ",", "HarmonicMean", ",", "Mean"}], "}"}], "[", RowBox[{"Array", "[", RowBox[{"x", ",", "n"}], "]"}], "]"}], "]"}], "^", "n"}]}], "]"}], ",", RowBox[{"Array", "[", RowBox[{"x", ",", "n"}], "]"}]}], "]"}]}], "\[IndentingNewLine]", "]"}]], "Input"], Cell[BoxData[ RowBox[{ RowBox[{"A", " ", "H"}], "\[Equal]", SuperscriptBox["G", "2"]}]], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"Solve", "[", RowBox[{ RowBox[{ RowBox[{"G", "^", "2"}], "\[Equal]", RowBox[{"A", " ", "H"}]}], ",", "H"}], "]"}]], "Input"], Cell[BoxData[ RowBox[{"{", RowBox[{"{", RowBox[{"H", "\[Rule]", FractionBox[ SuperscriptBox["G", "2"], "A"]}], "}"}], "}"}]], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"With", "[", RowBox[{ RowBox[{"{", RowBox[{"n", "=", "3"}], "}"}], ",", RowBox[{"Eliminate", "[", RowBox[{ RowBox[{"Thread", "[", RowBox[{ RowBox[{"{", RowBox[{"g", ",", "h", ",", "a"}], "}"}], "\[Equal]", RowBox[{ RowBox[{"Through", "[", RowBox[{ RowBox[{"{", RowBox[{"GeometricMean", ",", "HarmonicMean", ",", "Mean"}], "}"}], "[", RowBox[{"Array", "[", RowBox[{"x", ",", "n"}], "]"}], "]"}], "]"}], "^", "n"}]}], "]"}], ",", RowBox[{"Array", "[", RowBox[{"x", ",", "n"}], "]"}]}], "]"}]}], "\[IndentingNewLine]", "]"}]], "Input"], Cell[BoxData["$Aborted"], "Output"] }, Open ]] }, Open ]] }, Open ]] }, WindowSize->{740, 867}, WindowMargins->{{412, Automatic}, {-12, Automatic}}, FrontEndVersion->"9.0 for Mac OS X x86 (32-bit, 64-bit Kernel) (March 5, \ 2013)", StyleDefinitions->"Default.nb" ] (* End of Notebook Content *) (* Internal cache information *) (*CellTagsOutline CellTagsIndex->{} *) (*CellTagsIndex CellTagsIndex->{} *) (*NotebookFileOutline Notebook[{ Cell[CellGroupData[{ Cell[579, 22, 31, 0, 92, "Title"], Cell[CellGroupData[{ Cell[635, 26, 28, 0, 44, "Subsection"], Cell[666, 28, 55, 3, 49, "Text"], Cell[724, 33, 293, 9, 49, "Text"], Cell[1020, 44, 301, 10, 49, "Text"], Cell[1324, 56, 99, 2, 30, "Text"] }, Open ]], Cell[CellGroupData[{ Cell[1460, 63, 36, 0, 44, "Subsection"], Cell[1499, 65, 104, 2, 28, "Input", InitializationCell->True] }, Open ]], Cell[CellGroupData[{ Cell[1640, 72, 26, 0, 44, "Subsection"], Cell[1669, 74, 286, 9, 28, "Input", InitializationCell->True] }, Open ]], Cell[CellGroupData[{ Cell[1992, 88, 27, 0, 80, "Section"], Cell[CellGroupData[{ Cell[2044, 92, 375, 11, 46, "Input"], Cell[2422, 105, 160, 4, 28, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[2619, 114, 161, 5, 28, "Input"], Cell[2783, 121, 108, 4, 39, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[2928, 130, 195, 6, 28, "Input"], Cell[3126, 138, 203, 7, 32, "Output"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[3378, 151, 160, 7, 82, "Section"], Cell[CellGroupData[{ Cell[3563, 162, 707, 22, 97, "Input"], Cell[4273, 186, 104, 3, 32, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[4414, 194, 162, 5, 25, "Input"], Cell[4579, 201, 153, 5, 41, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[4769, 211, 707, 22, 89, "Input"], Cell[5479, 235, 35, 0, 70, "Output"] }, Open ]] }, Open ]] }, Open ]] } ] *) (* End of internal cache information *)