Thread View: sci.math.stat
2 messages
2 total messages
Started by Bill Hart
Sun, 27 Sep 1992 15:06
Generating Cauchy deviates
Author: Bill Hart
Date: Sun, 27 Sep 1992 15:06
Date: Sun, 27 Sep 1992 15:06
14 lines
936 bytes
936 bytes
Can anyone point me to some code for generating samples with the Cauchy distribution? I've browsed through statlib, but I didn't see anything that had this distribution? More generally, could people recommend (a) public domain packages which have routines for generating various distributions [I've looked at ranlib, but it doesn't have Cauchy deviates] or (b) a text which describes how to do this sort of thing [I've looked in Numerical Recipies, but it has a very limited selection of distributions]. I'll summarize my responses to the net. Thanks in advance! --Bill
Re: Generating Cauchy deviates
Author: J A Stephen Viggiano
Date: Tue, 29 Sep 1992 14:42
Date: Tue, 29 Sep 1992 14:42
14 lines
1253 bytes
1253 bytes
In article <38663@sdcc12.ucsd.edu> whart@cs.ucsd.edu (Bill Hart) writes: >Can anyone point me to some code for generating samples with the Cauchy >distribution? I've browsed through statlib, but I didn't see anything >that had this distribution? 1. Generate a uniformly-distributed random variable between -pi and pi. 2. Take the tangent of this quantity. The result will be distributed with a Cauchy distribution with a median of zero and a first-to-third quartile range of two. (Both the mean and variance are undefined.) You can adjust these two quantities by multiplying or dividing (to adjust the first-to-third quartile range) and then adding or subtracting (which adjusts the median).
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads