This is an entry in the Basic Statistics Lecture Series which I have realized that I have failed to incorporate into the series so far, and I apologize for that. This lecture is going to cover the basic calculations required for all of statistical analysis, on a fundamental level.
When we collect statistical data, we typically collect it on a small part of the population as a whole. The population is the entire group for which a sentiment holds true. This small part of the population as a whole is called the sample of the population, or just sample for short. The number of data points we collect -- the number of items in the sample -- is called the sample size, which is typically denoted by the letter n.
In statistics, we typically calculate the arithmetic mean, which is the sum of all values divided by the sample size. For the population as a whole, this is denoted by the greek letter μ (mu), and for a sample, it's denoted by x. The sample mean is expressed by $\overline{x}= \frac{\sum_{i=1}^{n}x_{i}}{n}$, where the capital greek letter Sigma denotes that all of the indexed items should be added together. To put it a different way, take all of the numbers and add them together. For example, we can take the average of the wins of the 2017 baseball season. We just add all of the numbers in the wins column, and then divide by 30 (the number of teams in the MLB). After doing this, the average wins in the season was 81. This is what we would expect from the 162 game season, seeing as how every win comes with a corresponding loss.
The variance of a sample is a description of how the data deviates from the arithmetic mean. The first thing you do to calculate this is to subtract the mean from each individual data point. Then you square each of those answers to make them all positive. Add all of these squared differences together. After you finish with all of that, divide the answer by the degrees of freedom, the number of values you are able to arbitrarily change without changing the mean. The general form of the degrees of freedom is the total sample size less the total number of non-arbitrary groups. This is denoted as $v=\frac{\sum_{i=1}^{n}(x_i-\overline{x})^{2}}{n-1}$. In this case, the total sample size is 30 teams, and there is only one non-arbitrary group. So the degrees of freedom is 30-1=29. After all is said and done, the variance of wins in the MLB in 2017 is 132.97.
More often than not, though, it is more useful to calculate the standard deviation, which is the square root of the variance. In this case, that value is 11.53. This is the same concept as the variance, but it is of the same magnitude of the mean. The squaring from the variance makes the value drastically different from the mean, but the standard deviation brings it back to a manageable level. The standard deviation is also more useful in statistical analysis, as we will see in future lectures.
The median of a data set is merely the middle entry of the data set. The first thing we do is to order the entries from smallest to largest. Then, if there is an odd number of entries (n=2m+1 for an integer m), then the median is the (m+1)th data point. If there is an even number of data points (n=2m), than we take the average of the middle two points. For example, in the 2017 MLB Seaso, there were 30 teams, so we would have to take the 15th lowest number of wins and 16th lowest number of wins and average them together. Since the Seattle Mariners and the Texas Rangers are tied at 16th with 78, and the Kansas City Royals and Los Angeles Angels of Anaheim are tied at 15 with 80, we would just do a single 80 and a single 78. So the median -- the average between the two middle values -- would be 79.
The mode is the highest frequency of the same datapoint. In the case of the 2017 MLB Season, there are three teams with 75 wins; the Baltimore Orioles, the Pittsburg Pirates, and the Oakland Athletics. Since this is the only instance of three teams having the same win-loss record, this would be the mode of the 2017 MLB Season.
So that's it for the basic calculations of statistics. If you have any questions, please feel free to ask. Next time, I will cover the basics of hypothesis testing. Until then, stay curious.
The variance of a sample is a description of how the data deviates from the arithmetic mean. The first thing you do to calculate this is to subtract the mean from each individual data point. Then you square each of those answers to make them all positive. Add all of these squared differences together. After you finish with all of that, divide the answer by the degrees of freedom, the number of values you are able to arbitrarily change without changing the mean. The general form of the degrees of freedom is the total sample size less the total number of non-arbitrary groups. This is denoted as $v=\frac{\sum_{i=1}^{n}(x_i-\overline{x})^{2}}{n-1}$. In this case, the total sample size is 30 teams, and there is only one non-arbitrary group. So the degrees of freedom is 30-1=29. After all is said and done, the variance of wins in the MLB in 2017 is 132.97.
More often than not, though, it is more useful to calculate the standard deviation, which is the square root of the variance. In this case, that value is 11.53. This is the same concept as the variance, but it is of the same magnitude of the mean. The squaring from the variance makes the value drastically different from the mean, but the standard deviation brings it back to a manageable level. The standard deviation is also more useful in statistical analysis, as we will see in future lectures.
The median of a data set is merely the middle entry of the data set. The first thing we do is to order the entries from smallest to largest. Then, if there is an odd number of entries (n=2m+1 for an integer m), then the median is the (m+1)th data point. If there is an even number of data points (n=2m), than we take the average of the middle two points. For example, in the 2017 MLB Seaso, there were 30 teams, so we would have to take the 15th lowest number of wins and 16th lowest number of wins and average them together. Since the Seattle Mariners and the Texas Rangers are tied at 16th with 78, and the Kansas City Royals and Los Angeles Angels of Anaheim are tied at 15 with 80, we would just do a single 80 and a single 78. So the median -- the average between the two middle values -- would be 79.
The mode is the highest frequency of the same datapoint. In the case of the 2017 MLB Season, there are three teams with 75 wins; the Baltimore Orioles, the Pittsburg Pirates, and the Oakland Athletics. Since this is the only instance of three teams having the same win-loss record, this would be the mode of the 2017 MLB Season.
So that's it for the basic calculations of statistics. If you have any questions, please feel free to ask. Next time, I will cover the basics of hypothesis testing. Until then, stay curious.
K. "Alan" Eister has his bacholers of Science in Chemistry. He is also a tutor for Varsity Tutors. If you feel you need any further help on any of the topics covered, you can sign up for tutoring sessions here.
Comments
Post a Comment