# Standard Deviation of Cauchy distribution on a given interval

In general Cauchy distribution doesn't have standard deviation defined, though it should be possible to calculate it for a given interval.

This is the formula that I'm trying to use: PDF for Cauchy is The mean for Cauchy is 0, so taking 0.4 as a scale and [-3;3] as interval we get an integral Which gives a value of 0.6174 = (0.7858)^2

But when I generate any number of Cauchy values with scale 0.4 (I was trying to generate 10,000 and 10,000,000 numbers - it didn't matter) and filter-out all the numbers which absolute value is greater than 3 it always gives me SD = 0.8198 which is completely different.

Any ideas on what am I doing wrong? Sorry to ask such a silly question.

• You are looking at a truncated Cauchy distribution. That means you need to recalculate the normalizing constant for the PDF. That is, you need to divide the untruncated pdf by $P( -3 < T < 3)$. Once you use this new normalizing constant, your formula for the standard deviation should work out. – Cliff AB Apr 27 '18 at 5:12
• Could you please clarify what you mean by "normalizing constant"? – andkorsh Apr 27 '18 at 5:22
• A constant that you multiple the PDF by to insure that it integrates to 1. See here. – Cliff AB Apr 27 '18 at 5:31
• Unless you normalize to make the distribution a true truncated Cauchy it is not appropriate to call the integral a variance. – Michael R. Chernick Apr 27 '18 at 5:35
• Actually by "truncated Cauchy distribution" I've found a paper which gives another PDF (even without PI in it) and by integrating this I've managed to get the required number. Thanks a lot! projecteuclid.org/download/pdfview_1/euclid.bjps/1291387776 – andkorsh Apr 27 '18 at 5:46

$$\delta = -\frac{\gamma (arctan(\frac{A}{\gamma})*\gamma-A)}{arctan(\frac{A}{\gamma})}$$
$$MAD = \frac{\gamma*ln(\frac{\gamma^2+A^2}{\gamma^2})}{2*arctan(\frac{A}{\gamma})}$$