When to use mean vs median












1












$begingroup$


I'm new to data science and stats, so this might seems like a beginner question.



I'm working on a dataset where I've user's Twitter followers gain per day. I want to measure the average growth he had over a period of time, which I did by finding the mean of growth. But someone is suggesting me to use median for this.



Can anyone explains, in which use-case we should use mean and when to use median?










share|improve this question







New contributor




Mukul Jain is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.







$endgroup$

















    1












    $begingroup$


    I'm new to data science and stats, so this might seems like a beginner question.



    I'm working on a dataset where I've user's Twitter followers gain per day. I want to measure the average growth he had over a period of time, which I did by finding the mean of growth. But someone is suggesting me to use median for this.



    Can anyone explains, in which use-case we should use mean and when to use median?










    share|improve this question







    New contributor




    Mukul Jain is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.







    $endgroup$















      1












      1








      1





      $begingroup$


      I'm new to data science and stats, so this might seems like a beginner question.



      I'm working on a dataset where I've user's Twitter followers gain per day. I want to measure the average growth he had over a period of time, which I did by finding the mean of growth. But someone is suggesting me to use median for this.



      Can anyone explains, in which use-case we should use mean and when to use median?










      share|improve this question







      New contributor




      Mukul Jain is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.







      $endgroup$




      I'm new to data science and stats, so this might seems like a beginner question.



      I'm working on a dataset where I've user's Twitter followers gain per day. I want to measure the average growth he had over a period of time, which I did by finding the mean of growth. But someone is suggesting me to use median for this.



      Can anyone explains, in which use-case we should use mean and when to use median?







      statistics descriptive-statistics






      share|improve this question







      New contributor




      Mukul Jain is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      share|improve this question







      New contributor




      Mukul Jain is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      share|improve this question




      share|improve this question






      New contributor




      Mukul Jain is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      asked 4 hours ago









      Mukul JainMukul Jain

      1083




      1083




      New contributor




      Mukul Jain is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.





      New contributor





      Mukul Jain is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






      Mukul Jain is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






















          2 Answers
          2






          active

          oldest

          votes


















          2












          $begingroup$

          The mean is defined as



          $mean(bar{x}) = frac{sum_i^n x_i}{n}$



          whereas the median is the value which falls directly in the middle of your dataset. The media is especially useful when you are dealing with a wide range.



          For example salaries are usually discussed using medians. This due to the large disparity between the majority of people and a very few people with a lot of money. Thus looking at the 50% percentile individual will give a more representative value than the mean in this circumstance. Alternatively, grades are usually described using the mean (average) because most students should be near the average and few will be far below or far above.






          share|improve this answer









          $endgroup$













          • $begingroup$
            That's a great answer. So, If I think it like this, I can plot my data and see if it values are continuous, then we can use mean and if they're more clustered (some high and some low), then median would be better, right?
            $endgroup$
            – Mukul Jain
            2 hours ago










          • $begingroup$
            @MukulJain, Yes it depends on the distribution of the data as you mentioned. Plotting is always my go to way to get a sense of my data. Easy to spot anomalies and get a sense of its spread.
            $endgroup$
            – JahKnows
            1 hour ago



















          1












          $begingroup$

          Simply to say, If your data is corrupted with noise or say erroneous no.of twitter followers as in your case, Taking mean as a metric could be detrimental as the model will perform badly. In this case, If you take the median of the values, It will take care of outliers in the data. Hope it helps






          share|improve this answer









          $endgroup$













            Your Answer





            StackExchange.ifUsing("editor", function () {
            return StackExchange.using("mathjaxEditing", function () {
            StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
            StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
            });
            });
            }, "mathjax-editing");

            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "557"
            };
            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
            });


            }
            });






            Mukul Jain is a new contributor. Be nice, and check out our Code of Conduct.










            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdatascience.stackexchange.com%2fquestions%2f46744%2fwhen-to-use-mean-vs-median%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









            2












            $begingroup$

            The mean is defined as



            $mean(bar{x}) = frac{sum_i^n x_i}{n}$



            whereas the median is the value which falls directly in the middle of your dataset. The media is especially useful when you are dealing with a wide range.



            For example salaries are usually discussed using medians. This due to the large disparity between the majority of people and a very few people with a lot of money. Thus looking at the 50% percentile individual will give a more representative value than the mean in this circumstance. Alternatively, grades are usually described using the mean (average) because most students should be near the average and few will be far below or far above.






            share|improve this answer









            $endgroup$













            • $begingroup$
              That's a great answer. So, If I think it like this, I can plot my data and see if it values are continuous, then we can use mean and if they're more clustered (some high and some low), then median would be better, right?
              $endgroup$
              – Mukul Jain
              2 hours ago










            • $begingroup$
              @MukulJain, Yes it depends on the distribution of the data as you mentioned. Plotting is always my go to way to get a sense of my data. Easy to spot anomalies and get a sense of its spread.
              $endgroup$
              – JahKnows
              1 hour ago
















            2












            $begingroup$

            The mean is defined as



            $mean(bar{x}) = frac{sum_i^n x_i}{n}$



            whereas the median is the value which falls directly in the middle of your dataset. The media is especially useful when you are dealing with a wide range.



            For example salaries are usually discussed using medians. This due to the large disparity between the majority of people and a very few people with a lot of money. Thus looking at the 50% percentile individual will give a more representative value than the mean in this circumstance. Alternatively, grades are usually described using the mean (average) because most students should be near the average and few will be far below or far above.






            share|improve this answer









            $endgroup$













            • $begingroup$
              That's a great answer. So, If I think it like this, I can plot my data and see if it values are continuous, then we can use mean and if they're more clustered (some high and some low), then median would be better, right?
              $endgroup$
              – Mukul Jain
              2 hours ago










            • $begingroup$
              @MukulJain, Yes it depends on the distribution of the data as you mentioned. Plotting is always my go to way to get a sense of my data. Easy to spot anomalies and get a sense of its spread.
              $endgroup$
              – JahKnows
              1 hour ago














            2












            2








            2





            $begingroup$

            The mean is defined as



            $mean(bar{x}) = frac{sum_i^n x_i}{n}$



            whereas the median is the value which falls directly in the middle of your dataset. The media is especially useful when you are dealing with a wide range.



            For example salaries are usually discussed using medians. This due to the large disparity between the majority of people and a very few people with a lot of money. Thus looking at the 50% percentile individual will give a more representative value than the mean in this circumstance. Alternatively, grades are usually described using the mean (average) because most students should be near the average and few will be far below or far above.






            share|improve this answer









            $endgroup$



            The mean is defined as



            $mean(bar{x}) = frac{sum_i^n x_i}{n}$



            whereas the median is the value which falls directly in the middle of your dataset. The media is especially useful when you are dealing with a wide range.



            For example salaries are usually discussed using medians. This due to the large disparity between the majority of people and a very few people with a lot of money. Thus looking at the 50% percentile individual will give a more representative value than the mean in this circumstance. Alternatively, grades are usually described using the mean (average) because most students should be near the average and few will be far below or far above.







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered 3 hours ago









            JahKnowsJahKnows

            5,017625




            5,017625












            • $begingroup$
              That's a great answer. So, If I think it like this, I can plot my data and see if it values are continuous, then we can use mean and if they're more clustered (some high and some low), then median would be better, right?
              $endgroup$
              – Mukul Jain
              2 hours ago










            • $begingroup$
              @MukulJain, Yes it depends on the distribution of the data as you mentioned. Plotting is always my go to way to get a sense of my data. Easy to spot anomalies and get a sense of its spread.
              $endgroup$
              – JahKnows
              1 hour ago


















            • $begingroup$
              That's a great answer. So, If I think it like this, I can plot my data and see if it values are continuous, then we can use mean and if they're more clustered (some high and some low), then median would be better, right?
              $endgroup$
              – Mukul Jain
              2 hours ago










            • $begingroup$
              @MukulJain, Yes it depends on the distribution of the data as you mentioned. Plotting is always my go to way to get a sense of my data. Easy to spot anomalies and get a sense of its spread.
              $endgroup$
              – JahKnows
              1 hour ago
















            $begingroup$
            That's a great answer. So, If I think it like this, I can plot my data and see if it values are continuous, then we can use mean and if they're more clustered (some high and some low), then median would be better, right?
            $endgroup$
            – Mukul Jain
            2 hours ago




            $begingroup$
            That's a great answer. So, If I think it like this, I can plot my data and see if it values are continuous, then we can use mean and if they're more clustered (some high and some low), then median would be better, right?
            $endgroup$
            – Mukul Jain
            2 hours ago












            $begingroup$
            @MukulJain, Yes it depends on the distribution of the data as you mentioned. Plotting is always my go to way to get a sense of my data. Easy to spot anomalies and get a sense of its spread.
            $endgroup$
            – JahKnows
            1 hour ago




            $begingroup$
            @MukulJain, Yes it depends on the distribution of the data as you mentioned. Plotting is always my go to way to get a sense of my data. Easy to spot anomalies and get a sense of its spread.
            $endgroup$
            – JahKnows
            1 hour ago











            1












            $begingroup$

            Simply to say, If your data is corrupted with noise or say erroneous no.of twitter followers as in your case, Taking mean as a metric could be detrimental as the model will perform badly. In this case, If you take the median of the values, It will take care of outliers in the data. Hope it helps






            share|improve this answer









            $endgroup$


















              1












              $begingroup$

              Simply to say, If your data is corrupted with noise or say erroneous no.of twitter followers as in your case, Taking mean as a metric could be detrimental as the model will perform badly. In this case, If you take the median of the values, It will take care of outliers in the data. Hope it helps






              share|improve this answer









              $endgroup$
















                1












                1








                1





                $begingroup$

                Simply to say, If your data is corrupted with noise or say erroneous no.of twitter followers as in your case, Taking mean as a metric could be detrimental as the model will perform badly. In this case, If you take the median of the values, It will take care of outliers in the data. Hope it helps






                share|improve this answer









                $endgroup$



                Simply to say, If your data is corrupted with noise or say erroneous no.of twitter followers as in your case, Taking mean as a metric could be detrimental as the model will perform badly. In this case, If you take the median of the values, It will take care of outliers in the data. Hope it helps







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered 23 mins ago









                karthikeyankarthikeyan

                205




                205






















                    Mukul Jain is a new contributor. Be nice, and check out our Code of Conduct.










                    draft saved

                    draft discarded


















                    Mukul Jain is a new contributor. Be nice, and check out our Code of Conduct.













                    Mukul Jain is a new contributor. Be nice, and check out our Code of Conduct.












                    Mukul Jain is a new contributor. Be nice, and check out our Code of Conduct.
















                    Thanks for contributing an answer to Data Science Stack Exchange!


                    • 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%2fdatascience.stackexchange.com%2fquestions%2f46744%2fwhen-to-use-mean-vs-median%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

                    Loup dans la culture

                    How to solve the problem of ntp “Unable to contact time server” from KDE?

                    ASUS Zenbook UX433/UX333 — Configure Touchpad-embedded numpad on Linux