# Asymetric Distribution

1. Oct 15, 2014

### gaby287

I have an asymetric probability distribution function (pdf), in this case we know that the concept of an error bar does not seem appropriate. Well I'm finding the shortest interval that enclosed the 68% of probability. My problem is that my pdf couldn't be integrated analytically and I'm using Mathematica but I don't know how to find the intervals.

2. Oct 15, 2014

### FactChecker

I'm not familiar with mathematica, but here are my two cents:
Since there is no analytic way to solve it, a search technique will have to be used. Here is one simple-minded approach.
1) Generate the cumulative distribution function (use EmpiricalDistribution?)
2) Start with the lower interval point at the lower limit of the distribution (within reason) and with the upper interval point one step above the lower. Keep increasing the upper interval point till you get 68% in between lower and upper. Pick a step size that will give you the accuracy you want. If you want to get fancy, you may be able to get an answer with a large step size and then reduce the size to refine your answer.
3) Increase the lower point up one step and increase the upper point (if necessary) step by step till you again get 68% in between lower and upper. If it is a shorter interval, record it.
4) Keep repeating step 3 till the upper interval point hits the upper limit of the distribution (within reason).