I have a set of values randomly distributed in interval [a, b]. How to set a threshold a < c < b such that 80% values of this set are in [a, c]? Supposed that a = minimum value and b = maximum value of this set.
            Asked
            
        
        
            Active
            
        
            Viewed 1,331 times
        
    0
            
            
        - 
                    Lookup some examples of [generating random sampled data with skew](http://stackoverflow.com/questions/9858290/random-variable-from-skewed-distribution-with-scipy) – Cory Kramer Sep 09 '14 at 13:18
- 
                    Do you need values in [a,c] to follow a uniform distribution ? Same with numbers in ]c,b] ? – giant_teapot Sep 09 '14 at 13:20
- 
                    the dataset was generated before! – user2863620 Sep 09 '14 at 13:27
- 
                    Sorry, totally misread your question ! :o Thought you vere trying to *generate* a dataset with such properties. – giant_teapot Sep 09 '14 at 13:42
1 Answers
3
            
            
        What you are asking is the 80th percentile of your data set.
There are some code suggestions (both NumPy/SciPy and pure Python) in How do I calculate percentiles with python/numpy?
 
     
    