(*********************************************************************** Mathematica-Compatible Notebook This notebook can be used on any computer system with Mathematica 4.0, MathReader 4.0, or any compatible application. The data for the notebook starts with the line containing stars above. To get the notebook into a Mathematica-compatible application, do one of the following: * Save the data starting with the line of stars above into a file with a name ending in .nb, then open the file inside the application; * Copy the data starting with the line of stars above to the clipboard, then use the Paste menu command inside the application. Data for notebooks contains only printable 7-bit ASCII and can be sent directly in email or through ftp in text mode. Newlines can be CR, LF or CRLF (Unix, Macintosh or MS-DOS style). NOTE: If you modify the data for this notebook not in a Mathematica- compatible application, you must delete the line below containing the word CacheID, otherwise Mathematica-compatible applications may try to use invalid cache data. For more information on notebooks and Mathematica-compatible applications, contact Wolfram Research: web: http://www.wolfram.com email: info@wolfram.com phone: +1-217-398-0700 (U.S.) Notebook reader applications are available free of charge from Wolfram Research. ***********************************************************************) (*CacheID: 232*) (*NotebookFileLineBreakTest NotebookFileLineBreakTest*) (*NotebookOptionsPosition[ 10779, 292]*) (*NotebookOutlinePosition[ 11749, 322]*) (* CellTagsIndexPosition[ 11705, 318]*) (*WindowFrame->Normal*) Notebook[{ Cell[CellGroupData[{ Cell["\<\ MomCumConvert: A Package for Conversion Between Moments and \ Cumulants\ \>", "Title", FontSize->16], Cell["\<\ Qi Zheng National Center for Toxicological Research Jefferson, Arkansas 72079 April 20, 2001\ \>", "Text"], Cell["\<\ MomCumConvert is a package designed to produce formulae expressing \ statistical moments in terms of cumulants and vice versa. Two methods have \ been implemented in the package, a method based on Kendall's operator and an \ elementary method of equating coefficients of generating functions. The two \ methods produce the same formulae, but speed can vary depending on the \ particular formula to be generated. For implementation details, the reader is \ referred to Zheng (1998).\ \>", "Text"], Cell[BoxData[ \(<< MomCumConvert.m\)], "Input"], Cell["\<\ There is only one user function in this package: MomCumConvert[]. \ But five options of the function enable the user to choose what types of \ formulae to generate and which method to be used to generate them.\ \>", \ "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(\(?MomCumConvert\)\)], "Input"], Cell[BoxData[ \("MomCumConvert[\!\({n\_1,n\_2,...,n\_k}\)] produces a symbolic formula \ expressing the moment \!\(\[Mu]\_\(n\_1,n\_2,...,n\_k\)\) (or the cumulant \!\ \(\[Kappa]\_\(n\_1,n\_2,...,n\_k\)\)) in terms of cumulants (or \ moments)."\)], "Print"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(Options[MomCumConvert]\)], "Input"], Cell[BoxData[ \({MomentSymbol \[Rule] "m", CumulantSymbol \[Rule] "k", ForMoment \[Rule] True, Centered \[Rule] True, KendallMethod \[Rule] True}\)], "Output"] }, Open ]], Cell[TextData[{ "To demonstrate the use of MomCumConvert, we first produce the well-known \ formula ", Cell[BoxData[ \(TraditionalForm\`\(\(Var[ X] = \(\(E\)\([\)\(X\^2\)\)\)\(]\)\) - \((E[X])\)\^2\)]], ". " }], "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(MomCumConvert[{2}, ForMoment -> False, Centered -> False]\)], "Input"], Cell[BoxData[ \("k"[2] == \(-"m"[1]\^2\) + "m"[2]\)], "Output"] }, Open ]], Cell["\<\ We can use 2 formatting rules to display the formulae in standard \ notation.\ \>", "Text"], Cell[BoxData[{ \(\(Clear[K, M];\)\), "\n", \(\(Format[M[i___]] := Subscript[\[Mu], i];\)\), "\n", \(\(Format[K[i___]] := Subscript[\[Kappa], i];\)\)}], "Input"], Cell[CellGroupData[{ Cell[BoxData[ \(MomCumConvert[{2}, ForMoment -> False, Centered -> False, MomentSymbol -> M, CumulantSymbol -> K]\)], "Input"], Cell[BoxData[ \(\[Kappa]\_2 == \(-\[Mu]\_1\%2\) + \[Mu]\_2\)], "Output"] }, Open ]], Cell["\<\ Now we produce the last formula in equation (3.81) from the first \ volume of Kendall's Advanced Theory of Statistics (Stuart and \ Ord,1994).\ \>", "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(MomCumConvert[{3, 3}, ForMoment -> False, MomentSymbol -> M, CumulantSymbol -> K]\)], "Input"], Cell[BoxData[ \(\[Kappa]\_\(3, 3\) == 12\ \[Mu]\_\(1, 1\)\%3 + 18\ \[Mu]\_\(0, 2\)\ \[Mu]\_\(1, 1\)\ \[Mu]\_\(2, 0\) - 3\ \[Mu]\_\(1, 3\)\ \[Mu]\_\(2, 0\) - 9\ \[Mu]\_\(1, 2\)\ \[Mu]\_\(2, 1\) - 9\ \[Mu]\_\(1, 1\)\ \[Mu]\_\(2, 2\) - \[Mu]\_\(0, 3\)\ \[Mu]\_\(3, \ 0\) - 3\ \[Mu]\_\(0, 2\)\ \[Mu]\_\(3, 1\) + \[Mu]\_\(3, 3\)\)], "Output"] }, Open ]], Cell["\<\ As the following example demonstrates, the two methods always \ produce the same formula.\ \>", "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(MomCumConvert[{3, 1, 3}, ForMoment -> False, MomentSymbol -> M, CumulantSymbol -> K, KendallMethod -> True]\)], "Input"], Cell[BoxData[ \(\[Kappa]\_\(3, 1, 3\) == 36\ \[Mu]\_\(1, 0, 1\)\ \[Mu]\_\(1, 0, 2\)\ \[Mu]\_\(1, 1, 0\) + 36\ \[Mu]\_\(1, 0, 1\)\%2\ \[Mu]\_\(1, 1, 1\) + 18\ \[Mu]\_\(0, 1, 2\)\ \[Mu]\_\(1, 0, 1\)\ \[Mu]\_\(2, 0, 0\) + 18\ \[Mu]\_\(0, 1, 1\)\ \[Mu]\_\(1, 0, 2\)\ \[Mu]\_\(2, 0, 0\) + 6\ \[Mu]\_\(0, 0, 3\)\ \[Mu]\_\(1, 1, 0\)\ \[Mu]\_\(2, 0, 0\) + 18\ \[Mu]\_\(0, 0, 2\)\ \[Mu]\_\(1, 1, 1\)\ \[Mu]\_\(2, 0, 0\) - 3\ \[Mu]\_\(1, 1, 3\)\ \[Mu]\_\(2, 0, 0\) + 36\ \[Mu]\_\(0, 1, 1\)\ \[Mu]\_\(1, 0, 1\)\ \[Mu]\_\(2, 0, 1\) + 18\ \[Mu]\_\(0, 0, 2\)\ \[Mu]\_\(1, 1, 0\)\ \[Mu]\_\(2, 0, 1\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et al. (1972).\ \>", "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(MomCumConvert[{3, 1, 1}, Centered -> False, MomentSymbol -> M, CumulantSymbol -> K]\)], "Input"], Cell[BoxData[ \(\[Mu]\_\(3, 1, 1\) == \[Kappa]\_\(0, 0, 1\)\ \[Kappa]\_\(0, 1, 0\)\ \ \[Kappa]\_\(1, 0, 0\)\%3 + \[Kappa]\_\(0, 1, 1\)\ \[Kappa]\_\(1, 0, 0\)\%3 + 3\ \[Kappa]\_\(0, 1, 0\)\ \[Kappa]\_\(1, 0, 0\)\%2\ \[Kappa]\_\(1, 0, \ 1\) + 3\ \[Kappa]\_\(0, 0, 1\)\ \[Kappa]\_\(1, 0, 0\)\%2\ \[Kappa]\_\(1, 1, 0\ \) + 6\ \[Kappa]\_\(1, 0, 0\)\ \[Kappa]\_\(1, 0, 1\)\ \[Kappa]\_\(1, 1, 0\) + 3\ \[Kappa]\_\(1, 0, 0\)\%2\ \[Kappa]\_\(1, 1, 1\) + 3\ \[Kappa]\_\(0, 0, 1\)\ \[Kappa]\_\(0, 1, 0\)\ \[Kappa]\_\(1, 0, \ 0\)\ \[Kappa]\_\(2, 0, 0\) + 3\ \[Kappa]\_\(0, 1, 1\)\ \[Kappa]\_\(1, 0, 0\)\ \[Kappa]\_\(2, 0, \ 0\) + 3\ \[Kappa]\_\(0, 1, 0\)\ \[Kappa]\_\(1, 0, 1\)\ \[Kappa]\_\(2, 0, 0\) \ + 3\ \[Kappa]\_\(0, 0, 1\)\ \[Kappa]\_\(1, 1, 0\)\ \[Kappa]\_\(2, 0, 0\) + 3\ \[Kappa]\_\(1, 1, 1\)\ \[Kappa]\_\(2, 0, 0\) + 3\ \[Kappa]\_\(0, 1, 0\)\ \[Kappa]\_\(1, 0, 0\)\ \[Kappa]\_\(2, 0, \ 1\) + 3\ \[Kappa]\_\(1, 1, 0\)\ \[Kappa]\_\(2, 0, 1\) + 3\ \[Kappa]\_\(0, 0, 1\)\ \[Kappa]\_\(1, 0, 0\)\ \[Kappa]\_\(2, 1, \ 0\) + 3\ \[Kappa]\_\(1, 0, 1\)\ \[Kappa]\_\(2, 1, 0\) + 3\ \[Kappa]\_\(1, 0, 0\)\ \[Kappa]\_\(2, 1, 1\) + \[Kappa]\_\(0, 0, 1\ \)\ \[Kappa]\_\(0, 1, 0\)\ \[Kappa]\_\(3, 0, 0\) + \[Kappa]\_\(0, 1, 1\)\ \ \[Kappa]\_\(3, 0, 0\) + \[Kappa]\_\(0, 1, 0\)\ \[Kappa]\_\(3, 0, 1\) + \ \[Kappa]\_\(0, 0, 1\)\ \[Kappa]\_\(3, 1, 0\) + \[Kappa]\_\(3, 1, 1\)\)], \ "Output"] }, Open ]], Cell[CellGroupData[{ Cell["References", "Section"], Cell["\<\ A. Stuart and J.K. Ord, Kendall's Advanced Theory of Statistics, \ Vol. 1: Distribution Theory, Sixth edition, Edward Arnold, London, 1994. J. Kratky, J. Reinfelds, K. Hutcheson and L.R. Shenton, Tables of crude \ moments expressed in terms of cumulants, Technical report, The University of \ Georgia, Athens, Georgia, 1972. Q. Zheng, Computing relations between statistical moments and cumulants, \ Proceedings of the Computational Statistics Section, American Statistical \ Association, pp. 165-170, 1998.\ \>", "Text"] }, Open ]] }, Open ]] }, FrontEndVersion->"4.0 for X", ScreenRectangle->{{0, 1280}, {0, 1024}}, WindowSize->{1029, 600}, WindowMargins->{{Automatic, 102}, {Automatic, 42}}, PrintingPageRange->{Automatic, Automatic}, PrintingOptions->{"PaperSize"->{612, 792}, "PaperOrientation"->"Portrait", "PostScriptOutputFile":>FrontEnd`FileName[{$RootDirectory, "var", "home", \ "qzheng", "mom2000"}, "testImprov4.nb.ps", CharacterEncoding -> "ISO8859-1"], "Magnification"->1}, StyleDefinitions -> "QiScreen.nb" ] (*********************************************************************** Cached data follows. If you edit this Notebook file directly, not using Mathematica, you must remove the line containing CacheID at the top of the file. The cache data will then be recreated when you save this file from within Mathematica. ***********************************************************************) (*CellTagsOutline CellTagsIndex->{} *) (*CellTagsIndex CellTagsIndex->{} *) (*NotebookFileOutline Notebook[{ Cell[CellGroupData[{ Cell[1739, 51, 112, 4, 82, "Title"], Cell[1854, 57, 116, 5, 98, "Text"], Cell[1973, 64, 507, 8, 98, "Text"], Cell[2483, 74, 51, 1, 29, "Input"], Cell[2537, 77, 235, 5, 56, "Text"], Cell[CellGroupData[{ Cell[2797, 86, 51, 1, 29, "Input"], Cell[2851, 89, 261, 4, 53, "Print"] }, Open ]], Cell[CellGroupData[{ Cell[3149, 98, 55, 1, 29, "Input"], Cell[3207, 101, 177, 3, 55, "Output"] }, Open ]], Cell[3399, 107, 245, 7, 36, "Text"], Cell[CellGroupData[{ Cell[3669, 118, 90, 1, 29, "Input"], Cell[3762, 121, 67, 1, 36, "Output"] }, Open ]], Cell[3844, 125, 102, 3, 35, "Text"], Cell[3949, 130, 174, 3, 67, "Input"], Cell[CellGroupData[{ Cell[4148, 137, 137, 2, 29, "Input"], Cell[4288, 141, 76, 1, 38, "Output"] }, Open ]], Cell[4379, 145, 166, 4, 35, "Text"], Cell[CellGroupData[{ Cell[4570, 153, 121, 2, 29, "Input"], Cell[4694, 157, 384, 7, 64, "Output"] }, Open ]], Cell[5093, 167, 114, 3, 35, "Text"], Cell[CellGroupData[{ Cell[5232, 174, 147, 2, 48, "Input"], Cell[5382, 178, 1414, 24, 165, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[6833, 207, 148, 2, 48, "Input"], Cell[6984, 211, 1414, 24, 165, "Output"] }, Open ]], Cell[8413, 238, 137, 3, 35, "Text"], Cell[CellGroupData[{ Cell[8575, 245, 123, 2, 29, "Input"], Cell[8701, 249, 1446, 21, 146, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[10184, 275, 29, 0, 54, "Section"], Cell[10216, 277, 535, 11, 161, "Text"] }, Open ]] }, Open ]] } ] *) (*********************************************************************** End of Mathematica Notebook file. ***********************************************************************)