MathGroup Archive 2011

[Date Index] [Thread Index] [Author Index]

Search the Archive

FullSimplify TransformedDistribution

  • To: mathgroup at smc.vnet.net
  • Subject: [mg120009] FullSimplify TransformedDistribution
  • From: paulvonhippel at yahoo <paulvonhippel at yahoo.com>
  • Date: Tue, 5 Jul 2011 05:10:49 -0400 (EDT)

Here's some behavior in Mathematica 8.0.0.0 that doesn't make sense to
me. Using TransformedDistribution, I want to find the mean of a scaled
F distribution. The answer depends on the argument df. When I replace
df with n_obs - 1, I get a nice simplified answer. But when I replace
df with n_obs + 1, the answer doesn't simplify. From hand calculations
I know that the answers are equally simple. Why is Mathematica
simplifying the first answer but not the second? I am aware I should
upgrade to 8.0.1, but I'm not sure that will fix the problem.

Input and output are pasted below -- I welcome suggestions about how
to fomat the pasted output more cleanly.

In[126]:= Subscript[\[Sigma]2, BD] :=
 TransformedDistribution[((Subscript[n, obs] - 1)/df) Subscript[F,
   BD], Subscript[F, BD] \[Distributed]
   FRatioDistribution[Subscript[n, obs] - 1, df]]

In[127]:= Mean[Subscript[\[Sigma]2, BD]] /. df -> Subscript[n, obs] -
1

Out[127]= \!\(\*
TagBox[GridBox[{
{"\[Piecewise]", GridBox[{
{
FractionBox[
RowBox[{
RowBox[{"-", "1"}], "+",
SubscriptBox["n", "obs"]}],
RowBox[{
RowBox[{"-", "3"}], "+",
SubscriptBox["n", "obs"]}]],
RowBox[{
RowBox[{
RowBox[{"-", "1"}], "+",
SubscriptBox["n", "obs"]}], ">", "2"}]},
{"Indeterminate",
TagBox["True",
"PiecewiseDefault",
AutoDelete->True]}
},
AllowedDimensions->{2, Automatic},
Editable->True,
GridBoxAlignment->{
        "Columns" -> {{Left}}, "ColumnsIndexed" -> {},
         "Rows" -> {{Baseline}}, "RowsIndexed" -> {}},
GridBoxItemSize->{
        "Columns" -> {{Automatic}}, "ColumnsIndexed" -> {},
         "Rows" -> {{1.}}, "RowsIndexed" -> {}},
GridBoxSpacings->{"Columns" -> {
Offset[0.27999999999999997`], {
Offset[0.84]},
Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> {
Offset[0.2], {
Offset[0.4]},
Offset[0.2]}, "RowsIndexed" -> {}},
Selectable->True]}
},
GridBoxAlignment->{
     "Columns" -> {{Left}}, "ColumnsIndexed" -> {},
      "Rows" -> {{Baseline}}, "RowsIndexed" -> {}},
GridBoxItemSize->{
     "Columns" -> {{Automatic}}, "ColumnsIndexed" -> {},
      "Rows" -> {{1.}}, "RowsIndexed" -> {}},
GridBoxSpacings->{"Columns" -> {
Offset[0.27999999999999997`], {
Offset[0.35]},
Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> {
Offset[0.2], {
Offset[0.4]},
Offset[0.2]}, "RowsIndexed" -> {}}],
"Piecewise",
DeleteWithContents->True,
Editable->False,
SelectWithContents->True,
Selectable->False]\)

In[128]:= Mean[Subscript[\[Sigma]2, BD]] /. df -> Subscript[n, obs] +
1

Out[128]= Mean[
 TransformedDistribution[(\[FormalX] (-1 + Subscript[n, obs]))/(
  1 + Subscript[n, obs]), \[FormalX] \[Distributed]
   FRatioDistribution[-1 + Subscript[n, obs], 1 + Subscript[n, obs]]]]


  • Prev by Date: Re: Trying to use ReplacePart
  • Next by Date: Re: Can I use NonlinearModelFit to model some data with a
  • Previous by thread: GoogleDocsLink upgrade 1.1: Google Calendar
  • Next by thread: Re: FullSimplify TransformedDistribution