Algorithm-sample variance, sample standard deviation, variance, standard variance and weighted average

Source: Internet
Author: User

Sample variance and sample standard deviation

1. Definition: The sum of squares of the differences between each data and the average sample in the sample is called the sample variance, and the arithmetic square root of the sample variance is called the sample standard deviation.

Note: Both the sample variance and the sample standard deviation measure the fluctuation size of a sample. The larger the sample variance or sample standard deviation, the larger the fluctuation of the sample data.

Standard deviation andStandard variance

1. Definition: variance is the mean of the sum of squares of the differences between each data and the average. In probability theory and mathematical statistics, variance is used to measure the deviation between a random variable and its mathematical expectation (mean. Standard deviation is most often used as a measure of Statistical Distribution in probability statistics. The standard deviation is defined as the arithmetic square root of variance, reflecting the degree of discretization between individuals in the group.

Weighted average

1. Definition: weighted average is the average of different proportions of data, that is, the original data is calculated according to a reasonable proportion.

 

The algorithm code is as follows:

           StandardDeviation( IList<> (source ==   ArgumentNullException( (source.Count ==   variance =   SampleStandardDeviation( IList<> (source ==   ArgumentNullException( (source.Count ==  || source.Count ==   variance =   Variance( IList<> (source ==   ArgumentNullException( (source.Count ==   count = deviation = deviation /   SampleVariance( IList<> (source ==   ArgumentNullException( (source.Count ==  || source.Count ==   count = deviation = deviation / (count -    WeightedAverage( IList<> source, IList<> (source ==   ArgumentNullException( (source.Count !=  ArgumentException( (source.Count ==   sum = (sum ==   weight =  ( index = ; index < factors.Count; index+++= source[index] * (factors[index] / weight   CalculateDeviation(IList<> source,  avg = deviation =  ( index = ; index < count; index+++= (source[index] - avg) * (source[index] -


The above is widely used in finance .....

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.