# Cauchy Distribution in R [closed]

Cauchy distribution. Draw 1000 sets of numbers from the Cauchy distribution using set.seed(100). Do this for set size 2, 5, 10 and 20. Compute the median of each set (use a matrix and apply()). Study the distribution of the medians, for each set size.

• Programming questions are off topic here. Consider highlighting the statistical aspect of your problem if there is any. – Richard Hardy Aug 29 at 11:58

$$y = \frac{1}{2} + \frac{1}{\pi}\arctan(x) \iff x = \tan(\pi y - \pi/2)$$
Or you enter ?rcauchy in R ;-)