Exercise 23.1 - Sampling from a Cauchy

Answers

Recall that the p.d.f. of a standard Cauchy 𝒯 ( x | 0 , 1 , 1 ) is:

𝒯 ( x | 0 , 1 , 1 ) = 1 Z 1 1 + x 2 ,

where:

Z = 1 1 + x 2 d x = arctan x | = π .

Thus the c.d.f. is:

F ( x ) = x 1 π ( 1 + t 2 ) d t = arctan x + π 2 π ,

whose inverse is:

tan [ π ( p 1 2 ) ] .

So we can sample p from Uniform [ 1 2 , 1 2 ] and transform it by tan ( 𝜋𝑝 ) , the result would follow a standard Cauchy.

User profile picture
2021-03-24 13:42
Comments