Normal Ratio Distribution

Author

Eric W. Weisstein
November 3, 2003

This notebook downloaded from http://mathworld.wolfram.com/notebooks/Statistics/NormalRatioDistribution.nb.

For more information, see Eric's MathWorld entry http://mathworld.wolfram.com/NormalRatioDistribution.html.

©2005 Wolfram Research, Inc. except for portions noted otherwise

Derivation

Integrate[((Exp[-(x-μx)^2/(2σx^2)])/(σx Sqrt[2π]))((Exp[-(y-μy)^2/(2σy^2)])/(σy Sqrt[2π]))Abs[y]DiracDelta[x-y z],{x,-∞,∞},{y,-∞,∞},Assumptions->σx>0&&σy>0]

FullSimplify[%38,σx>0&&σy>0&&z∈Reals]

FullSimplify[-(1/(2 π (((σx)^2)+(z^2) ((σy)^2))))((E^(-(1/2) ((((μx)^2)/((σx)^2))+(((μy)^2)/((σy)^2))))) σx σy (-2+(E^((((μy ((σx)^2)+z μx ((σy)^2)))^2)/(2 ((σx)^2) ((σy)^2) (((σx)^2)+(z^2) ((σy)^2))))) (Sqrt[2 π]) Abs[PowerExpand[(Sqrt[((((μy ((σx)^2)+z μx ((σy)^2)))^2)/(((σx)^2) ((σy)^2) (((σx)^2)+(z^2) ((σy)^2))))]) ]]Erfc[((Abs[PowerExpand[(Sqrt[((((μy ((σx)^2)+z μx ((σy)^2)))^2)/(((σx)^2) ((σy)^2) (((σx)^2)+(z^2) ((σy)^2))))])]])/(Sqrt[2]))])),σx>0&&σy>0&&z∈Reals]

%/.{μx->0,μy->0}

With[{μx=0,μy=0},Integrate[((Exp[-(x-μx)^2/(2σx^2)])/(σx Sqrt[2π]))((Exp[-(y-μy)^2/(2σy^2)])/(σy Sqrt[2π]))Abs[y]DiracDelta[x-y z],{x,-∞,∞},{y,-∞,∞},Assumptions->σx>0&&σy>0]
]

Factor[%45]

Plot

<<Typesetting`

Plot[1/π/(x^2+1),{x,-5,5},PlotStyle->Red,
AxesLabel->TraditionalForm/@{x,(Subscript[P, InlineFraction[X,Y]])[x]}]

<<Statistics`DataManipulation`
<<Graphics`Graphics`

data=Sqrt[-2Log[#1]]Through[{Cos,Sin}[2π#2]]&@@@Table[Random[],{10^5},{2}];

BarChart[BinCounts[Divide@@@data,{-5,5,.1}],PlotRange->All,BarSpacing->0]