+ Reply to Thread
Results 1 to 5 of 5

Thread: How to alter the standard deviation of an empirical distribution?

  1. #1
    Points: 7,821, Level: 59
    Level completed: 36%, Points required for next Level: 129

    Posts
    159
    Thanks
    1
    Thanked 7 Times in 7 Posts

    How to alter the standard deviation of an empirical distribution?




    For the purpose of a simulation I need to increase the standard deviation of an empirical distribution. I want to simulate what will happen if the distribution would widen. How can I do that?

    I am already aware, that the empirical distribution is usually replaced by a similar analytical distribution in a simulation. However my empirical distribution is so "unusual", that I cannot find a analytical distribution pendant.
    Prediction is very difficult, especially about the future. (Niels Bohr)

  2. #2
    Devorador de queso
    Points: 95,705, Level: 100
    Level completed: 0%, Points required for next Level: 0
    Awards:
    Posting AwardCommunity AwardDiscussion EnderFrequent Poster
    Dason's Avatar
    Location
    Tampa, FL
    Posts
    12,931
    Thanks
    307
    Thanked 2,629 Times in 2,245 Posts

    Re: How to alter the standard deviation of an empirical distribution?

    Multiply every value by a constant
    I don't have emotions and sometimes that makes me very sad.

  3. #3
    Points: 7,821, Level: 59
    Level completed: 36%, Points required for next Level: 129

    Posts
    159
    Thanks
    1
    Thanked 7 Times in 7 Posts

    Re: How to alter the standard deviation of an empirical distribution?

    Quote Originally Posted by Dason View Post
    Multiply every value by a constant
    Interesting, I have thought about the same transformation. Multiplying each x- median(x) by a certain factor and adding back the median afterwards. Before I have thought about multiplying each x- mean(x) by a certain factor and adding back the mean afterwards, but the median would be more appropriate for a skewed distribution, I think.

    The simulation I want to do is about to simulate the risk of a portfolio out of special securities. The returns of the securities in the portfolio have unusual dsitributions. For my simulation it is necessary, that I can increase the standard deviation of each empirical return distribution by a certain proportion, e.g. by 10%.

    Unfortunatley the standard deviation does not increase by 10% when multiplying each value by 1.1 as mentioned above. I need some kind of converging algorithm, that produces a transformed empirical distribution with my target standard deviation.

    Is it possible to make use of the Newton–Raphson method to construct a converging algorithm that produces the desired target standard deviation within a given tolerance?
    Last edited by consuli; 02-21-2015 at 02:48 PM.
    Prediction is very difficult, especially about the future. (Niels Bohr)

  4. #4
    Devorador de queso
    Points: 95,705, Level: 100
    Level completed: 0%, Points required for next Level: 0
    Awards:
    Posting AwardCommunity AwardDiscussion EnderFrequent Poster
    Dason's Avatar
    Location
    Tampa, FL
    Posts
    12,931
    Thanks
    307
    Thanked 2,629 Times in 2,245 Posts

    Re: How to alter the standard deviation of an empirical distribution?

    Quote Originally Posted by consuli View Post
    Unfortunatley the standard deviation does not increase by 10% when multiplying each value by 1.1 as mentioned above.

    Are you sure?

    Code: 
    > j <- rexp(30)
    > sd(j)
    [1] 0.886905
    > sd(1.1*j)
    [1] 0.9755955
    > sd(j)*1.1
    [1] 0.9755955
    Mathematically if you multiply all the values by a certain constant then the standard deviation will increase multiplicatively by that constant
    I don't have emotions and sometimes that makes me very sad.

  5. #5
    Points: 7,821, Level: 59
    Level completed: 36%, Points required for next Level: 129

    Posts
    159
    Thanks
    1
    Thanked 7 Times in 7 Posts

    Re: How to alter the standard deviation of an empirical distribution?


    Thanks Dason. I did not know before that
    multiply all the values by a certain constant then the standard deviation will increase multiplicatively by that constant
    .

    At the moment my favorite transformation is

    xt2= (x- mean(x))* 2 + mean(x)

    as it produces multiple standard deviation while conserving mean and skewness.

    Code: 
    ##### Setup
    
    skew= function(x) {
      n= length(x)
      n/(n-1)/(n-2) * sum( ((x- mean(x))/sd(x))^3) }
    
    #####
    
    x= rgamma(1000, shape=3, scale = 1)
    
    xt1= x* 2
    xt2= (x- mean(x))* 2 + mean(x)
    
    # Control
    sd(x)
    sd(xt1)
    sd(xt2)
    skew(x)
    skew(xt1)
    skew(xt2)
    mean(x)
    mean(xt1)
    mean(xt2)
    Prediction is very difficult, especially about the future. (Niels Bohr)

+ Reply to Thread

           




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts






Advertise on Talk Stats