Sub topic 2
Formulating the Null and Alternative Hypotheses
This chapter assumes you know the sampling distribution of the mean and the standard error from the previous chapter. It also assumes you are comfortable with the normal distribution, z-scores, and basic probability. Here you learn how to turn an investment question into two competing statements, which is the first step of every test in this tutorial.
What a hypothesis test does
A hypothesis is a statement about a population parameter, such as a mean return, a variance, or a correlation. Hypothesis testing uses sample evidence to decide whether such a statement is reasonable.
The CFA curriculum lays out the procedure in steps:
- State the hypotheses.
- Choose the test statistic and its distribution.
- Set the significance level.
- State the decision rule.
- Compute the statistic from the sample.
- Decide whether to reject the null hypothesis, then interpret the result.
This chapter covers step 1. Every later step depends on it, because the hypotheses fix which statistic you use and which tail of its distribution you look at.
The null and the alternative
The null hypothesis, written H0, is the statement you assume to be true until the data contradict it. The alternative hypothesis, written Ha, is the statement you accept if you reject H0. The two must be mutually exclusive and together cover every possible value of the parameter.
Three rules apply:
- H0 contains the equality. It uses =, ≤, or ≥. The test needs one exact boundary value, such as μ = 0, to build the sampling distribution under the null. Ha uses ≠, >, or <.
- Hypotheses concern parameters, not statistics. Write H0: μ = 0, not H0: x̄ = 0. You know the sample mean exactly, so there is nothing to test about it.
- Ha holds what you hope to support. The null is the position that needs to be overturned, and rejecting it requires evidence.
One-tailed and two-tailed tests
The form of Ha sets how many tails of the distribution hold the rejection region.
| Question | H0 | Ha | Type | Rejection region |
|---|---|---|---|---|
| Is the mean different from 0? | μ = 0 | μ ≠ 0 | Two-tailed | Both tails, α/2 each |
| Is the mean greater than 0? | μ ≤ 0 | μ > 0 | One-tailed (right) | Right tail, α |
| Is the mean less than 0? | μ ≥ 0 | μ < 0 | One-tailed (left) | Left tail, α |
Use a two-tailed test when a deviation in either direction matters, or when you have no prior direction. Use a one-tailed test when the economic question has a direction. For example, a manager claims to add value, so only positive excess return supports the claim.
The boundary value in H0 stays the same across the three forms. Only the direction of Ha changes where the rejection region sits.
Worked formulations
Here are four investment questions turned into hypotheses.
- A manager claims positive average monthly excess return. H0: μ ≤ 0 against Ha: μ > 0.
- An analyst asks whether a fund's average return differs from its benchmark's 0.8% per month. H0: μ = 0.8 against Ha: μ ≠ 0.8.
- A risk team asks whether portfolio volatility is below the 4% limit. H0: σ² ≥ 0.0016 against Ha: σ² < 0.0016. (Variance tests come later.)
- A researcher asks whether two returns are linearly related. H0: ρ = 0 against Ha: ρ ≠ 0. (This is the correlation test.)
The same logic carries into regression. The usual test of a slope has H0: b1 = 0, which says the independent variable has no linear relationship with the dependent variable. The alternative is b1 ≠ 0.
Why the direction matters in practice
The direction you choose changes the decision. The script below tests the ten monthly excess returns from this tutorial's first code example under all three alternatives. It needs SciPy 1.6 or later for the alternative argument.
import numpy as np
from scipy import stats
# Monthly excess returns (%) for a fund
returns = np.array([1.2, -0.4, 0.8, 2.1, -1.0, 0.5, 1.7, 0.3, -0.2, 1.1])
for alt in ["two-sided", "greater", "less"]:
t_stat, p_value = stats.ttest_1samp(returns, popmean=0.0, alternative=alt)
print(f"{alt:>9}: t = {t_stat:.3f}, p = {p_value:.4f}")The t-statistic is about 1.996 in all three runs, with 9 degrees of freedom. The p-values differ.
- Two-sided p is about 0.08. At α = 5% you fail to reject, because the two-tailed critical values are ±2.262.
- "Greater" p is about 0.04. At α = 5% you reject, because the right-tail critical value is 1.833.
- "Less" p is about 0.96. You do not reject.
The same data therefore support "the mean is positive" at 5% but not "the mean differs from zero" at 5%. The one-tailed test spends the whole 5% in one tail, so it needs less extreme evidence in that direction. This is why the direction must be justified by the question before you look at the data.
Reading the conclusion correctly
A test has two outcomes: reject H0, or fail to reject H0.
- Reject H0. The sample is unlikely enough under H0 that you conclude Ha is supported at the chosen significance level.
- Fail to reject H0. The evidence is not strong enough. This is not proof that H0 is true. The sample may simply be too small or too noisy, so the test may lack power. Power is covered in a later chapter.
The curriculum avoids the phrase "accept H0" for this reason. In the example above, failing to reject μ = 0 in the two-tailed test does not show the fund has no skill. It shows that these ten months are not enough to rule out zero.
Statistical significance is also separate from economic significance. A very large sample can reject H0: μ = 0 for a mean of 0.01% per month. That mean may be too small to cover transaction costs and taxes.
Common errors
- Putting the strict inequality in H0. Writing H0: μ > 0 is wrong, because the null needs the equality so there is a boundary value to test.
- Stating hypotheses about x̄ or other sample statistics. The hypotheses are about population parameters.
- Reversing the roles. If you want to show a manager adds value, "adds value" is Ha. Putting it in H0 means you would need to reject your own claim.
- Using a two-tailed Ha with a one-sided rule, or the reverse. The tail of Ha must match the tail where you place the rejection region.
- Overlapping or gapped hypotheses. Together H0 and Ha must cover every possible value of the parameter, so H0: μ ≤ 0 pairs with Ha: μ > 0.
- Concluding "H0 is true." The only conclusions are "reject" and "fail to reject".
Exercise
A portfolio manager says her fund's average monthly return beats the 0.5% benchmark return. Write the null and alternative hypotheses, say whether the test is one-tailed or two-tailed, and say which tail holds the rejection region.
Show answer
Let μ be the fund's true mean monthly return. H0: μ ≤ 0.5% and Ha: μ > 0.5%. The claim is directional ("beats"), so the test is one-tailed. The rejection region is in the right tail, because only a sample mean well above 0.5% supports the claim.
Exercise
A test of H0: μ = 0 against Ha: μ ≠ 0 gives a t-statistic of 1.996 with 9 degrees of freedom, and the 5% two-tailed critical values are ±2.262. An analyst then says, "The sample mean is positive, so I should have used a right-tailed test, whose critical value is 1.833, and I now reject." What is wrong with this reasoning?
Show answer
The direction was chosen after seeing the data. A valid one-tailed test needs the direction set from the research question before the data are examined. Switching tails afterward halves the p-value and raises the true false-rejection probability above 5%. With the original two-tailed hypotheses the correct decision is to fail to reject.