Uniform Ratio Distribution

Author

Eric W. Weisstein
January 10, 2005

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

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

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

Derivation

v5.0

Integrate[DiracDelta[x/y-z],{x,0,1},{y,0,1}]

Integrate[Abs[y]DiracDelta[x-z y],{x,0,1},{y,0,1}]

FullSimplify[%,z>0]

v5.1

Integrate[DiracDelta[x/y-u],{x,0,1},{y,0,1}]

Integrate[Abs[y]DiracDelta[x-u y],{x,0,1},{y,0,1}]

FullSimplify[%,u>0]

PiecewiseExpand[%]

(1/2) (((UnitStep[-1+u])/(u^2))+UnitStep[1-u,u])/.u->1

Integrate[Abs[y]DiracDelta[x-u y],{x,0,1},{y,0,1}]/.u->1

Integrate[Abs[y]DiracDelta[x-y],{x,0,1},{y,0,1}]/.u->1

V5.2

$Version

Integrate[DiracDelta[x/y-u],{x,0,1},{y,0,1},Assumptions->u>0]

V6

$Version

Integrate[DiracDelta[x/y-u],{x,0,1},{y,0,1},Assumptions->u>0]

V7

$Version

Integrate[DiracDelta[x/y-u],{x,0,1},{y,0,1},Assumptions->u>0]

Moments

P[u_]:=Piecewise[{{1/2,0<=u<=1},{1/(2*u^2),u>1}},0]

Normalization

V5.2

Integrate[P[u],{u,0,∞}]

V7

Integrate[P[u],{u,0,∞}]

Mean

V5.1

Integrate[u P[u],{u,0,∞}]

Integrate[Piecewise[{{u/2,0<=u<=1},{1/(2u),u>1}},0],{u,0,∞}]

Integrate[1/(2u),{u,1,∞}]

V7

Integrate[u P[u],{u,0,∞}]

Integrate[u P[u],{u,0,∞},Assumptions->#]&/@{0≤u≤1,u>1}

Integrate[Simplify[u P[u],#],{u,0,∞}]&/@{0≤u≤1,u>1}

Variance

Integrate[u^2 P[u],{u,0,∞}]

Plot

<<Utilities`Typesetting`

Plot[(1/2) (((UnitStep[-1+z])/(z^2))+UnitStep[z,1-z]),{z,-.2,4},PlotStyle->Red,AxesLabel->TraditionalForm/@{u, (Subscript[P, InlineFraction[(Subscript[X, 1]),(Subscript[X, 2])]])[u]}]

a=Table[Random[],{10^6}];
b=Table[Random[],{10^6}];

BarChart[BinCounts[a/b,{0,4,.1}],PlotRange->All,BarSpacing->0]