Calculate variance without calculating the mean Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)How would you explain covariance to someone who understands only the mean?When does a distribution not have a mean or a variance?How to calculate the variance for mean of means?Using the median for calculating VarianceHigher variance in sample mean or sample median?Calculate variance from mean and variance of binsHow do you use the CLT without knowing variance?Calculate the variance from variancesHow to calculate the variance for the mean of means of binomial only i.d. variables?Calculating new Mean and Variance after observation removalcalculating mean and variance of non-stationary time dependent samplesCalculating the variance of sample, knowing the mean of population

When is phishing education going too far?

"Seemed to had" is it correct?

What would be the ideal power source for a cybernetic eye?

Disable hyphenation for an entire paragraph

Why don't the Weasley twins use magic outside of school if the Trace can only find the location of spells cast?

Why is "Captain Marvel" translated as male in Portugal?

Antler Helmet: Can it work?

What's the purpose of writing one's academic bio in 3rd person?

Is there a concise way to say "all of the X, one of each"?

Is a manifold-with-boundary with given interior and non-empty boundary essentially unique?

How can I make names more distinctive without making them longer?

Do I really need recursive chmod to restrict access to a folder?

Do you forfeit tax refunds/credits if you aren't required to and don't file by April 15?

Can inflation occur in a positive-sum game currency system such as the Stack Exchange reputation system?

Why constant symbols in a language?

How do I stop a creek from eroding my steep embankment?

Why is "Consequences inflicted." not a sentence?

How does a Death Domain cleric's Touch of Death feature work with Touch-range spells delivered by familiars?

3 doors, three guards, one stone

do i need a schengen visa for a direct flight to amsterdam?

What are the motives behind Cersei's orders given to Bronn?

How widely used is the term Treppenwitz? Is it something that most Germans know?

Were Kohanim forbidden from serving in King David's army?

Is it ethical to give a final exam after the professor has quit before teaching the remaining chapters of the course?



Calculate variance without calculating the mean



Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)How would you explain covariance to someone who understands only the mean?When does a distribution not have a mean or a variance?How to calculate the variance for mean of means?Using the median for calculating VarianceHigher variance in sample mean or sample median?Calculate variance from mean and variance of binsHow do you use the CLT without knowing variance?Calculate the variance from variancesHow to calculate the variance for the mean of means of binomial only i.d. variables?Calculating new Mean and Variance after observation removalcalculating mean and variance of non-stationary time dependent samplesCalculating the variance of sample, knowing the mean of population



.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








7












$begingroup$


Can we calculate the variance without using the mean as the 'base' point?










share|cite|improve this question











$endgroup$







  • 3




    $begingroup$
    Given $mathbbE(X^2)<infty$, the variance is given by $sigma^2 = mathbbE((X-mathbbE(X))^2)$ by definition. The formular simplifies to $sigma^2 =mathbbE(X^2) - mathbbE(X)^2$. I.e., for the variance you need $mathbbE(X)$. Of course you could define your own dispersion measure using some other statistic...or use one from the answers.
    $endgroup$
    – BloXX
    Mar 26 at 7:56







  • 5




    $begingroup$
    Short answer: Lots of other ways to summarize variability (dispersion, spread, scale) but none of the others would be the variance. (In fact, the variance can be defined without reference to the mean.)
    $endgroup$
    – Nick Cox
    Mar 26 at 8:28






  • 3




    $begingroup$
    Yes: given data $X,$ compute the covariance of $(X,X)$ as described at stats.stackexchange.com/a/18200/919. This method never computes the mean.
    $endgroup$
    – whuber
    Mar 26 at 13:15

















7












$begingroup$


Can we calculate the variance without using the mean as the 'base' point?










share|cite|improve this question











$endgroup$







  • 3




    $begingroup$
    Given $mathbbE(X^2)<infty$, the variance is given by $sigma^2 = mathbbE((X-mathbbE(X))^2)$ by definition. The formular simplifies to $sigma^2 =mathbbE(X^2) - mathbbE(X)^2$. I.e., for the variance you need $mathbbE(X)$. Of course you could define your own dispersion measure using some other statistic...or use one from the answers.
    $endgroup$
    – BloXX
    Mar 26 at 7:56







  • 5




    $begingroup$
    Short answer: Lots of other ways to summarize variability (dispersion, spread, scale) but none of the others would be the variance. (In fact, the variance can be defined without reference to the mean.)
    $endgroup$
    – Nick Cox
    Mar 26 at 8:28






  • 3




    $begingroup$
    Yes: given data $X,$ compute the covariance of $(X,X)$ as described at stats.stackexchange.com/a/18200/919. This method never computes the mean.
    $endgroup$
    – whuber
    Mar 26 at 13:15













