Is it possible to obtain a negative number for variance
The formula to find the variance of a sample denoted as s 2 is:. For example, suppose we have the following dataset with 10 values:. We can use the following steps to calculate the variance of this sample:. The mean is simply the average. This turns out to be Next, we can calculate the squared deviation of each individual value from the mean.
For example, the first squared deviation is calculated as Lastly, we can calculate the sample variance as the sum of squared deviations divided by n-1 :. The sample variance turns out to be The only way that a dataset can have a variance of zero is if all of the values in the dataset are the same.
By remaining on this website or using its content, you confirm that you have read and agree with the Terms of Use Agreement just as if you have signed it. If you don't agree with any part of this Agreement, please leave the website now. Any information may be inaccurate, incomplete, outdated or plain wrong.
Macroption is not liable for any damages resulting from using the content. Can Variance Be Negative? No See Why. In one word: No. Variance is the average squared deviation from the mean. Calculate the differences between the individual numbers and the mean of the data set.
Cross Validated is a question and answer site for people interested in statistics, machine learning, data analysis, data mining, and data visualization.
It only takes a minute to sign up. Connect and share knowledge within a single location that is structured and easy to search. Please note, I am still in secondary school so please keep your answers simple. A question on my homework states to calculate the standard deviation from a given frequency table with several class widths and frequencies.
When calculating my variance, the result turned out to be a negative number, which means that the standard deviation cannot be a realistic number as you cannot square root a negative number.
I rechecked my calculations, asked my dad, looked online, back in my book, and in several text books and followed the instructions there; and even did some other standard deviation questions, albeit with the correct result in the other questions. My question is thus, what could have happened that would cause the variance to be a negative number?
I know I cannot be much help by displaying the actual data here because of problems with formatting, but here are the column names and what I named them as:. Sign up to join this community. The best answers are voted up and rise to the top. Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams?
0コメント