You can enter the formula in a spreadsheet. It’s worth noting that Excel has a built-in formula that makes things considerably easier. For Excel, you’ll need to know three things: the test statistic (t), the degrees of freedom, and whether you have a one- or two-tailed test.
The test statistic is calculated from your sample data; it will be used for comparison when you test your null hypothesis. The simplest test statistic involves subtracting a hypothesized mean from the sample mean and dividing by the standard error of the mean. A more complex test statistic would yield the chi-squared value by adding the squared differences between observed and expected values and then dividing by expected values.
Calculating the degrees of freedom is much more straightforward and involves simply subtracting 1 from the sample size (e.g., a sample size of 10 would yield 9 degrees of freedom).
A one-tailed test specifies a direction -- greater than or less than a number. A two-tailed test provides information in both directions and is often preferred for thoroughness.
The Excel formula is simple:
=tdist(test statistic, degrees of freedom, 1 or 2 for a one- or two-tailed test).
Not all good investors are quantitative analysts, and not all quantitative analysts are good investors. But relatively simple and accurate tools exist to help investors test hypotheses and draw more informed conclusions about the merits of specific investments.
Related investing topics