7












7








7


1



$begingroup$


Can we calculate the variance without using the mean as the 'base' point?










share|cite|improve this question











$endgroup$




Can we calculate the variance without using the mean as the 'base' point?







mathematical-statistics variance mean median scale-estimator






share|cite|improve this question















share|cite|improve this question













share|cite|improve this question




share|cite|improve this question








edited Apr 4 at 7:02









Ferdi

3,85952355




3,85952355










asked Mar 26 at 7:46









WillWill

411




411







  • 3




    $begingroup$
    Given $mathbbE(X^2)<infty$, the variance is given by $sigma^2 = mathbbE((X-mathbbE(X))^2)$ by definition. The formular simplifies to $sigma^2 =mathbbE(X^2) - mathbbE(X)^2$. I.e., for the variance you need $mathbbE(X)$. Of course you could define your own dispersion measure using some other statistic...or use one from the answers.
    $endgroup$
    – BloXX
    Mar 26 at 7:56







  • 5




    $begingroup$
    Short answer: Lots of other ways to summarize variability (dispersion, spread, scale) but none of the others would be the variance. (In fact, the variance can be defined without reference to the mean.)
    $endgroup$
    – Nick Cox
    Mar 26 at 8:28






  • 3




    $begingroup$
    Yes: given data $X,$ compute the covariance of $(X,X)$ as described at stats.stackexchange.com/a/18200/919. This method never computes the mean.
    $endgroup$
    – whuber
    Mar 26 at 13:15












  • 3




    $begingroup$
    Given $mathbbE(X^2)<infty$, the variance is given by $sigma^2 = mathbbE((X-mathbbE(X))^2)$ by definition. The formular simplifies to $sigma^2 =mathbbE(X^2) - mathbbE(X)^2$. I.e., for the variance you need $mathbbE(X)$. Of course you could define your own dispersion measure using some other statistic...or use one from the answers.
    $endgroup$
    – BloXX
    Mar 26 at 7:56







  • 5




    $begingroup$
    Short answer: Lots of other ways to summarize variability (dispersion, spread, scale) but none of the others would be the variance. (In fact, the variance can be defined without reference to the mean.)
    $endgroup$
    – Nick Cox
    Mar 26 at 8:28






  • 3




    $begingroup$
    Yes: given data $X,$ compute the covariance of $(X,X)$ as described at stats.stackexchange.com/a/18200/919. This method never computes the mean.
    $endgroup$
    – whuber
    Mar 26 at 13:15







3




3




$begingroup$
Given $mathbbE(X^2)<infty$, the variance is given by $sigma^2 = mathbbE((X-mathbbE(X))^2)$ by definition. The formular simplifies to $sigma^2 =mathbbE(X^2) - mathbbE(X)^2$. I.e., for the variance you need $mathbbE(X)$. Of course you could define your own dispersion measure using some other statistic...or use one from the answers.
$endgroup$
– BloXX
Mar 26 at 7:56





$begingroup$
Given $mathbbE(X^2)<infty$, the variance is given by $sigma^2 = mathbbE((X-mathbbE(X))^2)$ by definition. The formular simplifies to $sigma^2 =mathbbE(X^2) - mathbbE(X)^2$. I.e., for the variance you need $mathbbE(X)$. Of course you could define your own dispersion measure using some other statistic...or use one from the answers.
$endgroup$
– BloXX
Mar 26 at 7:56





5




5




$begingroup$
Short answer: Lots of other ways to summarize variability (dispersion, spread, scale) but none of the others would be the variance. (In fact, the variance can be defined without reference to the mean.)
$endgroup$
– Nick Cox
Mar 26 at 8:28




$begingroup$
Short answer: Lots of other ways to summarize variability (dispersion, spread, scale) but none of the others would be the variance. (In fact, the variance can be defined without reference to the mean.)
$endgroup$
– Nick Cox
Mar 26 at 8:28




3




3




