# How to get information from a probability distribution table?

I have a probability distribution and I'm trying to extract some information from it. Specifically, I'm trying to determine the mean, variance, and standard deviation.

Am I able to determine those from the distribution table, and if so, how should I approach the problem?

To further clarify on the nature of the data, here are some points:

• Data is discrete; not continuous.
• The distribution table represents probability of GPA values (0-4) for a single class.
• What is a "distribution table"? Does it show probabilities of small ranges of values? Cumulative probabilities? Survival rates or hazards? Something else, like a formula? Is it a table of theoretical values or of empirical values (like binned observations)? – whuber Nov 22 '11 at 20:54
• @whuber it is a tabular distribution of discrete probability values. Specifically, the table represents observed GPA values (0,1,2,3,4) of grades for a particular class, and the probability of each value occurring. – Moses Nov 22 '11 at 21:09
• This may sound like a picky followup, but it actually matters: are the grades strictly on a (0,1,2,3,4) scale, or do they represent combined counts of grades that are given on a finer scale, such as (0, 0.3, 0.7, ..., 3.3, 3.7, 4)? – whuber Nov 22 '11 at 21:13
• @whuber I was only given the distribution table with the values 0,1,...,4; I assume that since those were the only values shown, and by the fact I was given a table dataset and not a formula, that the data is discrete and cannot be represented by non-integer numbers. Does that help? – Moses Nov 22 '11 at 21:42

The trick to finding moments, when the distribution is summarized, is to think in terms of totals rather than averages.

Here, we are given five proportions $p_0, p_1, p_2, p_3, p_4$ for the grade distribution. There were an unknown number $N$ of grades, whence $p_0N$ were $0$, ..., and $p_4N$ were $4$. Therefore the total grade was

$$p_0N \times 0 + p_1N \times 1 + \ldots + p_4N \times 4 = (p_1 + 2p_2 + 3p_3 + 4p_4)N.$$

The mean grade by definition is the total divided by the number:

$$m = \mbox{Mean} = (p_1 + 2p_2 + 3p_3 + 4p_4)N/N = p_1 + 2p_2 + 3p_3 + 4p_4.$$

To obtain the variance, consider that $p_0N$ of the grades were $0$ and, by definition, each contributes $(0-m)^2$ to the total sum of squared deviations from the mean. The grades of $1$ contribute $(1-m)^2$, etc. Therefore the total sum of squared deviations equals

$$p_0N \times (0-m)^2 + p_1N \times (1-m)^2 + \ldots + p_4N \times (4-m)^2.$$

We don't know $N$, so it's senseless to divide this by $N-1$, as is sometimes done for variance estimators, but we can divide by $N$ to obtain the variance of the grades as

$$\mbox{Variance} = p_0 m^2 + p_1 (1-m)^2 + p_2 (2-m)^2 + p_3 (3-m)^2 + p_4 (4-m)^2.$$

The standard deviation is the square root of this quantity.

Higher moments and their relatives, such as skewness and kurtosis, are obtained with similar calculations. They are amenable to spreadsheet formulas.

Incidentally (to explain some of the comments), these results are biased when the values represent binned counts of more fine-grained values. The variance formula, for instance, does not account for variation within each bin. There are standard ways to correct the formulas (such as Shepard's Corrections). These tend to require strong assumptions (such as near-normality of the underlying distribution along with some technical requirements on the bins: you need the distribution to be tapering off within the terminal bins), so they are rarely used (as far as I know). One can also fit a continuous distribution to the data (in various ways) and then estimate the moments from the moments of the fit.