Skip to content

CauchyDistribution ​

The Cauchy distribution with location aa and scale bb — heavy-tailed enough that its mean and variance don't exist.

CauchyDistribution(a, b)an inert distribution object — carries a,ba, b, unevaluated.
CauchyDistribution()the standard Cauchy distribution, a=0,b=1a=0, b=1.
Typed signatures
TypePackageApplies
(real?, real<0..>?) -> distributionstatisticsalways

Domain: Statistics

Details
  • PDF(x)=1/(πb(1+((x−a)/b)2))PDF(x) = 1/(\pi b(1+((x-a)/b)^2)), exact.
  • CDF(x)=1/2+arctan⁡((x−a)/b)/πCDF(x) = 1/2 + \arctan((x-a)/b)/\pi, exact — added in the batch that also filled the matching gap for StudentTDistribution and HypergeometricDistribution (each has its own closed or exact-finite-sum form; none shares a formula with Cauchy).
  • MeanMean and VarianceVariance are Indeterminate — they genuinely do not exist for this distribution, matching Wolfram.
  • CharacteristicFunction(t)=eiat−b∣t∣(t) = e^{iat-b|t|}, exact. No MomentGeneratingFunction — E[etX]E[e^{tX}] diverges for any t≠0t\neq0, a genuine fact about this distribution, not a gap.
  • RandomVariate samples via inverse transform: a+btan⁡(π(U−1/2))a + b\tan(\pi(U-1/2)).

Examples

Basic #
live ↗
InPDF⁡(CauchyDistribution(0,1),0)\operatorname{PDF}(\mathrm{CauchyDistribution}(0, 1), 0)Out1π\frac{1}{π}
live ↗
InCDF⁡(CauchyDistribution(0,1),1)\operatorname{CDF}(\mathrm{CauchyDistribution}(0, 1), 1)Out34\frac{3}{4}
live ↗
InCauchyDistribution()\mathrm{CauchyDistribution}()OutCauchyDistribution(0,1)\mathrm{CauchyDistribution}(0, 1)
Possible issues #
live ↗
Inmean(CauchyDistribution(0,1))\mathrm{mean}(\mathrm{CauchyDistribution}(0, 1))OutIndeterminate⁡\operatorname{Indeterminate}
About
Examples4

See also: StudentTDistribution, LaplaceDistribution, CharacteristicFunction, PDF