$begingroup$
Yes: given data $X,$ compute the covariance of $(X,X)$ as described at stats.stackexchange.com/a/18200/919. This method never computes the mean.
$endgroup$
– whuber
Mar 26 at 13:15




$begingroup$
Yes: given data $X,$ compute the covariance of $(X,X)$ as described at stats.stackexchange.com/a/18200/919. This method never computes the mean.
$endgroup$
– whuber
Mar 26 at 13:15










2 Answers
2






active

oldest

votes


















12












$begingroup$

The median absolute deviation is defined as
$$textMAD(X) = textmedian |X-textmedian(X)|$$
and is considered an alternative to the standard deviation. But this is not the variance. In particular, it always exists, whether or not $X$ allows for moments. For instance, the MAD of a standard Cauchy is equal to one since
$$underbrace<1)_text0 is the median=arctan(1)/pi-arctan(-1)/pi=frac12$$






share|cite|improve this answer











$endgroup$








  • 7




    $begingroup$
    Newcomers to this idea should watch out also for mean absolute deviation from the mean (mean deviation, often) and median absolute deviation from the mean. I don't recall mean absolute deviation from the median, but am open to examples. The abbreviation MAD, unfortunately, has been applied variously, so trust people's code first, then their algebraic or verbal definition, but use of an abbreviation MAD only not at all. In symmetric distributions, and some others, MAD as defined here is half the interquartile range. (Punning on MAD I resist as a little too obvious.)
    $endgroup$
    – Nick Cox
    Mar 26 at 8:23







  • 3




    $begingroup$
    Also, note that software implementations of the median absolute deviation function can scale the MAD value by a constant factor from the form presented in this answer, so that its value coincides with the standard deviation for a normal distribution.
    $endgroup$
    – EdM
    Mar 26 at 8:30










  • $begingroup$
    @EdM Excellent point. Personally I dislike that practice unless people use some different term. It's no longer the MAD!
    $endgroup$
    – Nick Cox
    Mar 26 at 8:35






  • 1




    $begingroup$
    @NickCox: the appeal of centring on the median is that the quantity always exists, whether or not the distribution enjoys a mean. This is the definition found in Wikipedia.
    $endgroup$
    – Xi'an
    Mar 26 at 9:20










  • $begingroup$
    MAD is Mutually Assured Destruction
    $endgroup$
    – kjetil b halvorsen
    Mar 26 at 10:05


















3












$begingroup$

There is already a solution for this question on Math.stackexchange:



I summarize the answers:



  1. You can use that the variance is $overlinex^2 - overline x^2$, which takes only one pass (computing the mean and the mean of the squares simultaneously), but can be more prone to roundoff error if the variance is small compared with the mean.


  1. How about sum of squared pairwise differences ? Indeed, you can check by direct computation that

$$
2v_X = frac1n(n-1)sum_1 le i < j le n(x_i - x_j)^2.
$$




  1. The sample variance without mean is calculated as:
    $$ v_X=frac1n-1left [ sum_i=1^nx_i^2-frac1nleft ( sum_i=1^nx_i right ) ^2right ] $$





share|cite|improve this answer











