zoukankan      html  css  js  c++  java
  • Mathematics | Mean, Variance and Standard Deviation

    Mean is average of a given set of data. Let us consider below example

     2, 4, 4, 4, 5, 5, 7, 9

    These eight data points have the mean (average) of 5:

     frac{2 + 4 + 4 + 4 + 5 + 5 + 7 + 9}{8} = 5.

     
    Variance is sum of squares of differences between all numbers and means.
    Deviation for above example. First, calculate the deviations of each data point from the mean, and square the result of each:

     egin{array}{lll} (2-5)^2 = (-3)^2 = 9 && (5-5)^2 = 0^2 = 0 \ (4-5)^2 = (-1)^2 = 1 && (5-5)^2 = 0^2 = 0 \ (4-5)^2 = (-1)^2 = 1 && (7-5)^2 = 2^2 = 4 \ (4-5)^2 = (-1)^2 = 1 && (9-5)^2 = 4^2 = 16. \ end{array}

    variance = frac{9 + 1 + 1 + 1 + 0 + 0 + 4 + 16}{8} = 4.

     
    Standard Deviation is square root of variance. It is a measure of the extent to which data varies from the mean.

    Standard Deviation (for above data) = sqrt{ 4 } = 2

    Why did mathematicians chose square and then square root to find deviation, why not simply take difference of values?
    One reason is the sum of differences becomes 0 according to definition of mean. Sum of absolute differences could be an option, but with absolute differences it was difficult to prove many nice theorems. [Source: MIT Video Lecture at 1:19]

     
    Some Interesting Facts:
    1) Value of standard deviation is 0 if all entries in input are same.

    2) If we add (or subtract) a number say 7 to all values in input set, mean is increased (or decreased) by 7, but standard deviation doesn’t change.

    3) If we multiply all values in input set by a number 7, both mean and standard deviation are multiplied by 7. But if we multiply all input values with a negative number say -7, mean is multiplied by -7, but standard deviation is multiplied by 7.

     
    Below questions have been asked in previous year GATE exams
    http://quiz.geeksforgeeks.org/gate-gate-cs-2012-question-64/

  • 相关阅读:
    深入理解Javascript变量作用域
    phpcms v9取消验证码
    typecho去index.php
    cms与blog汇总
    phpcms修改增加编辑时摘要自动提取的数量
    phpcms后台主菜单不显示
    phpcms sitemaps修改
    phpcms打印数据
    phpcms tag页调用缩略图
    php自动添加相关文章
  • 原文地址:https://www.cnblogs.com/ylHe/p/7851900.html
Copyright © 2011-2022 走看看