You are viewing the article How to Calculate Variance at Lassho.edu.vn you can quickly access the necessary information in the table of contents of the article below.
This article was co-written by Mario Banuelos, PhD. Mario Banuelos is an assistant professor of mathematics at California State University, Fresno. With over eight years of teaching experience, Mario specializes in mathematical biology, optimization, statistical modeling for genome evolution, and data science. Mario holds a bachelor’s degree in mathematics from California State University, Fresno, and a doctorate in applied mathematics from the University of California, Merced. Mario teaches at both the high school and college levels.
This article has been viewed 240,483 times.
Variance measures the dispersion of a data set. It is very useful in building statistical models: low variance can be a sign that you are describing random error or noise rather than an implicit relationship in the data. With this article, the wikiHow will teach you how to calculate variance.
Steps
Calculating the variance of a sample
- Example: When analyzing the number of muffins sold each day at a coffee shop, you take a random six-day sample and get the following results: 38, 37, 36, 28, 18, 14, 12, 11, 10.7, 9.9. This is a sample, not a population, because you don’t have data for all store opening days.
- If there are every data point in the population, go to the method below.
- S2{displaystyle s^{2}} = [(xi{displaystyle x_{i}} – x̅)2{displaystyle ^{2}} ] / (n – 1)
- S2{displaystyle s^{2}} is the variance. Variance is always measured in squared units.
- xi{displaystyle x_{i}} represents a value in your tuple.
- ∑, which means “sum”, tells you what parameters to follow for each value xi{displaystyle x_{i}} , and then add them together.
- x̅ is the mean of the sample.
- n is the number of data points.
- Example: First, add the data points together: 17 + 15 + 23 + 7 + 9 + 13 = 84
Next, divide the result obtained by the number of data points, in this case six: 84 ÷ 6 = 14.
Sample mean = x̅ = 14 . - You can think of the mean as the “center point” of the data. If the data is centered around the mean, the variance is low. If they are scattered far from the mean, the variance is high.
- For example:
xfirst{displaystyle x_{1}} – x̅ = 17 – 14 = 3
x2{displaystyle x_{2}} – x̅ = 15 – 14 = 1
x3{displaystyle x_{3}} – x̅ = 23 – 14 = 9
x4{displaystyle x_{4}} – x̅ = 7 – 14 = -7
x5{displaystyle x_{5}} – x̅ = 9 – 14 = -5
x6{displaystyle x_{6}} – x̅ = 13 – 14 = -1 - It is very easy to check your calculation, because the results obtained must sum to 0. That is because by definition of the mean, the results are negative (distance from mean to small numbers). more) completely cancel out the positive result (distance from mean to larger numbers).
- For example:
( xfirst{displaystyle x_{1}} – x̅) 2=32=9{displaystyle ^{2}=3^{2}=9}
(x2{displaystyle (x_{2}} – x̅) 2=first2=first{displaystyle ^{2}=1^{2}=1}
9 2 = 81
(-7) 2 = 49
(-5) 2 = 25
(-1) 2 = 1 - Now you have ( xi{displaystyle x_{i}} – x̅) 2{displaystyle ^{2}} for each data point in the sample.
- For example: 9 + 1 + 81 + 49 + 25 + 1 = 166 .
- Example: There are six data points in the sample, so n = 6.
Sample Variance = S2=1666−first={displaystyle s^{2}={frac {166}{6-1}}=} 33.2
- For example, the standard deviation of the above sample = s = √33.2 = 5.76.
Calculating the variance of a population
- Example: In the room of an aquarium, there are exactly six aquariums. These six tanks contain the following number of fish respectively:
xfirst=5{displaystyle x_{1}=5}
x2=5{displaystyle x_{2}=5}
x3=8{displaystyle x_{3}=8}
x4=twelfth{displaystyle x_{4}=12}
x5=15{displaystyle x_{5}=15}
x6=18{displaystyle x_{6}=18}
- σ 2{displaystyle ^{2}} = (∑(xi{displaystyle x_{i}} – μ)2{displaystyle ^{2}} ) / n
- σ 2{displaystyle ^{2}} = sample variance. This is the normal squared sima. Variance is measured by the square of the unit.
- xi{displaystyle x_{i}} represents an element in your tuple.
- Elements within will be calculated for each value xi{displaystyle x_{i}} , and then added together.
- μ is the overall mean.
- n number of data points in the population.
- You can think of the mean as “average,” but be careful, because the word has many definitions in math.
- Example: mean = μ = 5+5+8+twelfth+15+186{displaystyle {frac {5+5+8+12+15+18}{6}}} = 10.5
- For example:
xfirst{displaystyle x_{1}} – μ = 5 – 10.5 = -5.5
x2{displaystyle x_{2}} – μ = 5 – 10.5 = -5.5
x3{displaystyle x_{3}} – μ = 8 – 10.5 = -2.5
x4{displaystyle x_{4}} – μ = 12 – 10., = 1.5
x5{displaystyle x_{5}} – μ = 15 – 10.5 = 4.5
x6{displaystyle x_{6}} – μ = 18 – 10.5 = 7.5
- For example:
( xi{displaystyle x_{i}} – μ) 2{displaystyle ^{2}} for each value of i running from 1 to 6:
(-5,5) 2{displaystyle ^{2}} = 30.25
(-5,5) 2{displaystyle ^{2}} = 30.25
(-2.5) 2{displaystyle ^{2}} = 6.25
(1.5) 2{displaystyle ^{2}} = 2.25
(4,5) 2{displaystyle ^{2}} = 20.25
(7.5) 2{displaystyle ^{2}} = 56.25
- For example:
Overall variance = 30,25+30,25+6,25+2,25+20,25+56,256=145,56={displaystyle {frac {30,25+30,25+6,25+2,25+2,25+56,25}{6}}={frac {145,5}{6}}=} 24.25
- After finding the difference from the mean and squaring it, you have ( xfirst{displaystyle x_{1}} – μ) 2{displaystyle ^{2}} , ( x2{displaystyle x_{2}} – μ) 2{displaystyle ^{2}} , and so on until ( xn{displaystyle x_{n}} – μ) 2{displaystyle ^{2}} , in there xn{displaystyle x_{n}} is the last data point in the dataset.
- To find the mean of these values, you add them up and divide by n: ( ( xfirst{displaystyle x_{1}} – μ) 2{displaystyle ^{2}} + ( x2{displaystyle x_{2}} – μ) 2{displaystyle ^{2}} + … + ( xn{displaystyle x_{n}} – μ) 2{displaystyle ^{2}} ) / n
- After rewriting the numerator in sigma notation, you have (∑(xi{displaystyle x_{i}} – μ)2{displaystyle ^{2}} ) / n , the variance formula.
Advice
- Because variance is difficult to interpret, this value is often calculated as the starting point from which to find the standard deviation.
- Using “n-1” instead of “n” in the denominator when analyzing samples is a technique known as the Bessel correction. The sample is only an estimate of a complete population, and the sample mean has a certain bias to match that estimate. This correction eliminates the upper bias. [7] X Research Source It has to do with the fact that once n -1 data points are listed, the nth last point is already a constant, because only certain values are used to calculate the value. sample mean (x̅) in the variance formula. [8] X Research Sources
This article was co-written by Mario Banuelos, PhD. Mario Banuelos is an assistant professor of mathematics at California State University, Fresno. With over eight years of teaching experience, Mario specializes in mathematical biology, optimization, statistical modeling for genome evolution, and data science. Mario holds a bachelor’s degree in mathematics from California State University, Fresno, and a doctorate in applied mathematics from the University of California, Merced. Mario teaches at both the high school and college levels.
This article has been viewed 240,483 times.
Variance measures the dispersion of a data set. It is very useful in building statistical models: low variance can be a sign that you are describing random error or noise rather than an implicit relationship in the data. With this article, the wikiHow will teach you how to calculate variance.
Thank you for reading this post How to Calculate Variance at Lassho.edu.vn You can comment, see more related articles below and hope to help you with interesting information.
Related Search: