logo

Hypothesis Testing: Steps, Examples and Common Mistakes

Hypothesis Testing: Steps, Examples and Common Mistakes
6

Hypothesis testing is a method for assessing whether data are sufficiently incompatible with a stated null model to reject it under a chosen decision rule. It does not calculate the probability that an investment thesis is true or determine whether a strategy will make money.

A useful test starts before the result is observed. Define the question, null and alternative hypotheses, data collection rule, significance level, and analysis. Then calculate the evidence and report its limits alongside the decision.

The workflow below uses a hypothetical forecast record to show those steps. The point is to make the reasoning reproducible, rather than to turn one small p value into a trading recommendation.

What Hypothesis Testing Actually Tests

A statistical hypothesis makes a claim about a population or a data-generating process. The null hypothesis, H0, specifies the model being assessed. The alternative, H1, describes the departure the test is designed to detect.

The NIST introduction to statistical tests explains this decision framework. A test statistic summarizes the data in a way that can be compared with its distribution under the null assumptions.

For example, a test might evaluate whether the success probability for a defined set of independent binary forecasts equals 50%. Another test might evaluate whether a mean paired return difference equals zero. Those are different quantities requiring different procedures.

The null hypothesis guide examines the starting claim in more detail. Do not choose a null merely because software offers it as a default. It should answer a substantive question about the evidence you actually have.

Define the Question and the Analysis Before Looking at Results

Start with the target quantity. For a forecast record, are you measuring binary accuracy, calibration of probability estimates, or financial return after costs? A test of one quantity is not a test of all three.

Next define eligibility. Decide which questions enter the record, when a forecast must be saved, and how outcomes will be resolved. Excluding unsuccessful forecasts after resolution would alter the evidence being tested.

Choose whether the alternative is one-sided or two-sided. A one-sided test looks for a departure in a prespecified direction. A two-sided test looks for departures in either direction. Changing that choice after seeing the data invalidates the original interpretation.

Set the significance level, often written as alpha. A 5% level describes a long-run false-rejection rate under the null and the test's assumptions. It is not a 5% probability that your conclusion is wrong in this specific case.

Also set a collection or stopping rule. Repeatedly checking the same data and stopping when the p value falls below a threshold changes the procedure unless that monitoring is accounted for.

Worked Example: Sixteen Correct Forecasts Out of Twenty

Suppose a hypothetical forecaster records predictions for 20 independent binary questions before their outcomes are known. Each prediction identifies one of two outcomes. Under the null model, each has a 50% chance of being correct, independently of the others.

The forecaster gets 16 correct. The observed accuracy is 16/20 = 80%. The prespecified hypotheses are:

  • H0: the common probability of a correct forecast is 50%.
  • H1: that probability differs from 50%.

Use an exact two-sided binomial test at a 5% significance level. Under H0, the probability of at least 16 correct equals the probability of at most four correct by symmetry.

The two-sided p value is:

2 × [C(20, 16) + C(20, 17) + C(20, 18) + C(20, 19) + C(20, 20)] / 2²⁰ ≈ 0.0118.

Because 0.0118 is below 0.05, reject the stated null under this planned test. The calculation has not established that all future forecasts will be 80% accurate or that the process is profitable.

Interpret the Result Without Changing Its Meaning

The p value is calculated assuming the null model and other test assumptions. Here it summarizes how unusual results at least as incompatible with that null would be under the stated procedure.

It is not the probability that the forecaster has no skill. It is not the probability that the result happened “by chance alone.” It does not assign a 98.82% probability to the alternative hypothesis.

The American Statistical Association's statement release emphasizes these interpretation limits and the need for complete reporting. A threshold does not replace scientific or business reasoning.

Result Meaning
p < alpha Reject H0
p ≥ alpha Do not reject H0
Effect size Size of difference
Financial edge Check payoff/cost/risk

The p value guide explores those distinctions. Keep the decision and the uncertainty statement separate from any later economic conclusion.

Hypothetical 16 correct out of 20 independent questions gives a two-sided binomial p value of 0.0118 under a 50% null.
Hypothetical prespecified two-sided binomial test: 16 correct out of 20 independent questions, each with null success probability 50%, gives p ≈ 0.0118. This p value is not the probability the hypothesis is true or that the record will be profitable.

Match the Test to the Data and Assumptions

The exact binomial example assumes independent trials with the same null success probability. A set of forecasts about closely related events may violate that independence assumption. Predicting several outcomes driven by one policy announcement does not automatically provide several independent pieces of evidence.

Equal 50% chances may also be an inappropriate baseline for many forecast tasks. Questions with an overwhelmingly common outcome can make a high accuracy rate easy to achieve without useful discrimination.

For paired numerical differences, a paired t-test may be relevant under suitable conditions. For comparisons across several group means, an ANOVA framework can be appropriate. Changing the procedure changes the assumptions and the null reference distribution.

Investigate data quality, missing records, and the unit of observation before selecting a test. A sophisticated calculation cannot recover the meaning of a record that mixes incompatible questions or treats repeated views of one event as independent observations.

When assumptions are doubtful, explain the uncertainty and consider a procedure justified by the actual design. Do not select a method only because it produces the smallest p value.

Statistical Evidence Is Different From Economic Value

A test can detect a departure from a benchmark without showing that the departure is large enough to matter financially. An advantage can be small relative to trading costs, funding needs, or the loss from a plausible adverse outcome.

The hypothetical 80% accuracy record does not include entry prices or payouts. If correct outcomes were expensive to buy and incorrect outcomes involved large losses, the record could be financially unattractive despite its high accuracy.

Evaluate effect size and uncertainty alongside the test. A confidence interval can help show the range of parameter values compatible with the procedure's assumptions. It should not be used to conceal a biased inclusion rule or unstable process.

For a trading thesis, also preserve the price available when the decision was made. A later favorable price is not evidence that the same opportunity was executable earlier. The statistical record and the economic record must refer to the same actual decision.

Account for Multiple Tests and Selective Reporting

If many hypotheses are tested and only the most impressive result is reported, its single-test threshold understates the selection process.

For an example, suppose 50 independent tests each have an exact 5% false-rejection probability under their true nulls. The chance of at least one false rejection is 1 − 0.95⁵⁰ ≈ 92.3%.

That figure depends on the stated independence and error-rate assumptions. It is not a universal correction for every collection of tests. It shows why running many attempts and displaying only the winner changes the evidential question.

Record all planned tests and distinguish exploratory findings from confirmatory analyses. A promising exploratory pattern can motivate a new test on genuinely held-out observations. Reusing the discovery data as if they were new confirmation does not create an independent replication.

The same principle applies to changing a sample end date, dropping an inconvenient subgroup, or trying many strategy variants. Report those choices so another reader can understand what was actually searched.

A Short Hypothesis-Testing Report

State the research question, target population, unit of observation, null, alternative, and chosen significance level. Describe the sample and stopping rule, then name the test and the assumptions supporting it.

Report the observed effect, test result, and appropriate uncertainty measure. Explain any missing records, exclusions, dependence, or multiple-testing adjustment. State the conclusion narrowly enough that the data can support it.

Finally, separate what happened from what should happen next. A rejected null may justify further investigation. A failure to reject may indicate weak evidence, low power, or a genuinely small difference. Neither decision automatically approves a financial position.

Frequently Asked Questions

Does Failing to Reject H0 Prove It Is True?

No. The data may be insufficiently informative, the true difference may be small, or the model may be unsuitable. Demonstrating practical equivalence requires a procedure and margin designed for that purpose.

Can a Very Small P Value Replace a Large Sample?

No single number replaces examination of the design. A small p value can coexist with dependence, selection, measurement error, or an economically trivial difference. Review the assumptions and report the effect.

Should Every Forecast Be Tested Separately?

Not automatically. Define the question the record is meant to answer. A collection of forecasts may require a performance measure or model that accounts for their probabilities and dependencies, rather than a separate significance test for each outcome.

Author
Dale Hanson
Dale HansonCommunity Manager. X @InHansonWeTrust
Categories