+ Reply to Thread
Results 1 to 12 of 12

Thread: What does the forumla Σ(x-xbar)/((n-1)v^(3/2)) calculate?

  1. #1
    Points: 2,634, Level: 31
    Level completed: 23%, Points required for next Level: 116

    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question What does the forumla Σ(x-xbar)/((n-1)v^(3/2)) calculate?




    What does the following formula calculate?



    Thanks

  2. #2
    Super Moderator
    Points: 13,151, Level: 74
    Level completed: 76%, Points required for next Level: 99
    Dragan's Avatar
    Location
    Illinois, US
    Posts
    2,014
    Thanks
    0
    Thanked 223 Times in 192 Posts
    Quote Originally Posted by tuna View Post
    What does the following formula calculate?



    Thanks
    Why don't you just express the formula as:

    Xbar / v^(3/2).

    That said, you should also indicate what "v" represents.....e.g. Variance???...you tell me.

  3. #3
    TS Contributor
    Points: 5,012, Level: 45
    Level completed: 31%, Points required for next Level: 138
    Martingale's Avatar
    Location
    Ohio
    Posts
    395
    Thanks
    0
    Thanked 1 Time in 1 Post
    Quote Originally Posted by Dragan View Post
    Quote Originally Posted by tuna View Post
    What does the following formula calculate?



    Thanks
    Why don't you just express the formula as:

    Xbar / v^(3/2).

    That said, you should also indicate what "v" represents.....e.g. Variance???...you tell me.
    I didn't know about that site...pretty cool



    I always wanted to use latex on this forum.
    Dr. Zoidberg: Fry, it's been years since medical school, so remind me. Disemboweling in your species, fatal or non-fatal?

  4. #4
    Super Moderator
    Points: 13,151, Level: 74
    Level completed: 76%, Points required for next Level: 99
    Dragan's Avatar
    Location
    Illinois, US
    Posts
    2,014
    Thanks
    0
    Thanked 223 Times in 192 Posts
    Quote Originally Posted by Martingale View Post
    I didn't know about that site...pretty cool



    I always wanted to use latex on this forum.
    Yeah...me too!...I didn't see this...Thanks for mentioning this.

  5. #5
    Points: 2,634, Level: 31
    Level completed: 23%, Points required for next Level: 116

    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Apologies - was in a rush. I actually meant:


    Where


    Thanks

  6. #6
    Super Moderator
    Points: 13,151, Level: 74
    Level completed: 76%, Points required for next Level: 99
    Dragan's Avatar
    Location
    Illinois, US
    Posts
    2,014
    Thanks
    0
    Thanked 223 Times in 192 Posts
    Quote Originally Posted by tuna View Post
    Apologies - was in a rush. I actually meant:


    Where


    Thanks

    It's an estimation of the skewness of a set of data.

  7. #7
    Points: 2,634, Level: 31
    Level completed: 23%, Points required for next Level: 116

    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Precisely what type of skewness does it measure? I was especially wondering if there was a Mathematica function to calculate this. Thanks

  8. #8
    Super Moderator
    Points: 13,151, Level: 74
    Level completed: 76%, Points required for next Level: 99
    Dragan's Avatar
    Location
    Illinois, US
    Posts
    2,014
    Thanks
    0
    Thanked 223 Times in 192 Posts
    Quote Originally Posted by tuna View Post
    Precisely what type of skewness does it measure? I was especially wondering if there was a Mathematica function to calculate this. Thanks

    If you're using Mathematica version 7.0 then use:


    Code: 
    
    In[8]:= data = {2., 4, 3, 7, 8, 10, 12, 6, 17};
    x = Skewness[data]
    
    
    Out[9]= 0.695634

  9. #9
    Points: 2,634, Level: 31
    Level completed: 23%, Points required for next Level: 116

    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts
    But the Mma Skewness[] function and the formula I gave:



    give different values. For example, using the 2 following functions to return the list {variance, skewness} with 2 different methods, I get 2 different answers for the skewness:

    In:
    |fn6[x_] := Module[{xbar, n, v},
    | n = Length[x];
    | {v = If[n == 1, 0,
    | xbar = Apply[Plus, x]/n;
    | Apply[Plus, (x - xbar)^2]/(n - 1)
    | ],
    | If[v == 0, Indeterminate,
    | Apply[Plus, (x - xbar)^3]/((n - 1)*v^(3/2))
    | ]
    | }
    | ];
    |
    |fn7[x_] := {Variance[x], Skewness[x]}
    |
    |N[fn6[Range[20]^2]]
    |N[fn7[Range[20]^2]]

    Out:
    |{16359., 0.592322}
    |{16359., 0.60771}

    What's the problem?

    Thanks

  10. #10
    Super Moderator
    Points: 13,151, Level: 74
    Level completed: 76%, Points required for next Level: 99
    Dragan's Avatar
    Location
    Illinois, US
    Posts
    2,014
    Thanks
    0
    Thanked 223 Times in 192 Posts
    Quote Originally Posted by tuna View Post

    What's the problem?

    Thanks
    Easy to answer.

    Mathematica is doing this (slightly different)

    Code: 
    
    data = {2., 4, 3, 7, 8, 10, 12, 6, 17};
    m = Mean[data];
    m2 = Mean[(data - m)^2];
    m3 = Mean[(data - m)^3];
    s = Sqrt[m2];
    
    skew = m3/s^3


    The method that Mathematica is using (and your formula) is based on Method of Moments.

    On the other hand, if you consider using SAS, SPSS, or Minitab, the calculation is based on Fisher's k-statistics.

    More specifically, suppose we have a set N data points that we standardize to Z-scores (Z).

    Then, the skewness is computed as:

    [N^2 / ( N (N-1) (N-2) ) ] * Z^3

    Most commercial software packages, today, compute skewness (kurtosis) based on Fisher's k-statistics and not based on the method of moments (i.e. what Mathematica does and the formula you suggested).

  11. #11
    Points: 2,634, Level: 31
    Level completed: 23%, Points required for next Level: 116

    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks. So is my Mma function for skewness (based on the method of moments) the most efficient way to have coded it?

  12. #12
    Super Moderator
    Points: 13,151, Level: 74
    Level completed: 76%, Points required for next Level: 99
    Dragan's Avatar
    Location
    Illinois, US
    Posts
    2,014
    Thanks
    0
    Thanked 223 Times in 192 Posts

    Quote Originally Posted by tuna View Post
    Thanks. So is my Mma function for skewness (based on the method of moments) the most efficient way to have coded it?

    I think you should use values of skewness (kurtosis) that people are used to now days.

    Here's my Mma function that computes the third (skewness), fourth (kurtosis), fifth, and sixth standardized cumulants. The values you will obtain for skew and kurtosis are the same as you get using SAS, SPSS, SPLUS, Minitab,...etc.

    Code: 
    
    EmpiricalCumulantsK[data_List] := 
     Module[{stdata, n, s2, s3, s4, s5, s6, gamma3, gamma4, gamma5, 
       gamma6, cumulants},
    
      stdata = (data - Mean[data])/StandardDeviation[data];
      n = Length[data];
      s2 = n - 1;
      s3 = Total[stdata^3];
      s4 = Total[stdata^4];
      s5 = Total[stdata^5];
      s6 = Total[stdata^6];
    
      Print[ "Standardized third, fourth, fifth, and sixth cumulants \
    based on Fisher's k-statistics."];
    
      gamma3 = 1/(n*(n - 1)*(n - 2))*(n^2*s3);
      
    gamma4 = 
       1/(n*(n - 1)*(n - 2)*(n - 3))*( (n^3 + n^2)*s4 - 
          3*(n^2 - n)* s2^2 );
     
     gamma5 = 
       1/(n*(n - 1)*(n - 2)*(n - 3)*(n - 4))* ((n^4 + 5*n^3)*s5 - 
          10*(n^3 - n^2)* s3*s2 );
     
     gamma6 = 
       1/(n*(n - 1)*(n - 2)*(n - 3)*(n - 4)*(n - 
            5))*( ( n^5 + 16*n^4 + 11*n^3 - 4*n^2)*s6 - 
           15*n*(n - 1)^2*(n + 4)*s4*s2 - 
           10*(n^4 - 2*n^3 + 5*n^2 - 4*n)* s3^2 + 
           30*(n^3 - 3*n^2 + 2*n)*s2^3 ) ;
    
      cumulants = {gamma3, gamma4, gamma5, gamma6}  ]

+ Reply to Thread

           




Similar Threads

  1. How to re-calculate?
    By Ullii in forum SPSS
    Replies: 2
    Last Post: 11-30-2010, 03:41 PM
  2. How to calculate P-value?
    By SadieKhan in forum Statistics
    Replies: 4
    Last Post: 11-12-2010, 02:53 PM
  3. finding xbar
    By sosme in forum Statistics
    Replies: 0
    Last Post: 10-17-2010, 05:13 PM
  4. Finding Probability Xbar?
    By greenpumpkins in forum Statistics
    Replies: 1
    Last Post: 11-04-2008, 01:53 PM
  5. Chi Squared forumla
    By allie7927 in forum Statistics
    Replies: 2
    Last Post: 11-24-2006, 11:56 AM

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