$endgroup$













    Your Answer








    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "65"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstats.stackexchange.com%2fquestions%2f399445%2fcalculate-variance-without-calculating-the-mean%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    12












    $begingroup$

    The median absolute deviation is defined as
    $$textMAD(X) = textmedian |X-textmedian(X)|$$
    and is considered an alternative to the standard deviation. But this is not the variance. In particular, it always exists, whether or not $X$ allows for moments. For instance, the MAD of a standard Cauchy is equal to one since
    $$underbrace<1)_text0 is the median=arctan(1)/pi-arctan(-1)/pi=frac12$$






    share|cite|improve this answer











    $endgroup$








    • 7




      $begingroup$
      Newcomers to this idea should watch out also for mean absolute deviation from the mean (mean deviation, often) and median absolute deviation from the mean. I don't recall mean absolute deviation from the median, but am open to examples. The abbreviation MAD, unfortunately, has been applied variously, so trust people's code first, then their algebraic or verbal definition, but use of an abbreviation MAD only not at all. In symmetric distributions, and some others, MAD as defined here is half the interquartile range. (Punning on MAD I resist as a little too obvious.)
      $endgroup$
      – Nick Cox
      Mar 26 at 8:23







    • 3




      $begingroup$
      Also, note that software implementations of the median absolute deviation function can scale the MAD value by a constant factor from the form presented in this answer, so that its value coincides with the standard deviation for a normal distribution.
      $endgroup$
      – EdM
      Mar 26 at 8:30










    • $begingroup$
      @EdM Excellent point. Personally I dislike that practice unless people use some different term. It's no longer the MAD!
      $endgroup$
      – Nick Cox
      Mar 26 at 8:35






    • 1




      $begingroup$
      @NickCox: the appeal of centring on the median is that the quantity always exists, whether or not the distribution enjoys a mean. This is the definition found in Wikipedia.
      $endgroup$
      – Xi'an
      Mar 26 at 9:20










    • $begingroup$
      MAD is Mutually Assured Destruction
      $endgroup$
      – kjetil b halvorsen
      Mar 26 at 10:05















    12












    $begingroup$

    The median absolute deviation is defined as
    $$textMAD(X) = textmedian |X-textmedian(X)|$$
    and is considered an alternative to the standard deviation. But this is not the variance. In particular, it always exists, whether or not $X$ allows for moments. For instance, the MAD of a standard Cauchy is equal to one since
    $$underbrace<1)_text0 is the median=arctan(1)/pi-arctan(-1)/pi=frac12$$






    share|cite|improve this answer











    $endgroup$








    • 7




      $begingroup$
      Newcomers to this idea should watch out also for mean absolute deviation from the mean (mean deviation, often) and median absolute deviation from the mean. I don't recall mean absolute deviation from the median, but am open to examples. The abbreviation MAD, unfortunately, has been applied variously, so trust people's code first, then their algebraic or verbal definition, but use of an abbreviation MAD only not at all. In symmetric distributions, and some others, MAD as defined here is half the interquartile range. (Punning on MAD I resist as a little too obvious.)
      $endgroup$
      – Nick Cox
      Mar 26 at 8:23







    • 3




      $begingroup$
      Also, note that software implementations of the median absolute deviation function can scale the MAD value by a constant factor from the form presented in this answer, so that its value coincides with the standard deviation for a normal distribution.
      $endgroup$
      – EdM
      Mar 26 at 8:30










    • $begingroup$
      @EdM Excellent point. Personally I dislike that practice unless people use some different term. It's no longer the MAD!
      $endgroup$
      – Nick Cox
      Mar 26 at 8:35






    • 1




      $begingroup$
      @NickCox: the appeal of centring on the median is that the quantity always exists, whether or not the distribution enjoys a mean. This is the definition found in Wikipedia.
      $endgroup$
      – Xi'an
      Mar 26 at 9:20










    • $begingroup$
      MAD is Mutually Assured Destruction
      $endgroup$
      – kjetil b halvorsen
      Mar 26 at 10:05













    12












    12








    12





    $begingroup$

    The median absolute deviation is defined as
    $$textMAD(X) = textmedian |X-textmedian(X)|$$
    and is considered an alternative to the standard deviation. But this is not the variance. In particular, it always exists, whether or not $X$ allows for moments. For instance, the MAD of a standard Cauchy is equal to one since
    $$underbrace<1)_text0 is the median=arctan(1)/pi-arctan(-1)/pi=frac12$$






    share|cite|improve this answer











    $endgroup$



    The median absolute deviation is defined as
    $$textMAD(X) = textmedian |X-textmedian(X)|$$
    and is considered an alternative to the standard deviation. But this is not the variance. In particular, it always exists, whether or not $X$ allows for moments. For instance, the MAD of a standard Cauchy is equal to one since
    $$underbrace<1)_text0 is the median=arctan(1)/pi-arctan(-1)/pi=frac12$$







    share|cite|improve this answer














    share|cite|improve this answer



    share|cite|improve this answer








    edited Mar 26 at 12:13









    ukemi

    1053




    1053










    answered Mar 26 at 7:59









    Xi'anXi'an

    59.5k897368




    59.5k897368







    • 7




      $begingroup$
      Newcomers to this idea should watch out also for mean absolute deviation from the mean (mean deviation, often) and median absolute deviation from the mean. I don't recall mean absolute deviation from the median, but am open to examples. The abbreviation MAD, unfortunately, has been applied variously, so trust people's code first, then their algebraic or verbal definition, but use of an abbreviation MAD only not at all. In symmetric distributions, and some others, MAD as defined here is half the interquartile range. (Punning on MAD I resist as a little too obvious.)
      $endgroup$
      – Nick Cox
      Mar 26 at 8:23







    • 3




      $begingroup$
      Also, note that software implementations of the median absolute deviation function can scale the MAD value by a constant factor from the form presented in this answer, so that its value coincides with the standard deviation for a normal distribution.
      $endgroup$
      – EdM
      Mar 26 at 8:30










    • $begingroup$
      @EdM Excellent point. Personally I dislike that practice unless people use some different term. It's no longer the MAD!
      $endgroup$
      – Nick Cox
      Mar 26 at 8:35






    • 1




      $begingroup$
      @NickCox: the appeal of centring on the median is that the quantity always exists, whether or not the distribution enjoys a mean. This is the definition found in Wikipedia.
      $endgroup$
      – Xi'an
      Mar 26 at 9:20










    • $begingroup$
      MAD is Mutually Assured Destruction
      $endgroup$
      – kjetil b halvorsen
      Mar 26 at 10:05












    • 7




      $begingroup$
      Newcomers to this idea should watch out also for mean absolute deviation from the mean (mean deviation, often) and median absolute deviation from the mean. I don't recall mean absolute deviation from the median, but am open to examples. The abbreviation MAD, unfortunately, has been applied variously, so trust people's code first, then their algebraic or verbal definition, but use of an abbreviation MAD only not at all. In symmetric distributions, and some others, MAD as defined here is half the interquartile range. (Punning on MAD I resist as a little too obvious.)
      $endgroup$
      – Nick Cox
      Mar 26 at 8:23







    • 3




      $begingroup$
      Also, note that software implementations of the median absolute deviation function can scale the MAD value by a constant factor from the form presented in this answer, so that its value coincides with the standard deviation for a normal distribution.
      $endgroup$
      – EdM
      Mar 26 at 8:30










    • $begingroup$
      @EdM Excellent point. Personally I dislike that practice unless people use some different term. It's no longer the MAD!
      $endgroup$
      – Nick Cox
      Mar 26 at 8:35






    • 1




      $begingroup$
      @NickCox: the appeal of centring on the median is that the quantity always exists, whether or not the distribution enjoys a mean. This is the definition found in Wikipedia.
      $endgroup$
      – Xi'an
      Mar 26 at 9:20










    • $begingroup$
      MAD is Mutually Assured Destruction
      $endgroup$
      – kjetil b halvorsen
      Mar 26 at 10:05







    7




    7




    $begingroup$
    Newcomers to this idea should watch out also for mean absolute deviation from the mean (mean deviation, often) and median absolute deviation from the mean. I don't recall mean absolute deviation from the median, but am open to examples. The abbreviation MAD, unfortunately, has been applied variously, so trust people's code first, then their algebraic or verbal definition, but use of an abbreviation MAD only not at all. In symmetric distributions, and some others, MAD as defined here is half the interquartile range. (Punning on MAD I resist as a little too obvious.)
    $endgroup$
    – Nick Cox
    Mar 26 at 8:23





    $begingroup$
    Newcomers to this idea should watch out also for mean absolute deviation from the mean (mean deviation, often) and median absolute deviation from the mean. I don't recall mean absolute deviation from the median, but am open to examples. The abbreviation MAD, unfortunately, has been applied variously, so trust people's code first, then their algebraic or verbal definition, but use of an abbreviation MAD only not at all. In symmetric distributions, and some others, MAD as defined here is half the interquartile range. (Punning on MAD I resist as a little too obvious.)
    $endgroup$
    – Nick Cox
    Mar 26 at 8:23





    3




    3




    $begingroup$
    Also, note that software implementations of the median absolute deviation function can scale the MAD value by a constant factor from the form presented in this answer, so that its value coincides with the standard deviation for a normal distribution.
    $endgroup$
    – EdM
    Mar 26 at 8:30




    $begingroup$
    Also, note that software implementations of the median absolute deviation function can scale the MAD value by a constant factor from the form presented in this answer, so that its value coincides with the standard deviation for a normal distribution.
    $endgroup$
    – EdM
    Mar 26 at 8:30












    $begingroup$
    @EdM Excellent point. Personally I dislike that practice unless people use some different term. It's no longer the MAD!
    $endgroup$
    – Nick Cox
    Mar 26 at 8:35




    $begingroup$
    @EdM Excellent point. Personally I dislike that practice unless people use some different term. It's no longer the MAD!
    $endgroup$
    – Nick Cox
    Mar 26 at 8:35




    1




    1




    $begingroup$
    @NickCox: the appeal of centring on the median is that the quantity always exists, whether or not the distribution enjoys a mean. This is the definition found in Wikipedia.
    $endgroup$
    – Xi'an
    Mar 26 at 9:20




    $begingroup$
    @NickCox: the appeal of centring on the median is that the quantity always exists, whether or not the distribution enjoys a mean. This is the definition found in Wikipedia.
    $endgroup$
    – Xi'an
    Mar 26 at 9:20












    $begingroup$
    MAD is Mutually Assured Destruction
    $endgroup$
    – kjetil b halvorsen
    Mar 26 at 10:05




    $begingroup$
    MAD is Mutually Assured Destruction
    $endgroup$
    – kjetil b halvorsen
    Mar 26 at 10:05













    3












    $begingroup$

    There is already a solution for this question on Math.stackexchange:



    I summarize the answers:



    1. You can use that the variance is $overlinex^2 - overline x^2$, which takes only one pass (computing the mean and the mean of the squares simultaneously), but can be more prone to roundoff error if the variance is small compared with the mean.


    1. How about sum of squared pairwise differences ? Indeed, you can check by direct computation that

    $$
    2v_X = frac1n(n-1)sum_1 le i < j le n(x_i - x_j)^2.
    $$




    1. The sample variance without mean is calculated as:
      $$ v_X=frac1n-1left [ sum_i=1^nx_i^2-frac1nleft ( sum_i=1^nx_i right ) ^2right ] $$





    share|cite|improve this answer











    $endgroup$

















      3












      $begingroup$

      There is already a solution for this question on Math.stackexchange:



      I summarize the answers:



      1. You can use that the variance is $overlinex^2 - overline x^2$, which takes only one pass (computing the mean and the mean of the squares simultaneously), but can be more prone to roundoff error if the variance is small compared with the mean.


      1. How about sum of squared pairwise differences ? Indeed, you can check by direct computation that

      $$
      2v_X = frac1n(n-1)sum_1 le i < j le n(x_i - x_j)^2.
      $$




      1. The sample variance without mean is calculated as:
        $$ v_X=frac1n-1left [ sum_i=1^nx_i^2-frac1nleft ( sum_i=1^nx_i right ) ^2right ] $$





      share|cite|improve this answer











      $endgroup$















        3












        3








        3





        $begingroup$

        There is already a solution for this question on Math.stackexchange:



        I summarize the answers:



        1. You can use that the variance is $overlinex^2 - overline x^2$, which takes only one pass (computing the mean and the mean of the squares simultaneously), but can be more prone to roundoff error if the variance is small compared with the mean.


        1. How about sum of squared pairwise differences ? Indeed, you can check by direct computation that

        $$
        2v_X = frac1n(n-1)sum_1 le i < j le n(x_i - x_j)^2.
        $$




        1. The sample variance without mean is calculated as:
          $$ v_X=frac1n-1left [ sum_i=1^nx_i^2-frac1nleft ( sum_i=1^nx_i right ) ^2right ] $$





        share|cite|improve this answer











        $endgroup$



        There is already a solution for this question on Math.stackexchange:



        I summarize the answers:



        1. You can use that the variance is $overlinex^2 - overline x^2$, which takes only one pass (computing the mean and the mean of the squares simultaneously), but can be more prone to roundoff error if the variance is small compared with the mean.


        1. How about sum of squared pairwise differences ? Indeed, you can check by direct computation that

        $$
        2v_X = frac1n(n-1)sum_1 le i < j le n(x_i - x_j)^2.
        $$




        1. The sample variance without mean is calculated as:
          $$ v_X=frac1n-1left [ sum_i=1^nx_i^2-frac1nleft ( sum_i=1^nx_i right ) ^2right ] $$






        share|cite|improve this answer














        share|cite|improve this answer



        share|cite|improve this answer








        edited Mar 26 at 17:08

























        answered Mar 26 at 16:48









        FerdiFerdi

        3,85952355




        3,85952355



























            draft saved

            draft discarded
















































            Thanks for contributing an answer to Cross Validated!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            Use MathJax to format equations. MathJax reference.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstats.stackexchange.com%2fquestions%2f399445%2fcalculate-variance-without-calculating-the-mean%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Solar Wings Breeze Design and development Specifications (Breeze) References Navigation menu1368-485X"Hang glider: Breeze (Solar Wings)"e

            Kathakali Contents Etymology and nomenclature History Repertoire Songs and musical instruments Traditional plays Styles: Sampradayam Training centers and awards Relationship to other dance forms See also Notes References External links Navigation menueThe Illustrated Encyclopedia of Hinduism: A-MSouth Asian Folklore: An EncyclopediaRoutledge International Encyclopedia of Women: Global Women's Issues and KnowledgeKathakali Dance-drama: Where Gods and Demons Come to PlayKathakali Dance-drama: Where Gods and Demons Come to PlayKathakali Dance-drama: Where Gods and Demons Come to Play10.1353/atj.2005.0004The Illustrated Encyclopedia of Hinduism: A-MEncyclopedia of HinduismKathakali Dance-drama: Where Gods and Demons Come to PlaySonic Liturgy: Ritual and Music in Hindu Tradition"The Mirror of Gesture"Kathakali Dance-drama: Where Gods and Demons Come to Play"Kathakali"Indian Theatre: Traditions of PerformanceIndian Theatre: Traditions of PerformanceIndian Theatre: Traditions of PerformanceIndian Theatre: Traditions of PerformanceMedieval Indian Literature: An AnthologyThe Oxford Companion to Indian TheatreSouth Asian Folklore: An Encyclopedia : Afghanistan, Bangladesh, India, Nepal, Pakistan, Sri LankaThe Rise of Performance Studies: Rethinking Richard Schechner's Broad SpectrumIndian Theatre: Traditions of PerformanceModern Asian Theatre and Performance 1900-2000Critical Theory and PerformanceBetween Theater and AnthropologyKathakali603847011Indian Theatre: Traditions of PerformanceIndian Theatre: Traditions of PerformanceIndian Theatre: Traditions of PerformanceBetween Theater and AnthropologyBetween Theater and AnthropologyNambeesan Smaraka AwardsArchivedThe Cambridge Guide to TheatreRoutledge International Encyclopedia of Women: Global Women's Issues and KnowledgeThe Garland Encyclopedia of World Music: South Asia : the Indian subcontinentThe Ethos of Noh: Actors and Their Art10.2307/1145740By Means of Performance: Intercultural Studies of Theatre and Ritual10.1017/s204912550000100xReconceiving the Renaissance: A Critical ReaderPerformance TheoryListening to Theatre: The Aural Dimension of Beijing Opera10.2307/1146013Kathakali: The Art of the Non-WorldlyOn KathakaliKathakali, the dance theatreThe Kathakali Complex: Performance & StructureKathakali Dance-Drama: Where Gods and Demons Come to Play10.1093/obo/9780195399318-0071Drama and Ritual of Early Hinduism"In the Shadow of Hollywood Orientalism: Authentic East Indian Dancing"10.1080/08949460490274013Sanskrit Play Production in Ancient IndiaIndian Music: History and StructureBharata, the Nāṭyaśāstra233639306Table of Contents2238067286469807Dance In Indian Painting10.2307/32047833204783Kathakali Dance-Theatre: A Visual Narrative of Sacred Indian MimeIndian Classical Dance: The Renaissance and BeyondKathakali: an indigenous art-form of Keralaeee

            Method to test if a number is a perfect power? Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 23, 2019 at 00:00UTC (8:00pm US/Eastern)Detecting perfect squares faster than by extracting square rooteffective way to get the integer sequence A181392 from oeisA rarely mentioned fact about perfect powersHow many numbers such $n$ are there that $n<100,lfloorsqrtn rfloor mid n$Check perfect squareness by modulo division against multiple basesFor what pair of integers $(a,b)$ is $3^a + 7^b$ a perfect square.Do there exist any positive integers $n$ such that $lfloore^nrfloor$ is a perfect power? What is the probability that one exists?finding perfect power factors of an integerProve that the sequence contains a perfect square for any natural number $m $ in the domain of $f$ .Counting Perfect Powers